From b9d7454571029ab330f28164fe6869f5e455ca90 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 1 Apr 2015 12:37:43 -0700 Subject: i965/nir: Run DCE again before going out of SSA We run lowering and optimization passes that might leave garbage lying around. This keeps the FS cse from having to clean it up. Reviewed-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 94641cf2ec1..4dfb4d693ae 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -163,6 +163,8 @@ fs_visitor::emit_nir_code() nir_validate_shader(nir); nir_copy_prop(nir); nir_validate_shader(nir); + nir_opt_dce(nir); + nir_validate_shader(nir); if (unlikely(debug_enabled)) { fprintf(stderr, "NIR (SSA form) for %s shader:\n", stage_name); -- cgit v1.2.3