Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SV_GroupID

Indices for which thread group a compute shader is executing in. The indices are to the whole group and not an individual thread. Possible values vary across the range passed as parameters to Dispatch. For example calling Dispatch(2,1,1) results in possible values of 0,0,0 and 1,0,0.

Defines the group offset within a Dispatch call, per dimension of the dispatch call.

Type

Type
uint3

 

Remarks

This system value is optional.

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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.