Skip to content

Commit

Permalink
Consider subgroup_size used in compute stage uniform (gpuweb#4652)
Browse files Browse the repository at this point in the history
subgroup_size built-in variable should be considered uniform for uniformity analysis when used in compute stage uniform.
  • Loading branch information
jiangzhaoming authored May 27, 2024
1 parent e8430a9 commit 0bfb5ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proposals/subgroups.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Some possibilities:
| `subgroup_size` | u32 | Input | The size of the current subgroup |
| `subgroup_invocation_id` | u32 | Input | The index of the invocation in the current subgroup |

When used in `compute` shader stage, `subgroup_size` should be considered uniform for uniformity analysis.

Note: HLSL does not expose a subgroup_id or num_subgroups equivalent.

**TODO**: Can subgroup_id and/or num_subgroups be emulated efficiently and portably?
Expand Down

0 comments on commit 0bfb5ca

Please sign in to comment.