Graphics Reference
In-Depth Information
Struct D3D11_SIGNATURE_PARAMETER_DESC {
LPCSTR SemanticName;
UINT Semanticlndex;
UINT Register;
D3D10_NAME SystemValueType;
D3D10_REGISTER_COMPONENT_TYPE ComponentType;
BYTE
Mask;
BYTE
ReadWriteMask;
UINT
Stream;
}
Listing 6.29. The D3D11_SIGNATURE_PARAMETER_DESC structure.
The SemanticName and Semanticlndex members indicate which semantic is bound to
the parameter, whether a user-defined semantic or a system-value semantic. The Register
indicates which register ( v0 through v31) the parameter was mapped to by the compiler.
For parameters mapped to a system-value semantic, the SystemValueType member will
contain a value indicating which semantic was used. ComponentType indicates whether
the parameter is a float, int, or uint, while mask indicates which components of the register
are used to store the parameter value. For input parameters the ReadWriteMask member
indicates which components are read by the shader program, while for output parameters
it indicates which components were written. Finally, the Stream member indicates which
stream a geometry shader is using for the parameter.
6.8.6 Resource Bindings
While the ID3D11ShaderReflectionVariable and ID3D11ShaderReflectionType inter-
faces can be used to obtain information about the resources required by a shader pro-
gram, they are not very convenient for determining how resources need to be bound to
the pipeline to provide a suitable execution environment for a shader. In particular, they
don't provide one key piece of information, which is the slot index that a resource is
bound to. Instead, this information can be obtained by calling GetResourceBindingDesc
or GetResourceBindingDescByName on an ID3DllShaderReflection interface. These
methods both return a D3D11_SHADER_INPUT_BIND_DESC structure, whose declaration is
in Listing 6.30.
struct D3D11_SHADER_INPUT_BIND_DESC {
LPCSTR Name;
D3D10_SHADER_INPUT_TYPE Type;
UINT
BindPoint;
UINT
BindCount;
Search WWH ::




Custom Search