nir: Return progress from nir_lower_vars_to_ssa().
authorMatt Turner <mattst88@gmail.com>
Fri, 24 Feb 2017 23:22:54 +0000 (15:22 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 23 Mar 2017 21:34:43 +0000 (14:34 -0700)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_vars_to_ssa.c

index 1f918af725d655f5c20af91b89013a7b4f3cf85e..910352dba077883406ca35ed523640651d36e8c6 100644 (file)
@@ -2391,7 +2391,7 @@ bool nir_is_per_vertex_io(nir_variable *var, gl_shader_stage stage);
 void nir_lower_io_types(nir_shader *shader);
 void nir_lower_regs_to_ssa_impl(nir_function_impl *impl);
 void nir_lower_regs_to_ssa(nir_shader *shader);
-void nir_lower_vars_to_ssa(nir_shader *shader);
+bool nir_lower_vars_to_ssa(nir_shader *shader);
 
 bool nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes);
 bool nir_lower_constant_initializers(nir_shader *shader,
index 37a786cbacde60d9d09afd10aa285d4bc4757b1e..e5a12eb9713c115c33d62f91d59c431faa93ec5e 100644 (file)
@@ -737,11 +737,15 @@ nir_lower_vars_to_ssa_impl(nir_function_impl *impl)
    return progress;
 }
 
-void
+bool
 nir_lower_vars_to_ssa(nir_shader *shader)
 {
+   bool progress = false;
+
    nir_foreach_function(function, shader) {
       if (function->impl)
-         nir_lower_vars_to_ssa_impl(function->impl);
+         progress |= nir_lower_vars_to_ssa_impl(function->impl);
    }
+
+   return progress;
 }