Mesa (master): glsl: Use the without_array predicate

Timothy Arceri tarceri at kemper.freedesktop.org
Fri Feb 20 05:11:35 UTC 2015


Module: Mesa
Branch: master
Commit: 9acb011a3e73676ada04df01832c930acf51a9a2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9acb011a3e73676ada04df01832c930acf51a9a2

Author: Timothy Arceri <t_arceri at yahoo.com.au>
Date:   Thu Feb 19 21:32:21 2015 +1100

glsl: Use the without_array predicate

Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 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 ce35b2b..25f2eca 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.




More information about the mesa-commit mailing list