Mesa (master): st/mesa: fix nir_lower_io if it's done right after IO vectorization
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 13 05:32:53 UTC 2021
Module: Mesa
Branch: master
Commit: a0718e897768c847c9ca9e5a02e8ff8f46845102
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0718e897768c847c9ca9e5a02e8ff8f46845102
Author: Marek Olšák <marek.olsak at amd.com>
Date: Mon Feb 8 06:06:24 2021 -0500
st/mesa: fix nir_lower_io if it's done right after IO vectorization
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9050>
---
src/mesa/state_tracker/st_glsl_to_nir.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 164304e0765..92d021e52fc 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -597,6 +597,13 @@ st_nir_vectorize_io(nir_shader *producer, nir_shader *consumer)
NIR_PASS_V(producer, nir_split_var_copies);
NIR_PASS_V(producer, nir_lower_var_copies);
}
+
+ /* Undef scalar store_deref intrinsics are not ignored by nir_lower_io,
+ * so they must be removed before that. These passes remove them.
+ */
+ NIR_PASS_V(producer, nir_lower_vars_to_ssa);
+ NIR_PASS_V(producer, nir_opt_undef);
+ NIR_PASS_V(producer, nir_opt_dce);
}
static void
More information about the mesa-commit
mailing list