Struct DescriptorSet
Represents a set of Descriptors (such as Textures or Buffers) that can be bound together to a graphics pipeline.
public readonly struct DescriptorSet
- Inherited Members
- Extension Methods
Properties
IsValid
Gets a value indicating whether this Descriptor Set is valid (i.e. it has been allocated and has a valid start offset).
public bool IsValid { get; }
Property Value
Methods
New(GraphicsDevice, DescriptorPool, DescriptorSetLayout)
Creates a new Descriptor Set.
public static DescriptorSet New(GraphicsDevice graphicsDevice, DescriptorPool pool, DescriptorSetLayout layout)
Parameters
graphicsDeviceGraphicsDeviceThe Graphics Device.
poolDescriptorPoolThe pool where Descriptor Sets are allocated.
layoutDescriptorSetLayoutA description of the Graphics Resources in the Descriptor Set and their layout.
Returns
- DescriptorSet
The new Descriptor Set.
SetConstantBuffer(int, Buffer, int, int)
Sets a Constant Buffer View in the specified slot.
public void SetConstantBuffer(int slot, Buffer buffer, int offset, int size)
Parameters
slotintThe slot index.
bufferBufferThe Constant Buffer to set.
offsetintThe Constant Buffer View start offset.
sizeintThe Constant Buffer View size.
SetSamplerState(int, SamplerState)
Sets a Sampler State in the specified slot.
public void SetSamplerState(int slot, SamplerState samplerState)
Parameters
slotintThe slot index.
samplerStateSamplerStateThe Sampler State to set.
SetShaderResourceView(int, GraphicsResource)
Sets a Shader Resource View on a Graphics Resource in the specified slot.
public void SetShaderResourceView(int slot, GraphicsResource shaderResourceView)
Parameters
slotintThe slot index.
shaderResourceViewGraphicsResourceThe Shader Resource View on a Graphics Resource to set.
SetUnorderedAccessView(int, GraphicsResource)
Sets an Unordered Access View in the specified slot.
public void SetUnorderedAccessView(int slot, GraphicsResource unorderedAccessView)
Parameters
slotintThe slot index.
unorderedAccessViewGraphicsResourceThe Unordered Access View to set.
SetValue(int, object)
Sets a Descriptor in the specified slot.
public void SetValue(int slot, object value)
Parameters
slotintThe slot index.
valueobjectThe Descriptor to set.