intel/compiler: lower workgoup id to index only for mesh shaders

The compiler supports those intrinsics only for task/mesh shaders and it
never caused any issues, because the way `nir_lower_compute_system_values`
is doing its lowering.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26800>
This commit is contained in:
Karol Herbst
2023-12-22 21:51:16 +01:00
committed by Marge Bot
parent 3625a44dcc
commit 51f54cdec4
+1 -1
View File
@@ -119,7 +119,7 @@ compile_shader(struct anv_device *device,
nir_lower_compute_system_values_options options = {
.has_base_workgroup_id = true,
.lower_cs_local_id_to_index = true,
.lower_workgroup_id_to_index = true,
.lower_workgroup_id_to_index = gl_shader_stage_is_mesh(stage),
};
NIR_PASS_V(nir, nir_lower_compute_system_values, &options);
NIR_PASS_V(nir, nir_shader_intrinsics_pass, lower_base_workgroup_id,