From e24d35a5b59ca1e75b69a32db6294787378a963f Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 5 Oct 2010 16:38:47 -0700 Subject: glsl: Wrap ast_type_qualifier contents in a struct in a union This will ease adding non-bit fields in the near future. --- src/glsl/ast.h | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'src/glsl/ast.h') diff --git a/src/glsl/ast.h b/src/glsl/ast.h index d7bf90925c..5fa932ec80 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -324,23 +324,28 @@ enum { }; struct ast_type_qualifier { - unsigned invariant:1; - unsigned constant:1; - unsigned attribute:1; - unsigned varying:1; - unsigned in:1; - unsigned out:1; - unsigned centroid:1; - unsigned uniform:1; - unsigned smooth:1; - unsigned flat:1; - unsigned noperspective:1; - - /** \name Layout qualifiers for GL_ARB_fragment_coord_conventions */ - /*@{*/ - unsigned origin_upper_left:1; - unsigned pixel_center_integer:1; - /*@}*/ + union { + struct { + unsigned invariant:1; + unsigned constant:1; + unsigned attribute:1; + unsigned varying:1; + unsigned in:1; + unsigned out:1; + unsigned centroid:1; + unsigned uniform:1; + unsigned smooth:1; + unsigned flat:1; + unsigned noperspective:1; + + /** \name Layout qualifiers for GL_ARB_fragment_coord_conventions */ + /*@{*/ + unsigned origin_upper_left:1; + unsigned pixel_center_integer:1; + /*@}*/ + } q; + unsigned i; + } flags; }; class ast_struct_specifier : public ast_node { -- cgit v1.2.3