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 <kenneth@whitecape.org>
This commit is contained in:
Jason Ekstrand
2018-08-16 15:11:12 -05:00
parent 48e4fa7dd8
commit 3942943819
9 changed files with 44 additions and 33 deletions

View File

@@ -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),
};
/**