dcl_temps (sm4 - asm)

Declares temporary registers.

dcl_temps N




[in] The number of temporary registers.


Each register has space for a 32-bit four-component value. The total number of temporary and indexable-temporary registers must be less than or equal to 4096.

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_temps 10; // Declare r0-r9

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)