[Mesa-dev] [PATCH 2/9] i965/nir: Optimize after nir_lower_var_copies().

Kenneth Graunke kenneth at whitecape.org
Mon Mar 9 01:58:52 PDT 2015


Array variable copy splitting generates a bunch of stuff we want to
clean up before proceeding.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: Jason Ekstrand <jason at jlekstrand.net>
---
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index 249e59c..fbdfc22 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -102,6 +102,9 @@ fs_visitor::emit_nir_code()
    nir_lower_var_copies(nir);
    nir_validate_shader(nir);
 
+   /* Get rid of split copies */
+   nir_optimize(nir);
+
    nir_lower_io(nir);
    nir_validate_shader(nir);
 
-- 
2.2.1



More information about the mesa-dev mailing list