From 7deb5ec0e89769382fb5dd86aa5305001ae413fa Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 26 Jul 2019 22:47:09 +0300 Subject: [PATCH] spirv: don't discard access set by vtn_pointer_dereference We can have a access flag already set here so just augment the existing ones. Signed-off-by: Lionel Landwerlin Fixes: 0fb61dfdeb ("spirv: propagate access qualifiers through ssa & pointer") Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/spirv/vtn_variables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index c73cbd3..d4e3cac 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -2510,7 +2510,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, struct vtn_pointer *ptr = vtn_pointer_dereference(b, base_val->pointer, chain); ptr->ptr_type = ptr_type; - ptr->access = access; + ptr->access |= access; vtn_push_value_pointer(b, w[2], ptr); } break; -- 2.7.4