diff --git a/src/nouveau/compiler/nak/api.rs b/src/nouveau/compiler/nak/api.rs index fde6808054b..49436ae53ee 100644 --- a/src/nouveau/compiler/nak/api.rs +++ b/src/nouveau/compiler/nak/api.rs @@ -139,7 +139,6 @@ fn nir_options(dev: &nv_device_info) -> nir_shader_compiler_options { lower_unpack_snorm_4x8: true, lower_insert_byte: true, lower_insert_word: true, - lower_cs_local_index_to_id: true, lower_device_index_to_zero: true, lower_isign: true, lower_uadd_sat: dev.sm < 70, diff --git a/src/nouveau/vulkan/nvk_shader.c b/src/nouveau/vulkan/nvk_shader.c index 7e35791fa2d..9e63076d335 100644 --- a/src/nouveau/vulkan/nvk_shader.c +++ b/src/nouveau/vulkan/nvk_shader.c @@ -383,6 +383,7 @@ nvk_lower_nir(struct nvk_device *dev, nir_shader *nir, nir_lower_compute_system_values_options csv_options = { .has_base_workgroup_id = true, + .lower_local_invocation_index = mesa_shader_stage_is_compute(nir->info.stage), }; NIR_PASS(_, nir, nir_lower_compute_system_values, &csv_options); @@ -477,7 +478,10 @@ nvk_lower_nir(struct nvk_device *dev, nir_shader *nir, * nir_zero_initialize_shared_memory generates load_invocation_id which * has to be lowered to load_invocation_index. */ - NIR_PASS(_, nir, nir_lower_compute_system_values, NULL); + nir_lower_compute_system_values_options csv_options = { + .lower_local_invocation_index = mesa_shader_stage_is_compute(nir->info.stage), + }; + NIR_PASS(_, nir, nir_lower_compute_system_values, &csv_options); } }