D3D10_SIGNATURE_PARAMETER_DESC structure (d3d10shader.h)

Describes a shader signature.

Syntax

typedef struct _D3D10_SIGNATURE_PARAMETER_DESC {
  LPCSTR                        SemanticName;
  UINT                          SemanticIndex;
  UINT                          Register;
  D3D10_NAME                    SystemValueType;
  D3D10_REGISTER_COMPONENT_TYPE ComponentType;
  BYTE                          Mask;
  BYTE                          ReadWriteMask;
} D3D10_SIGNATURE_PARAMETER_DESC;

Members

SemanticName

Type: LPCSTR

A per-parameter string that identifies how the data will be used. See Semantics (DirectX HLSL).

SemanticIndex

Type: UINT

Semantic index that modifies the semantic. Used to differentiate different parameters that use the same semantic.

Register

Type: UINT

The register that will contain this variable's data.

SystemValueType

Type: D3D10_NAME

A predefined string that determines the functionality of certain pipeline stages. See D3D10_NAME.

ComponentType

Type: D3D10_REGISTER_COMPONENT_TYPE

The per-component-data type that is stored in a register. See D3D10_REGISTER_COMPONENT_TYPE. Each register can store up to four-components of data.

Mask

Type: BYTE

Mask which indicates which components of a register are used.

ReadWriteMask

Type: BYTE

Mask which indicates whether a given component is never written (if the signature is an output signature) or always read (if the signature is an input signature). The mask is a combination of D3D10_REGISTER_COMPONENT_TYPE values.

Remarks

A shader can take n inputs and can produce m outputs. The order of the input (or output) parameters, their associated types, and any attached semantics make up the shader signature. Each shader has an input and an output signature.

When compiling a shader or an effect, some API calls validate shader signatures (such as D3D10CompileShader and D3D10CompileEffectFromMemory). That is, they compare the output signature of one shader (like a vertex shader) with the input signature of another shader (like a pixel shader). This ensures that a shader outputs data that is compatible with a downstream shader that is consuming that data. Compatible means that a shader signature is a exact-match subset of the preceding shader stage. Exact match means parameter types and semantics must exactly match. Subset means that a parameter that is not required by a downstream stage, does not need to include that parameter in its shader signature.

Get a shader-signature from a shader or an effect by calling APIs such as ID3D10ShaderReflection::GetInputParameterDesc or ID3D10EffectShaderVariable::GetInputSignatureElementDesc.

Requirements

Requirement Value
Header d3d10shader.h

See also

Shader Structures