X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fcompiler%2Fglsl%2Fast.h;h=455cb8113cda9c5bba86ad7e3ca99ea1bf3621cd;hb=6e3265eae533a1bff4f23a4508c5d8e9ab23164d;hp=0e32c36528e1439fe9e28db293527a671a6ba526;hpb=039d836d6ea5621ede88ff3504be841a6dd865c6;p=mesa.git diff --git a/src/compiler/glsl/ast.h b/src/compiler/glsl/ast.h index 0e32c36528e..455cb8113cd 100644 --- a/src/compiler/glsl/ast.h +++ b/src/compiler/glsl/ast.h @@ -22,7 +22,6 @@ * DEALINGS IN THE SOFTWARE. */ -#pragma once #ifndef AST_H #define AST_H @@ -195,6 +194,8 @@ enum ast_operators { ast_float_constant, ast_bool_constant, ast_double_constant, + ast_int64_constant, + ast_uint64_constant, ast_sequence, ast_aggregate @@ -255,6 +256,8 @@ public: unsigned uint_constant; int bool_constant; double double_constant; + uint64_t uint64_constant; + int64_t int64_constant; } primary_expression; @@ -459,6 +462,14 @@ enum { ast_precision_low }; +enum { + ast_depth_none = 0, /**< Absence of depth qualifier. */ + ast_depth_any, + ast_depth_greater, + ast_depth_less, + ast_depth_unchanged +}; + struct ast_type_qualifier { DECLARE_RALLOC_CXX_OPERATORS(ast_type_qualifier); @@ -524,10 +535,7 @@ struct ast_type_qualifier { /** \name Layout qualifiers for GL_AMD_conservative_depth */ /** \{ */ - unsigned depth_any:1; - unsigned depth_greater:1; - unsigned depth_less:1; - unsigned depth_unchanged:1; + unsigned depth_type:1; /** \} */ /** \name Layout qualifiers for GL_ARB_uniform_buffer_object */ @@ -598,7 +606,6 @@ struct ast_type_qualifier { /** \name Qualifiers for GL_ARB_shader_subroutine */ /** \{ */ unsigned subroutine:1; /**< Is this marked 'subroutine' */ - unsigned subroutine_def:1; /**< Is this marked 'subroutine' with a list of types */ /** \} */ /** \name Qualifiers for GL_KHR_blend_equation_advanced */ @@ -626,6 +633,9 @@ struct ast_type_qualifier { /** Precision of the type (highp/medium/lowp). */ unsigned precision:2; + /** Type of layout qualifiers for GL_AMD_conservative_depth. */ + unsigned depth_type:3; + /** * Alignment specified via GL_ARB_enhanced_layouts "align" layout qualifier */ @@ -704,7 +714,7 @@ struct ast_type_qualifier { ast_layout_expression *local_size[3]; /** Tessellation evaluation shader: vertex spacing (equal, fractional even/odd) */ - GLenum vertex_spacing; + enum gl_tess_spacing vertex_spacing; /** Tessellation evaluation shader: vertex ordering (CW or CCW) */ GLenum ordering; @@ -759,6 +769,11 @@ struct ast_type_qualifier { */ bool has_memory() const; + /** + * Return true if the qualifier is a subroutine declaration. + */ + bool is_subroutine_decl() const; + bool merge_qualifier(YYLTYPE *loc, _mesa_glsl_parse_state *state, const ast_type_qualifier &q,