[Mesa-dev] [PATCH] glsl: Use the without_array predicate

Timothy Arceri t_arceri at yahoo.com.au
Thu Feb 19 11:57:44 PST 2015


---
 src/glsl/ir.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index a0f48b2..9c60b07 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -450,11 +450,8 @@ public:
     */
    inline bool is_interface_instance() const
    {
-      const glsl_type *const t = this->type;
-
-      return (t == this->interface_type)
-         || (t->is_array() && t->fields.array == this->interface_type);
-    }
+      return (this->type->without_array() == this->interface_type);
+   }
 
    /**
     * Set this->interface_type on a newly created variable.
-- 
2.1.0



More information about the mesa-dev mailing list