nir: Initialize lower_flrp_progress everywhere
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 8 May 2019 14:32:43 +0000 (07:32 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 9 May 2019 17:03:51 +0000 (10:03 -0700)
I don't know why I thought NIR_PASS always set the progress variable.
Derp.

Fixes: d41cdef2a59 ("nir: Use the flrp lowering pass instead of nir_opt_algebraic")
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Coverity CID: 1444996
Coverity CID: 1444995
Coverity CID: 1444994
Coverity CID: 1444993
Coverity CID: 1444991
Coverity CID: 1444989

src/amd/vulkan/radv_shader.c
src/broadcom/compiler/nir_to_vir.c
src/gallium/drivers/panfrost/midgard/midgard_compile.c
src/gallium/drivers/radeonsi/si_shader_nir.c
src/gallium/drivers/vc4/vc4_program.c
src/mesa/state_tracker/st_glsl_to_nir.cpp

index a97ba3612e1b3b867cb82dbe33825f7eb060dfc4..f60daf6d03d3a0167f2f7578c92a8a383ccc81c6 100644 (file)
@@ -170,7 +170,7 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively,
                 NIR_PASS(progress, shader, nir_opt_algebraic);
 
                 if (lower_flrp != 0) {
-                        bool lower_flrp_progress;
+                        bool lower_flrp_progress = false;
                         NIR_PASS(lower_flrp_progress,
                                  shader,
                                  nir_lower_flrp,
index 3e82f61d6ea33790b280e779f7ab293427ec6aab..67747b14bb078e4a5fbdaea922e362aefe8ce3fc 100644 (file)
@@ -1322,7 +1322,7 @@ v3d_optimize_nir(struct nir_shader *s)
                 NIR_PASS(progress, s, nir_opt_constant_folding);
 
                 if (lower_flrp != 0) {
-                        bool lower_flrp_progress;
+                        bool lower_flrp_progress = false;
 
                         NIR_PASS(lower_flrp_progress, s, nir_lower_flrp,
                                  lower_flrp,
index 9c7928decf67bd1c7b6f1a667d8e99eb5587a93f..eaf473840ca7e92bc28fbfc0d1a9379187cfe5f7 100644 (file)
@@ -915,7 +915,7 @@ optimise_nir(nir_shader *nir)
                 NIR_PASS(progress, nir, nir_opt_constant_folding);
 
                 if (lower_flrp != 0) {
-                        bool lower_flrp_progress;
+                        bool lower_flrp_progress = false;
                         NIR_PASS(lower_flrp_progress,
                                  nir,
                                  nir_lower_flrp,
index febd0e49a2c0aca10de595e57fa6b05368b34ad0..8468ae90dde658de50ad8050fc2b077b606c8f47 100644 (file)
@@ -850,7 +850,7 @@ si_nir_opts(struct nir_shader *nir)
                NIR_PASS(progress, nir, nir_opt_constant_folding);
 
                if (lower_flrp != 0) {
-                       bool lower_flrp_progress;
+                       bool lower_flrp_progress = false;
 
                        NIR_PASS(lower_flrp_progress, nir, nir_lower_flrp,
                                 lower_flrp,
index a2af55d642107b3953f25d673024b6ab342b4981..456af3a33d2ccc13f2cda84de07db3ded320ef0a 100644 (file)
@@ -1547,7 +1547,7 @@ vc4_optimize_nir(struct nir_shader *s)
                 NIR_PASS(progress, s, nir_opt_algebraic);
                 NIR_PASS(progress, s, nir_opt_constant_folding);
                 if (lower_flrp != 0) {
-                        bool lower_flrp_progress;
+                        bool lower_flrp_progress = false;
 
                         NIR_PASS(lower_flrp_progress, s, nir_lower_flrp,
                                  lower_flrp,
index 0a67d4532eba88302630128c0609a27d70d95bbf..57064251313c2dc23a40e953ca9f9485717926cf 100644 (file)
@@ -338,7 +338,7 @@ st_nir_opts(nir_shader *nir, bool scalar)
       NIR_PASS(progress, nir, nir_opt_constant_folding);
 
       if (lower_flrp != 0) {
-         bool lower_flrp_progress;
+         bool lower_flrp_progress = false;
 
          NIR_PASS(lower_flrp_progress, nir, nir_lower_flrp,
                   lower_flrp,