Class EffectDescriptorSetReflection
A reflection object that describes the Descriptor Sets and their layouts for an Effect / Shader
based on reflection data extracted from its bytecode.
This includes the bindings for Graphics Resources such as Textures, Buffers, and Sampler States.
public class EffectDescriptorSetReflection
- Inheritance
-
objectEffectDescriptorSetReflection
- Extension Methods
Methods
AddLayout(string, DescriptorSetLayoutBuilder)
Adds a new Descriptor Set layout for the given name.
public void AddLayout(string descriptorSetName, DescriptorSetLayoutBuilder descriptorSetLayoutBuilder)
Parameters
descriptorSetNamestringThe slot name given to the Descriptor Set layout in the Effect / Shader.
descriptorSetLayoutBuilderDescriptorSetLayoutBuilderA DescriptorSetLayoutBuilder that describes the Graphics Resource bindings and their associated metadata and layout.
GetLayout(string)
Gets the layout of the Descriptor Set with the given name.
public DescriptorSetLayoutBuilder? GetLayout(string name)
Parameters
namestringThe name of the Descriptor Set.
Returns
- DescriptorSetLayoutBuilder
A DescriptorSetLayoutBuilder object that describes the Graphics Resource bindings and their layout in the Descriptor Set with the provided
name, or null if no Descriptor Set with that name exists.
GetLayoutIndex(string)
Gets the index of the Descriptor Set with the given name.
public int GetLayoutIndex(string name)
Parameters
namestringThe name of the Descriptor Set.
Returns
- int
The zero-based index of the Descriptor Set with the provided
name, or-1if no Descriptor Set with that name exists.
New(GraphicsDevice, EffectBytecode, List<string>, string)
Creates a new Effect Descriptor Set reflection object.
public static EffectDescriptorSetReflection New(GraphicsDevice graphicsDevice, EffectBytecode effectBytecode, List<string> effectDescriptorSetSlots, string defaultSetSlot)
Parameters
graphicsDeviceGraphicsDeviceThe Graphics Device used to create Sampler States and manage bindings.
effectBytecodeEffectBytecodeThe Effect / Shader bytecode containing reflection data for resource bindings and Sampler States.
effectDescriptorSetSlotsList<string>A list of Descriptor Set slot names to be processed. This usually comes from the resource groups (
rgroups) in the Effects / Shaders, plus a"Globals"slot for those Descriptor Set layouts that have no specified a slot / group name.defaultSetSlotstringThe default Descriptor Set slot name used for the Graphics Resources in this Effect / Shader when no slot name is specified. Usually, this is
"Globals".
Returns
- EffectDescriptorSetReflection
The new instance of EffectDescriptorSetReflection containing the Descriptor Set layouts and default set slot information.