dcl_tgsm_structured (sm5 - asm)

Declare a reference to a region of shared memory space available to the compute shader s thread group. The memory is viewed as an array of structures.

dcl_tgsm_structured g#, structByteStride, structCount
Item Description
g#
[in] A reference to a block of shared memory of size structByteStride * structCount bytes.
structByteStride
[in] The structure stride. This value is a uint in bytes and must be a multiple of 4.
structCount
[in] The number of structures.

Remarks

The total storage for all g# must be <= the amount of shared memory available per thread group, which is 32kB, or 8192 32-bit scalars.

In an extreme case, you can declare 8192 total g# s, if each has a structByteStride of 4 and a structCount of 1.

In the opposite extreme, you can declare a single g# with a structure stride of 32kB and a structure count of 1.

This instruction applies to the following shader stages:

Vertex Hull Domain Geometry Pixel Compute
X

Minimum Shader Model

This instruction is supported in the following shader models:

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

Shader Model 5 Assembly (DirectX HLSL)