i965/nir: Move the other lowering passes to before out-of-SSA
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 16 Dec 2014 00:12:04 +0000 (16:12 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:20:22 +0000 (07:20 -0800)
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index 0fed8a1f1b36af99faae0ef7dd711b60de61bfce..c218b722f8d1be95193e38a4cb3ba442eae0cfc9 100644 (file)
@@ -69,6 +69,12 @@ fs_visitor::emit_nir_code()
    nir_remove_dead_variables(nir);
    nir_validate_shader(nir);
 
+   nir_lower_samplers(nir, shader_prog, shader->base.Program);
+   nir_validate_shader(nir);
+
+   nir_lower_system_values(nir);
+   nir_validate_shader(nir);
+
    nir_lower_atomics(nir);
    nir_validate_shader(nir);
 
@@ -81,12 +87,6 @@ fs_visitor::emit_nir_code()
    nir_lower_vec_to_movs(nir);
    nir_validate_shader(nir);
 
-   nir_lower_samplers(nir, shader_prog, shader->base.Program);
-   nir_validate_shader(nir);
-
-   nir_lower_system_values(nir);
-   nir_validate_shader(nir);
-
    /* emit the arrays used for inputs and outputs - load/store intrinsics will
     * be converted to reads/writes of these arrays
     */