Mesa (main): r600/sfn: legalize image access on Cayman
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 18 20:31:05 UTC 2021
Module: Mesa
Branch: main
Commit: ed595c1785dd229e53ce4cc256d0b61852aa6a50
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed595c1785dd229e53ce4cc256d0b61852aa6a50
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Sun May 9 19:14:16 2021 +0200
r600/sfn: legalize image access on Cayman
This, seems to avoid hardware resets with the
ARB_shader_image_load_store-invalid
piglit.
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10608>
---
src/gallium/drivers/r600/sfn/sfn_nir.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/drivers/r600/sfn/sfn_nir.cpp b/src/gallium/drivers/r600/sfn/sfn_nir.cpp
index 275df7a73e0..60c710a5884 100644
--- a/src/gallium/drivers/r600/sfn/sfn_nir.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_nir.cpp
@@ -863,6 +863,12 @@ int r600_shader_from_nir(struct r600_context *rctx,
r600::sort_uniforms(sel->nir);
+ /* Cayman seems very crashy about accessing images that don't exists or are
+ * accessed out of range, this lowering seems to help (but it can also be
+ * another problem */
+ if (sel->nir->info.num_images > 0 && rctx->b.chip_class == CAYMAN)
+ NIR_PASS_V(sel->nir, r600_legalize_image_load_store);
+
NIR_PASS_V(sel->nir, nir_lower_vars_to_ssa);
NIR_PASS_V(sel->nir, nir_lower_regs_to_ssa);
nir_lower_idiv_options idiv_options = {
More information about the mesa-commit
mailing list