You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<tr><td>gl_WorkGroupID</td><td>UVec3</td><td>ID of the current workgroup [0..gl_NumWorkGroups)</td></tr>
156
+
<tr><td>gl_WorkGroupSize</td><td>UVec3</td><td>Size of the workgroup (x, y, z)</td></tr>
157
+
<tr><td>gl_NumWorkGroups</td><td>UVec3</td><td>Total number of workgroups (x, y, z)</td></tr>
158
+
<tr><td>gl_NumSubgroups</td><td>uint32</td><td>Number of subgroups in the workgroup</td></tr>
159
+
<tr><td>gl_SubgroupID</td><td>uint32</td><td>ID of the current subgroup [0..gl_NumSubgroups)</td></tr>
160
+
<tr><td>gl_GlobalInvocationID</td><td>UVec3</td><td>Global ID of the current invocation [0..gl_NumWorkGroups * gl_WorkGroupSize)</td></tr>
161
+
<tr><td>gl_LocalInvocationID</td><td>UVec3</td><td>Local ID within the workgroup [0..gl_WorkGroupSize)</td></tr>
162
+
<tr><td>gl_SubgroupSize</td><td>uint32</td><td>Size of subgroups (constant across all subgroups)</td></tr>
163
+
<tr><td>gl_SubgroupInvocationID</td><td>uint32</td><td>ID of the invocation within the subgroup [0..gl_SubgroupSize)</td></tr>
164
+
<tr><td>gl_SubgroupEqMask</td><td>UVec4</td><td>Mask with bit set only at current invocation's index</td></tr>
165
+
<tr><td>gl_SubgroupGeMask</td><td>UVec4</td><td>Mask with bits set at and above current invocation's index</td></tr>
166
+
<tr><td>gl_SubgroupGtMask</td><td>UVec4</td><td>Mask with bits set above current invocation's index</td></tr>
167
+
<tr><td>gl_SubgroupLeMask</td><td>UVec4</td><td>Mask with bits set at and below current invocation's index</td></tr>
168
+
<tr><td>gl_SubgroupLtMask</td><td>UVec4</td><td>Mask with bits set below current invocation's index</td></tr>
169
+
</table>
153
170
<h2><aclass="toc-backref" id="cuda-to-glsl-translation-table" href="#cuda-to-glsl-translation-table">CUDA to GLSL Translation Table</a></h2><tableborder="1" class="docutils"><tr><th>CUDA Concept</th><th>GLSL Equivalent</th><th>Description</th></tr>
154
171
<tr><td><ttclass="docutils literal"><spanclass="pre"><spanclass="Identifier">blockDim</span></span></tt></td><td><ttclass="docutils literal"><spanclass="pre"><spanclass="Identifier">gl_WorkGroupSize</span></span></tt></td><td>The size of a thread block (CUDA) or work group (GLSL)</td></tr>
155
172
<tr><td><ttclass="docutils literal"><spanclass="pre"><spanclass="Identifier">gridDim</span></span></tt></td><td><ttclass="docutils literal"><spanclass="pre"><spanclass="Identifier">gl_NumWorkGroups</span></span></tt></td><td>The size of the grid (CUDA) or the number of work groups (GLSL)</td></tr>
0 commit comments