public sealed class NullDeviceThe graphics device with no GPU behind it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Two jobs, the same as Vixen.Platform.Headless's: it is what a dedicated server renders on, and it is what every RHI test runs against. Because the second happens on every build, the first is the most thoroughly exercised backend in the engine — docs/plan/05 calls that a pleasant consequence of the design rather than new work, and it is.
Resource creation genuinely does not allocate anything resource-shaped. A handle and its description, and nothing proportional to the size asked for — so a server that creates and destroys a 4K render target every frame stays flat. Handles are still generation-checked, so using one after destroying it is caught here rather than on a driver that would have crashed.
Fields and properties (11)
public CommandRecorder? RecorderThe recorded command stream, or if recording is off.
public IGraphicsAdapter AdapterThe adapter this device runs on.
public GraphicsDeviceFeatures FeaturesWhat it can do.
public ICommandSubmitter GraphicsQueueThe queue that can do everything.
public ICommandSubmitter ComputeQueueThe compute queue, which is GraphicsQueue where the hardware has only one.
public ICommandSubmitter TransferQueueThe transfer queue, which is GraphicsQueue where the hardware has only one.
public int FramesInFlightHow many frames may be recorded before the first has to have finished.
public long FrameCountHow many frames BeginFrame has started.
public int LiveResourceCountHow many resources are alive, across every kind.
public static GraphicsDeviceFeatures EverythingEverything a device could claim — what this one claims unless told otherwise.
public int DescriptorWritesHow many descriptor writes this device has been given, over its whole life.
Methods (38)
public static bool TryCreate(NullDeviceOptions options, out NullDevice? device, out string? reason)Creates a device, reporting failure rather than throwing.
public NullDevice()Creates the device.
public NullDevice(NullDeviceOptions options)Creates the device.
public BufferHandle CreateBuffer(in BufferDescription description)Creates a buffer.
public TextureHandle CreateTexture(in TextureDescription description)Creates a texture.
public TextureViewHandle CreateTextureView(TextureHandle texture, PixelFormat format = Undefined, int baseMipLevel = 0, int mipLevelCount = 0, int baseArrayLayer = 0, int arrayLayerCount = 0)Creates a view of part of a texture.
public SamplerHandle CreateSampler(in SamplerDescription description)Creates a sampler.
public ShaderHandle CreateShader(ShaderStage stage, ReadOnlySpan<byte> bytecode, string name = "")Creates a shader module from compiled bytecode.
public DescriptorSetLayoutHandle CreateDescriptorSetLayout(in DescriptorSetLayoutDescription description)Creates a descriptor-set layout.
public PipelineLayoutHandle CreatePipelineLayout(in PipelineLayoutDescription description)Creates a pipeline layout.
public DescriptorSetHandle CreateDescriptorSet(DescriptorSetLayoutHandle layout, string name = "")Creates a descriptor set.
public void UpdateDescriptorSet(DescriptorSetHandle descriptors, ReadOnlySpan<DescriptorWrite> writes)public PipelineHandle CreateGraphicsPipeline(in GraphicsPipelineDescription description)Compiles a graphics pipeline.
public PipelineHandle CreateComputePipeline(in ComputePipelineDescription description)Compiles a compute pipeline.
public ISwapChain CreateSwapChain(in SwapChainDescription description)Creates a swapchain for a window surface.
public QueryPoolHandle CreateQueryPool(in QueryPoolDescription description)Creates a pool of GPU queries.
public void Destroy(QueryPoolHandle handle)Returns a query pool.
public AccelerationStructureSizes GetAccelerationStructureSizes(in AccelerationStructureBuildInput input)public AccelerationStructureHandle CreateAccelerationStructure(in AccelerationStructureDescription description)Creates an acceleration structure — empty until a build fills it.
public ulong GetAccelerationStructureAddress(AccelerationStructureHandle handle)public void Destroy(AccelerationStructureHandle handle)Returns an acceleration structure.
public bool TryResolveQueries(QueryPoolHandle pool, int first, Span<ulong> results)public void Destroy(BufferHandle handle)Returns a buffer.
public void Destroy(TextureHandle handle)Returns a texture.
public void Destroy(TextureViewHandle handle)Returns a texture view.
public void Destroy(SamplerHandle handle)Returns a sampler.
public void Destroy(ShaderHandle handle)Returns a shader module.
public void Destroy(PipelineHandle handle)Returns a pipeline.
public void Destroy(PipelineLayoutHandle handle)Returns a pipeline layout.
public void Destroy(DescriptorSetLayoutHandle handle)Returns a descriptor-set layout.
public void Destroy(DescriptorSetHandle handle)Returns a descriptor set.
public void Write(BufferHandle buffer, long offset, ReadOnlySpan<byte> data)Writes into a host-visible buffer.
public void Read(BufferHandle buffer, long offset, Span<byte> destination)Reads out of a readback buffer.
public ICommandList BeginCommandList(QueueKind kind = Graphics, string name = "")Takes a command list to record into.
public void BeginFrame()Marks the start of a frame, retiring whatever the oldest in-flight frame held.
public void EndFrame()Marks the end of a frame.
public void WaitIdle()Blocks until every queue is idle.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (94, showing 40)
- FrameDocumentTestsThirdPersonShooter.Frame.Tests
- AccelerationStructureTestsVixen.Graphics.Null.Tests
- AlwaysCompilesVixen.Rendering.Tests
- AlwaysCompilesVixen.Rendering.Tests
- AlwaysCompilesVixen.Rendering.Tests
- AlwaysCompilesVixen.Rendering.Tests
- AssetTextureSourceTestsVixen.Engine.Renderer.Tests
- AutoExposureTestsVixen.Rendering.PostFx.Tests
- BindlessFrameTestsVixen.Rendering.Tests
- BindlessSetLayoutTestsVixen.Shaders.Tests
- BindlessTableTestsVixen.Graphics.Tests
- BloomTestsVixen.Rendering.PostFx.Tests
- BufferTransferTestsVixen.Rendering.Tests
- ClusterRasterTestsVixen.Rendering.Tests
- ClusterResolveTestsVixen.Rendering.Tests
- ClusteredLightingTestsVixen.Rendering.Tests
- CommandRecorderTestsVixen.Graphics.Null.Tests
- CompilesVixen.Rendering.Tests
- CompositorAssetTestsVixen.Rendering.Tests
- DefaultFrameTestsVixen.Rendering.Tests
- DepthPrepassTestsVixen.Rendering.Tests
- DescriptorAllocatorTestsVixen.Graphics.Tests
- DescriptorBindingTestsVixen.Rendering.Tests
- DrawCompactionTestsVixen.Rendering.Tests
- EffectCacheTestsVixen.Shaders.Tests
- FixtureVixen.Rendering.Tests
- FoliageCullPassTestsVixen.Rendering.Terrain.Tests
- ForwardFrameTestsVixen.Rendering.Tests
- ForwardLightingTestsVixen.Rendering.Tests
- GeometryBufferTestsVixen.Rendering.Tests
- GlobalDistanceFieldRendererTestsVixen.Rendering.Tests
- GlobalDistanceFieldTextureTestsVixen.Rendering.Tests
- GpuDrivenCompositorTestsVixen.Rendering.Tests
- GpuVisibilityGroupTestsVixen.Rendering.Tests
- GraphicsCompositorTestsVixen.Rendering.Tests
- GrassDispatchTestsVixen.Rendering.Terrain.Tests
- GrassDrawPassTestsVixen.Rendering.Terrain.Tests
- ImpostorBakeTestsVixen.Rendering.Tests
- ImpostorCapturePassTestsVixen.Rendering.Tests
- IrradianceFieldTextureTestsVixen.Rendering.Tests