Mesa (main): nir/lower_io: include the variable access in the lowered intrinsic
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Dec 5 13:55:38 UTC 2021
Module: Mesa
Branch: main
Commit: f98984ad1390098f2a5cf5d8770b35ad8fcf6d6a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f98984ad1390098f2a5cf5d8770b35ad8fcf6d6a
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>
---
src/compiler/nir/nir_lower_io.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index e1b15647d9a..32cfbc2288c 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -312,6 +312,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) {
@@ -418,6 +421,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