nvk: Call lower_compute_system_values after zer_initialize_workgroup_memory

Fixes: 184bcfdc1c ("nvk: Implement VK_KHR_zero_initialize_workgroup_memory")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27365>
This commit is contained in:
Faith Ekstrand
2024-01-30 11:35:26 -06:00
committed by Marge Bot
parent 1718980e85
commit ac11cb0f72

View File

@@ -401,6 +401,12 @@ nvk_lower_nir(struct nvk_device *dev, nir_shader *nir,
nir->info.shared_size = align(nir->info.shared_size, 16);
NIR_PASS(_, nir, nir_zero_initialize_shared_memory,
nir->info.shared_size, 16);
/* We need to call lower_compute_system_values again because
* 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);
}
}