Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

D3D11_SIGNATURE_PARAMETER_DESC structure

Describes a shader signature.

Syntax


typedef struct D3D11_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;
} D3D11_SIGNATURE_PARAMETER_DESC;

Members

SemanticName

Type: LPCSTR

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

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: D3D_NAME

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

ComponentType

Type: D3D_REGISTER_COMPONENT_TYPE

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

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

Stream

Type: UINT

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

MinPrecision

Type: D3D_MIN_PRECISION

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

Requirements

Header

D3D11Shader.h

See also

Shader Structures

 

 

Community Additions

ADD
Show:
© 2015 Microsoft