D3D11_SHADER_VARIABLE_DESC structure (d3d11shader.h)

Describes a shader variable.

Syntax

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

Members

Name

Type: LPCSTR

The variable name.

StartOffset

Type: UINT

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

Size

Type: UINT

Size of the variable (in bytes).

uFlags

Type: UINT

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

Type: LPVOID

The default value for initializing the variable.

StartTexture

Type: UINT

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

TextureSize

Type: UINT

The size of the texture, in bytes.

StartSampler

Type: UINT

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

SamplerSize

Type: UINT

The size of the sampler, in bytes.

Remarks

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

As of the June 2010 update, DefaultValue emits default values for reflection.

Requirements

Requirement Value
Header d3d11shader.h

See also

Shader Structures