public interface IGraphicsDeviceA logical device: what creates resources, records work and submits it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Creation returns handles into tables this device owns, and Destroy returns them. There is no IDisposable per resource and no finaliser anywhere: a GPU object's lifetime is decided by the renderer, not by a collector that runs whenever it likes and has no idea whether the GPU is still reading.
Destroying a resource is deferred internally until the frames that might still reference it have retired. That is the backend's job and not the caller's — a renderer that had to track it would track it wrongly.
Fields and properties (6)
IGraphicsAdapter AdapterThe adapter this device runs on.
GraphicsDeviceFeatures FeaturesWhat it can do.
ICommandSubmitter GraphicsQueueThe queue that can do everything.
ICommandSubmitter ComputeQueueThe compute queue, which is GraphicsQueue where the hardware has only one.
ICommandSubmitter TransferQueueThe transfer queue, which is GraphicsQueue where the hardware has only one.
int FramesInFlightHow many frames may be recorded before the first has to have finished.
Methods (34)
BufferHandle CreateBuffer(in BufferDescription description)Creates a buffer.
TextureHandle CreateTexture(in TextureDescription description)Creates a texture.
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.
SamplerHandle CreateSampler(in SamplerDescription description)Creates a sampler.
ShaderHandle CreateShader(ShaderStage stage, ReadOnlySpan<byte> bytecode, string name = "")Creates a shader module from compiled bytecode.
DescriptorSetLayoutHandle CreateDescriptorSetLayout(in DescriptorSetLayoutDescription description)Creates a descriptor-set layout.
PipelineLayoutHandle CreatePipelineLayout(in PipelineLayoutDescription description)Creates a pipeline layout.
DescriptorSetHandle CreateDescriptorSet(DescriptorSetLayoutHandle layout, string name = "")Creates a descriptor set.
void UpdateDescriptorSet(DescriptorSetHandle descriptors, ReadOnlySpan<DescriptorWrite> writes)Points a descriptor set's bindings at resources.
PipelineHandle CreateGraphicsPipeline(in GraphicsPipelineDescription description)Compiles a graphics pipeline.
PipelineHandle CreateComputePipeline(in ComputePipelineDescription description)Compiles a compute pipeline.
ISwapChain CreateSwapChain(in SwapChainDescription description)Creates a swapchain for a window surface.
QueryPoolHandle CreateQueryPool(in QueryPoolDescription description)Creates a pool of GPU queries.
void Destroy(QueryPoolHandle handle)Returns a query pool.
AccelerationStructureSizes GetAccelerationStructureSizes(in AccelerationStructureBuildInput input)Asks how much memory one acceleration-structure build needs.
AccelerationStructureHandle CreateAccelerationStructure(in AccelerationStructureDescription description)Creates an acceleration structure — empty until a build fills it.
ulong GetAccelerationStructureAddress(AccelerationStructureHandle handle)The GPU address a top-level build's instances refer to a bottom level by.
void Destroy(AccelerationStructureHandle handle)Returns an acceleration structure.
bool TryResolveQueries(QueryPoolHandle pool, int first, Span<ulong> results)Reads out whatever a pool's queries have answered.
void Destroy(BufferHandle handle)Returns a buffer.
void Destroy(TextureHandle handle)Returns a texture.
void Destroy(TextureViewHandle handle)Returns a texture view.
void Destroy(SamplerHandle handle)Returns a sampler.
void Destroy(ShaderHandle handle)Returns a shader module.
void Destroy(PipelineHandle handle)Returns a pipeline.
void Destroy(PipelineLayoutHandle handle)Returns a pipeline layout.
void Destroy(DescriptorSetLayoutHandle handle)Returns a descriptor-set layout.
void Destroy(DescriptorSetHandle handle)Returns a descriptor set.
void Write(BufferHandle buffer, long offset, ReadOnlySpan<byte> data)Writes into a host-visible buffer.
void Read(BufferHandle buffer, long offset, Span<byte> destination)Reads out of a readback buffer.
ICommandList BeginCommandList(QueueKind kind = Graphics, string name = "")Takes a command list to record into.
void BeginFrame()Marks the start of a frame, retiring whatever the oldest in-flight frame held.
void EndFrame()Marks the end of a frame.
void WaitIdle()Blocks until every queue is idle.
Used by (119, showing 40)
- ArenaFrameThirdPersonShooter
- ArenaIlluminationThirdPersonShooter
- DevelopmentEffectsThirdPersonShooter
- AppBuilderVixen.App.Hosting
- AppGraphicsVixen.App.Hosting
- AssetTextureSourceVixen.Engine.Renderer
- AutoExposureRendererVixen.Rendering.PostFx
- BinVixen.Rendering
- BindlessTableVixen.Graphics
- BloomRendererVixen.Rendering.PostFx
- BufferReadbackRendererVixen.Rendering
- CompositorBuilderVixen.Rendering
- CompositorFrameVixen.Rendering
- ComputePipelineCacheVixen.Rendering
- DebugDrawRendererVixen.Engine.Renderer
- DescriptorAllocatorVixen.Graphics
- EffectConstantsVixen.Rendering
- EffectLoaderVixen.Shaders
- EffectPipelineDescriberVixen.Rendering
- EnvironmentTextureVixen.Rendering
- FoliageCullPassVixen.Rendering.Terrain
- ForwardLightingRenderFeatureVixen.Rendering
- FullScreenRendererVixen.Rendering
- GeometryBufferVixen.Rendering
- GlDeviceVixen.Graphics.OpenGL
- GlobalDistanceFieldRendererVixen.Rendering
- GlobalDistanceFieldTextureVixen.Rendering
- GpuClusterRasterVixen.Rendering
- GpuClusterResolveVixen.Rendering
- GpuClusterSoftwareRasterVixen.Rendering
- GpuClusterVisibilityVixen.Rendering
- GpuCullingVixen.Rendering
- GpuDrawArgumentsVixen.Rendering
- GpuVisibilityGroupVixen.Rendering
- GpuVisibilityTilesVixen.Rendering
- GraphicsCompositorVixen.Rendering
- GrassDispatchVixen.Rendering.Terrain
- GrassDrawPassVixen.Rendering.Terrain
- HiZPyramidVixen.Rendering
- IGraphicsBackendVixen.App.Hosting