v144 · graphics
WebGPU: `subgroup_id` feature
Functionality added to the WebGPU spec after its first shipment in a browser.
concepts
-
subgroup_id
Adds subgroup_id as a WGSL built-in — lets compute shaders coordinate within subgroups (warp/wavefront) without ambient knowledge of the device.
-
Parallel Reduction
A WGSL parallel-reduction shader using subgroupAdd — the bread-and-butter primitive that subgroup_invocation_id and ballot enable.
-
Device Probe
Real adapter info from your GPU: vendor, architecture, subgroup size limits, supported subgroup features. Includes a visualisation of
subgroup_invocation_idacross a 64-thread workgroup. -
Subgroup Ballot Visualizer
Click invocations to toggle their vote and see
subgroupBallot()produce a live bitmask, with the elected invocation (subgroupElect()) highlighted. Adjust subgroup size between 8, 16, 32, and 64 lanes.
why it shipped
The `subgroup_id` and `num_subgroups` built-in values are now available when the subgroups extension is enabled.