Mesa (staging/21.3): nir/lower_io: include the variable access in the lowered intrinsic
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Dec 6 20:33:25 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 6f5832c3ebed7fa21ce38b05879c0c1ea02629d6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f5832c3ebed7fa21ce38b05879c0c1ea02629d6
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Thu Oct 28 13:47:41 2021 +0300
nir/lower_io: include the variable access in the lowered intrinsic
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13718>
(cherry picked from commit f98984ad1390098f2a5cf5d8770b35ad8fcf6d6a)
---
.pick_status.json | 2 +-
src/compiler/nir/nir_lower_io.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 47bedfb80ec..0a4d9a7040a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -355,7 +355,7 @@
"description": "nir/lower_io: include the variable access in the lowered intrinsic",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index faaa1d717c2..7c6e57130c5 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -306,6 +306,9 @@ emit_load(struct lower_io_state *state,
nir_intrinsic_set_range(load,
state->type_size(var->type, var->data.bindless));
+ if (nir_intrinsic_has_access(load))
+ nir_intrinsic_set_access(load, var->data.access);
+
nir_intrinsic_set_dest_type(load, dest_type);
if (load->intrinsic != nir_intrinsic_load_uniform) {
@@ -412,6 +415,9 @@ emit_store(struct lower_io_state *state, nir_ssa_def *data,
nir_intrinsic_set_write_mask(store, write_mask);
+ if (nir_intrinsic_has_access(store))
+ nir_intrinsic_set_access(store, var->data.access);
+
if (array_index)
store->src[1] = nir_src_for_ssa(array_index);
More information about the mesa-commit
mailing list