[Mesa-dev] [PATCH 09/23] glsl: Exclude 'subroutine' from has_qualifier()

Dave Airlie airlied at gmail.com
Thu Apr 23 18:42:45 PDT 2015


From: Chris Forbes <chrisf at ijw.co.nz>

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/glsl/ast_type.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp
index b596cd5..74b1ab5 100644
--- a/src/glsl/ast_type.cpp
+++ b/src/glsl/ast_type.cpp
@@ -40,7 +40,12 @@ ast_type_specifier::print(void) const
 bool
 ast_fully_specified_type::has_qualifiers() const
 {
-   return this->qualifier.flags.i != 0;
+   /* 'subroutine' isnt a real qualifier. */
+   ast_type_qualifier subroutine_only;
+   subroutine_only.flags.i = 0;
+   subroutine_only.flags.q.subroutine = 1;
+
+   return (this->qualifier.flags.i & ~subroutine_only.flags.i) != 0;
 }
 
 bool ast_type_qualifier::has_interpolation() const
-- 
2.1.0



More information about the mesa-dev mailing list