projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i965/vec4: split VEC4_OPCODE_FROM_DOUBLE into one opcode per destination's type
[mesa.git]
/
src
/
compiler
/
glsl
/
ast.h
diff --git
a/src/compiler/glsl/ast.h
b/src/compiler/glsl/ast.h
index 7bbb58800a74ffc8466e93aebe9dcae36f7d6178..455cb8113cda9c5bba86ad7e3ca99ea1bf3621cd 100644
(file)
--- a/
src/compiler/glsl/ast.h
+++ b/
src/compiler/glsl/ast.h
@@
-22,7
+22,6
@@
* DEALINGS IN THE SOFTWARE.
*/
* DEALINGS IN THE SOFTWARE.
*/
-#pragma once
#ifndef AST_H
#define AST_H
#ifndef AST_H
#define AST_H
@@
-195,6
+194,8
@@
enum ast_operators {
ast_float_constant,
ast_bool_constant,
ast_double_constant,
ast_float_constant,
ast_bool_constant,
ast_double_constant,
+ ast_int64_constant,
+ ast_uint64_constant,
ast_sequence,
ast_aggregate
ast_sequence,
ast_aggregate
@@
-255,6
+256,8
@@
public:
unsigned uint_constant;
int bool_constant;
double double_constant;
unsigned uint_constant;
int bool_constant;
double double_constant;
+ uint64_t uint64_constant;
+ int64_t int64_constant;
} primary_expression;
} primary_expression;
@@
-377,8
+380,7
@@
public:
bool process_qualifier_constant(struct _mesa_glsl_parse_state *state,
const char *qual_indentifier,
bool process_qualifier_constant(struct _mesa_glsl_parse_state *state,
const char *qual_indentifier,
- unsigned *value, bool can_be_zero,
- bool must_match = false);
+ unsigned *value, bool can_be_zero);
void merge_qualifier(ast_layout_expression *l_expr)
{
void merge_qualifier(ast_layout_expression *l_expr)
{
@@
-460,6
+462,14
@@
enum {
ast_precision_low
};
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);
struct ast_type_qualifier {
DECLARE_RALLOC_CXX_OPERATORS(ast_type_qualifier);
@@
-525,10
+535,7
@@
struct ast_type_qualifier {
/** \name Layout qualifiers for GL_AMD_conservative_depth */
/** \{ */
/** \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 */
/** \} */
/** \name Layout qualifiers for GL_ARB_uniform_buffer_object */
@@
-599,13
+606,22
@@
struct ast_type_qualifier {
/** \name Qualifiers for GL_ARB_shader_subroutine */
/** \{ */
unsigned subroutine:1; /**< Is this marked 'subroutine' */
/** \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 */
/** \{ */
unsigned blend_support:1; /**< Are there any blend_support_ qualifiers */
/** \} */
/** \} */
/** \name Qualifiers for GL_KHR_blend_equation_advanced */
/** \{ */
unsigned blend_support:1; /**< Are there any blend_support_ qualifiers */
/** \} */
+
+ /**
+ * Flag set if GL_ARB_post_depth_coverage layout qualifier is used.
+ */
+ unsigned post_depth_coverage:1;
+ /**
+ * Flag set if GL_INTEL_conservartive_rasterization layout qualifier
+ * is used.
+ */
+ unsigned inner_coverage:1;
}
/** \brief Set of flags, accessed by name. */
q;
}
/** \brief Set of flags, accessed by name. */
q;
@@
-617,6
+633,9
@@
struct ast_type_qualifier {
/** Precision of the type (highp/medium/lowp). */
unsigned precision:2;
/** 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
*/
/**
* Alignment specified via GL_ARB_enhanced_layouts "align" layout qualifier
*/
@@
-695,7
+714,7
@@
struct ast_type_qualifier {
ast_layout_expression *local_size[3];
/** Tessellation evaluation shader: vertex spacing (equal, fractional even/odd) */
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;
/** Tessellation evaluation shader: vertex ordering (CW or CCW) */
GLenum ordering;
@@
-750,6
+769,11
@@
struct ast_type_qualifier {
*/
bool has_memory() const;
*/
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,
bool merge_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
const ast_type_qualifier &q,
@@
-767,7
+791,7
@@
struct ast_type_qualifier {
*/
bool merge_into_out_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
*/
bool merge_into_out_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- ast_node* &node
, bool create_node
);
+ ast_node* &node);
/**
* Validate current qualifier against the global in one.
/**
* Validate current qualifier against the global in one.
@@
-780,7
+804,13
@@
struct ast_type_qualifier {
*/
bool merge_into_in_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
*/
bool merge_into_in_qualifier(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
- ast_node* &node, bool create_node);
+ ast_node* &node);
+
+ /**
+ * Push pending layout qualifiers to the global values.
+ */
+ bool push_to_global(YYLTYPE *loc,
+ _mesa_glsl_parse_state *state);
bool validate_flags(YYLTYPE *loc,
_mesa_glsl_parse_state *state,
bool validate_flags(YYLTYPE *loc,
_mesa_glsl_parse_state *state,