Graphics Reference
In-Depth Information
UINT TempRegisterCount;
UINT TempArrayCount;
UINT DefCount;
UINT DclCount;
UINT TextureNormallnstructions;
UINT TextureLoadlnstructions;
UINT TextureCompInstructions;
UINT TextureBiasInstructions;
UINT TextureGradientInstructions;
UINT FloatlnstructionCount;
UINT IntlnstructionCount;
UINT UintlnstructionCount;
UINT StaticFlowControlCount;
UINT DynamicFlowControlCount;
UINT MacroInstructionCount;
UINT ArraylnstructionCount;
UINT CutlnstructionCount;
UINT EmitlnstructionCount;
D3D10_PRIMITIVE_TOPOLOGY GSOutputTopology;
UINT GSMaxOutputVertexCount;
D3D11_PRIMITIVE InputPrimitive;
UINT PatchConstantParameters;
UINT cGSInstanceCount;
UINT cControlPoints;
D3D11_TESSELLAT0R_0UTPUT_PRIMITIVE HSOutputPrimitive;
D3D11_TESSELLAT0R_PARTITI0NING HSPartitioning;
D3D11_TESSELLAT0R_D0MAIN
TessellatorDomain;
UINT
cBarrierlnstructions;
UINT
clnterlockedlnstructions;
UINT
cTextureStorelnstructions;
}
Listing 6.24. The D3D11_SHADER_DESC structure.
6.8.2 Constant Buffer Information
As previously mentioned, the ID3DllShaderReflection interface can be used to obtain an
ID3DllShaderReflectionConstantBuffer interface containing information for a constant
buffer used in a shader program. This is done by calling either GetConstantBufferByName,
or GetConstantBufferBylndex. The former accepts a string parameter, and is useful if an
application has prior knowledge of a shader program and simply needs to query a few spe-
cific details. The latter is more useful when dealing with an unknown shader program, as
it allows enumeration of all constant buffers. The number of constant buffers in a program
is provided by the D3D11_SHADER_DESC structure returned by GetDesc. Listing 6.25 dem-
onstrates the common pattern of retrieving the number of constant buffers, and iterating
through the ID3DllShaderReflectionConstantBuffer interfaces.
Search WWH ::




Custom Search