diff options
author | Jason Ekstrand <[email protected]> | 2018-08-16 15:11:12 -0500 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-08-29 14:04:02 -0500 |
commit | 3942943819a87ad423df56e3138223fc37f5db21 (patch) | |
tree | b99ea979073e479a25136d32d96846ee646ac24c /src/compiler/shader_enums.h | |
parent | 48e4fa7dd8c4b777989c4a731d6ac54cfe6c24eb (diff) |
nir: Use a bitfield for image access qualifiers
This commit expands the current memory access enum to contain the extra
two bits provided for images. We choose to follow the SPIR-V convention
of NonReadable and NonWriteable because readonly implies that you *can*
read so readonly + writeonly doesn't make as much sense as NonReadable +
NonWriteable.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/shader_enums.h')
-rw-r--r-- | src/compiler/shader_enums.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 5c36f55283c..f023b48cbb3 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -690,11 +690,13 @@ enum gl_frag_depth_layout /** * \brief Buffer access qualifiers */ -enum gl_buffer_access_qualifier +enum gl_access_qualifier { - ACCESS_COHERENT = 1, - ACCESS_RESTRICT = 2, - ACCESS_VOLATILE = 4, + ACCESS_COHERENT = (1 << 0), + ACCESS_RESTRICT = (1 << 1), + ACCESS_VOLATILE = (1 << 2), + ACCESS_NON_READABLE = (1 << 3), + ACCESS_NON_WRITEABLE = (1 << 4), }; /** |