LocalInvocationIndex(3)

# LocalInvocationIndex(3) Manual Page

## Name

LocalInvocationIndex - Linear local invocation index

## Description

`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

## See Also

No cross-references are available

## Document Notes

For more information, see the Vulkan Specification.

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0