nir/lower_shader_calls: run opt_cse after lower stack intrinsics

In particular when using scratch_base_ptr

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16556>
This commit is contained in:
Lionel Landwerlin 2022-10-20 11:53:15 +03:00 committed by Marge Bot
parent 3c242e551d
commit 29da1c8253

View file

@ -1884,9 +1884,11 @@ nir_lower_shader_calls(nir_shader *shader,
}
NIR_PASS_V(shader, nir_lower_stack_to_scratch, options->address_format);
nir_opt_cse(shader);
for (unsigned i = 0; i < num_calls; i++) {
NIR_PASS_V(resume_shaders[i], nir_lower_stack_to_scratch,
options->address_format);
nir_opt_cse(resume_shaders[i]);
}
*resume_shaders_out = resume_shaders;