D3D12_SIGNATURE_PARAMETER_DESC structure (d3d12shader.h)

Describes a shader signature.

Syntax

typedef struct _D3D12_SIGNATURE_PARAMETER_DESC {
  LPCSTR                      SemanticName;
  UINT                        SemanticIndex;
  UINT                        Register;
  D3D_NAME                    SystemValueType;
  D3D_REGISTER_COMPONENT_TYPE ComponentType;
  BYTE                        Mask;
  BYTE                        ReadWriteMask;
  UINT                        Stream;
  D3D_MIN_PRECISION           MinPrecision;
} D3D12_SIGNATURE_PARAMETER_DESC;

Members

SemanticName

A per-parameter string that identifies how the data will be used. For more info, see Semantics.

SemanticIndex

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

Register

The register that will contain this variable's data.

SystemValueType

A D3D_NAME-typed value that identifies a predefined string that determines the functionality of certain pipeline stages.

ComponentType

A D3D_REGISTER_COMPONENT_TYPE-typed value that identifies the per-component-data type that is stored in a register. Each register can store up to four-components of data.

Mask

Mask which indicates which components of a register are used.

ReadWriteMask

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

Stream

Indicates which stream the geometry shader is using for the signature parameter.

MinPrecision

A D3D_MIN_PRECISION-typed value that indicates the minimum desired interpolation precision. For more info, see Using HLSL minimum precision.

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 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 ID3D12ShaderReflection::GetInputParameterDesc.

Requirements

Requirement Value
Header d3d12shader.h

See also

Shader Structures