D3D11_SHADER_VARIABLE_DESC Structure

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
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.

StartTexture
The start texture.

TextureSize
The texture size.

StartSampler
The start sampler.

SamplerSize
The sampler size.

Remarks

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

DefaultValue emits default values for reflection.

Requirements

Header: Declared in d3d11shader_x.h (d3d11shader.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).