-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When you use subgroups, you can often simplify code by assuming subgroup size == workgroup size
for any subgroup intrinsics. But subgroup size is defined by the HW you are executing on, so what you'd need to do is use a specialization constant to set your workgroup size. You can already do this in glsl since vulkan first released:
The built-in vector gl_WorkGroupSize can be specialized using special layout local_size_{xyz}_id's applied to the "in" qualifier. For example:
layout(local_size_x_id = 18, local_size_z_id = 19) in;
This leaves gl_WorkGroupSize.y as a non-specialization constant, with gl_WorkGroupSize being a partially specialized vector. Its x and z components can be later specialized using the ID's 18 and 19.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request