SPIR-V Built-In
LocalInvocationIndex
Linear local invocation index
LocalInvocationIndex
Decorating a variable with the LocalInvocationIndex built-in decoration
will make that variable contain a one-dimensional representation of
LocalInvocationId.
This is computed as:
LocalInvocationIndex =
LocalInvocationId.z * WorkgroupSize.x * WorkgroupSize.y +
LocalInvocationId.y * WorkgroupSize.x +
LocalInvocationId.x;
Valid Usage
VUID-LocalInvocationIndex-LocalInvocationIndex-04284
The LocalInvocationIndex decoration must be used only within the
GLCompute, MeshEXT, TaskEXT, MeshNV, or TaskNV
Execution Model
VUID-LocalInvocationIndex-LocalInvocationIndex-04285
The variable decorated with LocalInvocationIndex must be declared
using the Input Storage Class
VUID-LocalInvocationIndex-LocalInvocationIndex-04286
The variable decorated with LocalInvocationIndex must be declared
as a scalar 32-bit integer value