mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 21:10:16 +01:00
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:
parent
1059613931
commit
73dcdc7a4e
2 changed files with 3 additions and 1 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue