From 41a8a3b0a077bf3da896fe501328acac17a63de5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 10 Mar 2022 11:16:03 -0500 Subject: [PATCH] lavapipe: run nir_opt_copy_prop_vars during optimization loop this enables better elimination of operations fixes: dEQP-VK.graphicsfuzz.spv-stable-mergesort-flatten-selection-dead-continues fixes #5458 cc: mesa-stable Reviewed-by: Dave Airlie Part-of: (cherry picked from commit cf5c32a4b2d839305ef2104ab0acf973e63b940a) --- .pick_status.json | 2 +- src/gallium/frontends/lavapipe/lvp_pipeline.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 0976440f1a3..d7a3baad239 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -751,7 +751,7 @@ "description": "lavapipe: run nir_opt_copy_prop_vars during optimization loop", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index f1bb2578671..c79d568188e 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -606,6 +606,8 @@ lvp_shader_compile_to_ir(struct lvp_pipeline *pipeline, NIR_PASS(progress, nir, nir_opt_deref); NIR_PASS(progress, nir, nir_lower_vars_to_ssa); + NIR_PASS(progress, nir, nir_opt_copy_prop_vars); + NIR_PASS(progress, nir, nir_copy_prop); NIR_PASS(progress, nir, nir_opt_dce); NIR_PASS(progress, nir, nir_opt_peephole_select, 8, true, true);