diff options
author | Lionel Landwerlin <[email protected]> | 2019-05-16 13:03:39 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-07-26 14:09:55 +0000 |
commit | 8c330728f3094f2c836e022e57f003d0c82953ef (patch) | |
tree | 83e21acfecd226a7c9a808eae7220f1469208f6f /src | |
parent | 02ecf16a70bb32eaf8540c4625c568bd193020e4 (diff) |
nir: add access to image_deref intrinsics
SPIRV added the ability to access variables and have expressions non
dynamically uniform and because spirv_to_nir generates deref
instructions, we'll need to have that access there.
Signed-off-by: Lionel Landwerlin <[email protected]>
Cc: <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 0e2face3109..822c6ab5d27 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -2162,6 +2162,8 @@ void nir_rewrite_image_intrinsic(nir_intrinsic_instr *intrin, nir_ssa_def *src, bool bindless) { + enum gl_access_qualifier access = nir_intrinsic_access(intrin); + switch (intrin->intrinsic) { #define CASE(op) \ case nir_intrinsic_image_deref_##op: \ @@ -2193,6 +2195,7 @@ nir_rewrite_image_intrinsic(nir_intrinsic_instr *intrin, nir_ssa_def *src, nir_intrinsic_set_image_dim(intrin, glsl_get_sampler_dim(deref->type)); nir_intrinsic_set_image_array(intrin, glsl_sampler_type_is_array(deref->type)); + nir_intrinsic_set_access(intrin, access | var->data.image.access); nir_intrinsic_set_format(intrin, var->data.image.format); nir_instr_rewrite_src(&intrin->instr, &intrin->src[0], |