nir: Call nir_metadata_preserve from nir_lower_alu_to_scalar().
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 13 Sep 2016 22:17:29 +0000 (15:17 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 14 Sep 2016 19:01:39 +0000 (12:01 -0700)
This is mandatory.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir_lower_alu_to_scalar.c

index 4f72cf7eb3297e4b8cf1856a22d95f6ebac6dacc..a84fbdfd32be768a9921edd243c2c1de58fb6219 100644 (file)
@@ -254,6 +254,9 @@ nir_lower_alu_to_scalar_impl(nir_function_impl *impl)
             lower_alu_instr_scalar(nir_instr_as_alu(instr), &builder);
       }
    }
+
+   nir_metadata_preserve(impl, nir_metadata_block_index |
+                               nir_metadata_dominance);
 }
 
 void