ID3D11ShaderReflection interface

A shader-reflection interface accesses shader information.


The ID3D11ShaderReflection interface has these methods.

Method Description
ID3D11ShaderReflection::GetBitwiseInstructionCount Gets the number of bitwise instructions.
ID3D11ShaderReflection::GetConstantBufferByIndex Get a constant buffer by index.
ID3D11ShaderReflection::GetConstantBufferByName Get a constant buffer by name.
ID3D11ShaderReflection::GetConversionInstructionCount Gets the number of conversion instructions.
ID3D11ShaderReflection::GetDesc Get a shader description.
ID3D11ShaderReflection::GetGSInputPrimitive Gets the geometry-shader input-primitive description.
ID3D11ShaderReflection::GetInputParameterDesc Get an input-parameter description for a shader.
ID3D11ShaderReflection::GetMinFeatureLevel Gets the minimum feature level.
ID3D11ShaderReflection::GetMovcInstructionCount Gets the number of Movc instructions.
ID3D11ShaderReflection::GetMovInstructionCount Gets the number of Mov instructions.
ID3D11ShaderReflection::GetNumInterfaceSlots Gets the number of interface slots in a shader.
ID3D11ShaderReflection::GetOutputParameterDesc Get an output-parameter description for a shader.
ID3D11ShaderReflection::GetPatchConstantParameterDesc Get a patch-constant parameter description for a shader.
ID3D11ShaderReflection::GetRequiresFlags Gets a group of flags that indicates the requirements of a shader.
ID3D11ShaderReflection::GetResourceBindingDesc Get a description of how a resource is bound to a shader.
ID3D11ShaderReflection::GetResourceBindingDescByName Get a description of how a resource is bound to a shader.
ID3D11ShaderReflection::GetThreadGroupSize Retrieves the sizes, in units of threads, of the X, Y, and Z dimensions of the shader's thread-group grid.
ID3D11ShaderReflection::GetVariableByName Gets a variable by name.
ID3D11ShaderReflection::IsSampleFrequencyShader Indicates whether a shader is a sample frequency shader.


An ID3D11ShaderReflection interface can be retrieved for a shader by using D3DReflect. The following code illustrates retrieving a ID3D11ShaderReflection from a shader.

pd3dDevice->CreatePixelShader( pPixelShaderBuffer->GetBufferPointer(),
                               pPixelShaderBuffer->GetBufferSize(), g_pPSClassLinkage, &g_pPixelShader );

ID3D11ShaderReflection* pReflector = NULL; D3DReflect( pPixelShaderBuffer->GetBufferPointer(), pPixelShaderBuffer->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pReflector);


Windows version Windows 7 [desktop apps | UWP apps] Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d3d11shader.h

See Also


Shader Interfaces