Skip to content

Document WebGPU subgroup-size-control capability - #1145

Open
mvaligursky wants to merge 2 commits into
mainfrom
mv-subgroup-size-control-docs
Open

Document WebGPU subgroup-size-control capability#1145
mvaligursky wants to merge 2 commits into
mainfrom
mv-subgroup-size-control-docs

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Important

Draft — do not merge until Engine 2.22 is released. The device.supportsSubgroupSizeControl capability, the CAPS_SUBGROUP_SIZE_CONTROL define, and the public device.minSubgroupSize / device.maxSubgroupSize properties ship in Engine 2.22 (playcanvas/engine#9158, merged to main). Mark ready for review once 2.22 is out.

Documents the WebGPU subgroup-size-control feature (new in Chrome 151/152) on the WGSL Capabilities page.

Changes:

  • Add a device.supportsSubgroupSizeControl entry to the WGSL language extensions list, following the author-written-directive pattern (like supportsStorageTextureRead): the engine advertises the capability but does not inject the enable line.
  • Add a compute example showing the #ifdef CAPS_SUBGROUP_SIZE_CONTROL guard, the author-written enable subgroup_size_control;, and the @subgroup_size(N) attribute.
  • Add a note on enable-directive ordering (all directives must precede declarations; place the author-written enable at the top of the chunk).
  • Document the device.minSubgroupSize / device.maxSubgroupSize bounds (previously undocumented) as the valid range for the pinned size.

@mvaligursky
mvaligursky marked this pull request as ready for review August 12, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant