diff options
author | Lionel Landwerlin <[email protected]> | 2019-05-16 13:03:39 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-07-29 10:23:45 +0200 |
commit | c45c624dce171bfe7b732abab10722638276e166 (patch) | |
tree | 5759d090087809ca045099746ec3e46511043689 /src/compiler | |
parent | 2098b48fa0b2909d1e02e2da35aaa7885a87e766 (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]>
(cherry picked from commit 8c330728f3094f2c836e022e57f003d0c82953ef)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <[email protected]>
Conflicts:
src/compiler/nir/nir.c
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 5c1e0e8a3b3..87a66d35b62 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -2032,6 +2032,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: \ @@ -2063,7 +2065,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, var->data.image.access); + 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], |