nir/lower_shader_calls: remove CF before nir_opt_if
Otherwise, opt_if_simplification() can attempt to insert an inot after a jump. Fixes RADV compilation of a Cyberpunk 2077 pipeline with PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27193>
This commit is contained in:
@@ -2050,6 +2050,8 @@ nir_lower_shader_calls(nir_shader *shader,
|
||||
for (unsigned i = 0; i < num_calls; i++) {
|
||||
nir_instr *resume_instr = lower_resume(resume_shaders[i], i);
|
||||
replace_resume_with_halt(resume_shaders[i], resume_instr);
|
||||
/* Remove CF after halt before nir_opt_if(). */
|
||||
nir_opt_dead_cf(resume_shaders[i]);
|
||||
/* Remove the dummy blocks added by flatten_resume_if_ladder() */
|
||||
nir_opt_if(resume_shaders[i], nir_opt_if_optimize_phi_true_false);
|
||||
nir_opt_dce(resume_shaders[i]);
|
||||
|
Reference in New Issue
Block a user