nir/lower_io: include the variable access in the lowered intrinsic

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13718>
This commit is contained in:
Lionel Landwerlin 2021-10-28 13:47:41 +03:00 committed by Marge Bot
parent 7661237a31
commit f98984ad13

View File

@ -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);