SPIR-V Built-In

GlobalInvocationId

Global invocation ID
GlobalInvocationId

Decorating a variable with the GlobalInvocationId built-in decoration will make that variable contain the location of the current invocation within the global workgroup. Each component is equal to the index of the local workgroup multiplied by the size of the local workgroup plus LocalInvocationId.

Valid Usage

VUID-GlobalInvocationId-GlobalInvocationId-04236

The GlobalInvocationId decoration must be used only within the GLCompute, MeshEXT, TaskEXT, MeshNV, or TaskNV

Execution Model

VUID-GlobalInvocationId-GlobalInvocationId-04237

The variable decorated with GlobalInvocationId must be declared using the Input Storage Class

VUID-GlobalInvocationId-GlobalInvocationId-04238

The variable decorated with GlobalInvocationId must be declared as a three-component vector of 32-bit integer values