dcl_output_sgv (sm4 - asm)
Collapse the table of content
Expand the table of content

dcl_output_sgv (sm4 - asm)

Declares an output register that contains a system-value parameter.

dcl_output_sgv oN[.mask], systemValue




[in] An output data register; N is an integer that denotes the register number.


[in] Optional. A component mask (.xyzw) that specifies which of the register components to use.


[in] The system-value name which is a string (see system-value semantics) without the "SV_" prefix.


This instruction applies to the following shader stages:

Vertex ShaderGeometry ShaderPixel Shader


This instruction is included to aid in debugging a shader in assembly; you cannot author a shader in assembly language using Shader Model 4.


Here is an example.

dcl_output_sgv o4.x, primitiveID

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no


Related topics

Shader Model 4 Assembly (DirectX HLSL)



© 2016 Microsoft