D3D12_SHADER_VARIABLE_DESC structure (d3d12shader.h)

Describes a shader variable.

Syntax

typedef struct _D3D12_SHADER_VARIABLE_DESC {
  LPCSTR Name;
  UINT   StartOffset;
  UINT   Size;
  UINT   uFlags;
  LPVOID DefaultValue;
  UINT   StartTexture;
  UINT   TextureSize;
  UINT   StartSampler;
  UINT   SamplerSize;
} D3D12_SHADER_VARIABLE_DESC;

Members

Name

The variable name.

StartOffset

Offset from the start of the parent structure to the beginning of the variable.

Size

Size of the variable (in bytes).

uFlags

A combination of D3D_SHADER_VARIABLE_FLAGS-typed values that are combined by using a bitwise-OR operation. The resulting value identifies shader-variable properties.

DefaultValue

The default value for initializing the variable. Emits default values for reflection.

StartTexture

Offset from the start of the variable to the beginning of the texture.

TextureSize

The size of the texture, in bytes.

StartSampler

Offset from the start of the variable to the beginning of the sampler.

SamplerSize

The size of the sampler, in bytes.

Remarks

Get a shader-variable description using reflection by calling ID3D12ShaderReflectionVariable::GetDesc.

Requirements

Requirement Value
Header d3d12shader.h

See also

Shader Structures