nir: Introduce workgroup_index and ability to lower workgroup_id to it.
The workgroup_index is intended for situations when a 3 dimensional workgroup_id is not available on the HW, but a 1 dimensional index is. In this case, we can use lower the 3D ID to use this. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15103>
This commit is contained in:
@@ -264,6 +264,7 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr)
|
||||
assert(stage == MESA_SHADER_TESS_CTRL);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_workgroup_index:
|
||||
case nir_intrinsic_load_workgroup_id:
|
||||
assert(gl_shader_stage_uses_workgroup(stage));
|
||||
if (stage == MESA_SHADER_COMPUTE)
|
||||
|
Reference in New Issue
Block a user