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>
(cherry picked from commit e465ac2561
)
This commit is contained in:

committed by
Eric Engestrom

parent
eb965b58cb
commit
14277e0746
@@ -274,7 +274,7 @@
|
||||
"description": "nir/lower_shader_calls: remove CF before nir_opt_if",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -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