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

@@ -377,11 +377,7 @@ typedef struct nir_variable {
* ARB_shader_image_load_store qualifiers.
*/
struct {
bool read_only; /**< "readonly" qualifier. */
bool write_only; /**< "writeonly" qualifier. */
bool coherent;
bool _volatile;
bool restrict_flag;
enum gl_access_qualifier access;
/** Image internal format if specified explicitly, otherwise GL_NONE. */
GLenum format;