From 013ee5732b73c33379007c3ff31b238aa088a800 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 28 Nov 2018 13:44:56 -0600 Subject: [PATCH] nir/intrinsics: Add access flags to load/store_deref MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro Piñeiro Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir/nir.h | 2 +- src/compiler/nir/nir_intrinsics.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 0042f803eb2..29b4da22330 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1262,7 +1262,7 @@ typedef enum { NIR_INTRINSIC_FORMAT = 15, /** - * Access qualifiers for image intrinsics + * Access qualifiers for image and memory access intrinsics */ NIR_INTRINSIC_ACCESS = 16, diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_intrinsics.py index 24bcd6bb169..e449764492d 100644 --- a/src/compiler/nir/nir_intrinsics.py +++ b/src/compiler/nir/nir_intrinsics.py @@ -105,7 +105,7 @@ PARAM_IDX = "NIR_INTRINSIC_PARAM_IDX" IMAGE_DIM = "NIR_INTRINSIC_IMAGE_DIM" # Non-zero if we are accessing an array image IMAGE_ARRAY = "NIR_INTRINSIC_IMAGE_ARRAY" -# Access qualifiers for image intrinsics +# Access qualifiers for image and memory access intrinsics ACCESS = "NIR_INTRINSIC_ACCESS" # Image format for image intrinsics FORMAT = "NIR_INTRINSIC_FORMAT" @@ -132,8 +132,9 @@ intrinsic("nop", flags=[CAN_ELIMINATE]) intrinsic("load_param", dest_comp=0, indices=[PARAM_IDX], flags=[CAN_ELIMINATE]) -intrinsic("load_deref", dest_comp=0, src_comp=[-1], flags=[CAN_ELIMINATE]) -intrinsic("store_deref", src_comp=[-1, 0], indices=[WRMASK]) +intrinsic("load_deref", dest_comp=0, src_comp=[-1], + indices=[ACCESS], flags=[CAN_ELIMINATE]) +intrinsic("store_deref", src_comp=[-1, 0], indices=[WRMASK, ACCESS]) intrinsic("copy_deref", src_comp=[-1, -1]) # Interpolation of input. The interp_deref_at* intrinsics are similar to the -- 2.30.2