summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-11-02 21:21:25 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-11-03 17:06:48 -0800
commit0f037bd71ffe083c05cd0867ef54bce91ff84243 (patch)
tree908ef34ee16a2fb4c41c478d1602f82f4aee5111
parent4cb7546066f3f06b8030b8fce78f82469b0c6980 (diff)
nir: Properly invalidate metadata in nir_opt_copy_prop().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Cc: mesa-stable@lists.freedesktop.org
-rw-r--r--src/glsl/nir/nir_opt_copy_propagate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_copy_propagate.c b/src/glsl/nir/nir_opt_copy_propagate.c
index 96520f8a36..7d8bdd7f2c 100644
--- a/src/glsl/nir/nir_opt_copy_propagate.c
+++ b/src/glsl/nir/nir_opt_copy_propagate.c
@@ -262,6 +262,12 @@ nir_copy_prop_impl(nir_function_impl *impl)
bool progress = false;
nir_foreach_block(impl, copy_prop_block, &progress);
+
+ if (progress) {
+ nir_metadata_preserve(impl, nir_metadata_block_index |
+ nir_metadata_dominance);
+ }
+
return progress;
}