glsl: Add image memory and layout qualifiers to ir_variable.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 23 Nov 2013 04:57:44 +0000 (20:57 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Feb 2014 17:44:04 +0000 (18:44 +0100)
v2: Add comment next to the read_only and write_only qualifier flags.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ir.cpp
src/glsl/ir.h

index 1a36bd631c18fe16f0a3f3ad6f61768cdb388be4..63dfa383a1d745b0694b1f2b4187e8b51d07739a 100644 (file)
@@ -1554,6 +1554,11 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
    this->data.max_array_access = 0;
    this->data.atomic.buffer_index = 0;
    this->data.atomic.offset = 0;
+   this->data.image.read_only = false;
+   this->data.image.write_only = false;
+   this->data.image.coherent = false;
+   this->data.image._volatile = false;
+   this->data.image._restrict = false;
 
    if (type != NULL) {
       if (type->base_type == GLSL_TYPE_SAMPLER)
index e266328b204e62a231eff8fda0f49c1c7680099f..39585731898bc106a2f0b8e49a58cd3d8c5e4737 100644 (file)
@@ -690,6 +690,20 @@ public:
          unsigned offset;
       } atomic;
 
+      /**
+       * ARB_shader_image_load_store qualifiers.
+       */
+      struct {
+         bool read_only; /**< "readonly" qualifier. */
+         bool write_only; /**< "writeonly" qualifier. */
+         bool coherent;
+         bool _volatile;
+         bool _restrict;
+
+         /** Image internal format if specified explicitly, otherwise GL_NONE. */
+         GLenum format;
+      } image;
+
       /**
        * Highest element accessed with a constant expression array index
        *