diff options
author | Jason Ekstrand <[email protected]> | 2019-03-04 13:04:45 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-03-25 16:12:09 -0500 |
commit | e50ab2c0f23c0c12dd8f50b5d3cecb811a332779 (patch) | |
tree | 1be36e5426163765dced6a8b3960d3439f876c0c /src/compiler/nir/nir_lower_io.c | |
parent | 40074ebf743326a1b8ca3be36512db0978de6aac (diff) |
nir: Add access flags to deref and SSBO atomics
We will need them for a new ACCESS_NON_UNIFORM flag that's about to be
added in the next commit.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_io.c')
-rw-r--r-- | src/compiler/nir/nir_lower_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index d39567ff1d1..98e2afe76ea 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -863,6 +863,12 @@ build_explicit_io_atomic(nir_builder *b, nir_intrinsic_instr *intrin, atomic->src[src++] = nir_src_for_ssa(intrin->src[1 + i].ssa); } + /* Global atomics don't have access flags because they assume that the + * address may be non-uniform. + */ + if (!addr_format_is_global(addr_format)) + nir_intrinsic_set_access(atomic, nir_intrinsic_access(intrin)); + assert(intrin->dest.ssa.num_components == 1); nir_ssa_dest_init(&atomic->instr, &atomic->dest, 1, intrin->dest.ssa.bit_size, intrin->dest.ssa.name); |