Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SV_GroupThreadID

Indices for which an individual thread within a thread group a compute shader is executing in. SV_GroupThreadID varies across the range specified for the compute shader in the numthreads attribute. For example if numthreads(3,2,1) was specified possible values for the SV_GroupThreadID input value have this range of values (0-2,0-1,0).

Type

Type
uint3

 

Remarks

This system value is optional, and is always within the bounds of the values passed into the numthreads attribute.

The following illustration shows the relationship between the parameters passed to Dispatch, Dispatch(5,3,2), the values specified in the numthreads attribute, numthreads(10,8,3), and values that will passed to the compute shader for the thread-related system values (SV_GroupIndex,SV_DispatchThreadID,SV_GroupThreadID,SV_GroupID).

Illustration of the relationship between Dispatch, thread groups, and threads

This function is supported in the following types of shaders:

VertexHullDomainGeometryPixelCompute
x

 

See also

Shader Model 5

 

 

Community Additions

Show:
© 2014 Microsoft