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
Expand Minimize

dcl_indexableTemp (sm4 - asm)

Declares an indexable, temporary register.

dcl_indexableTemp xN[size], ComponentCount




[in] An integer that denotes the register number.


[in] An optional integer value. The number of elements in the register array.


[in] An optional integer value.The number of components in the register array.


A register contains enough space for a 32-bit four-component value; the number of elements in the array of temporary registers (indexable and non-indexable) cannot exceed 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 are some examples of the code generated for indexable registers.

dcl_indexableTemp x0[23], 2 ; // An indexable array of 23, 2-component, 32-bit elements
dcl_indexableTemp x1[16], 4 ; // An indexable array of 16, 4-component, 32-bit elements

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)



Community Additions

© 2015 Microsoft