@builtin("subgroup_id")
On this page

@builtin("subgroup_id")

Builtin value

The current subgroup's index within its workgroup.

Valid in
compute input

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

Syntax

@builtin("subgroup_id"): u32

Description

Compute stage only; on the CPU oracle and on WebGL2 a subgroup is one invocation, so it is the local invocation index.

Examples

See also

Edit this page Report a problem