glsl: Add ir_variable::interface_type field
[mesa.git] / src / glsl / ir.h
index 14212dfb7a276db9f0d0018da887a482d87a5a3f..ff47b3a5a80b00da9e20371dffceb834a49f3422 100644 (file)
@@ -354,7 +354,7 @@ public:
     */
    inline bool is_in_uniform_block() const
    {
-      return this->mode == ir_var_uniform && this->uniform_block != -1;
+      return this->mode == ir_var_uniform && this->interface_type != NULL;
    }
 
    /**
@@ -540,6 +540,14 @@ public:
     * objects.
     */
    ir_constant *constant_initializer;
+
+   /**
+    * For variables that are in an interface block or are an instance of an
+    * interface block, this is the \c GLSL_TYPE_INTERFACE type for that block.
+    *
+    * \sa ir_variable::location
+    */
+   const glsl_type *interface_type;
 };