aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-01 08:04:11 +0200
committermarha <marha@users.sourceforge.net>2012-08-01 08:04:11 +0200
commit949282a6e80256ab56a1e95e484886873c7c0e4a (patch)
treed1102c4b3abd9dc93a2bf8808e498d10ba095390 /mesalib/src/glsl/ast.h
parent83da3ad0287bc51cd16ee6911fe73dc98ebe000b (diff)
parent49838240b7d4cff1ffed1bd91e495f6919061f90 (diff)
downloadvcxsrv-949282a6e80256ab56a1e95e484886873c7c0e4a.tar.gz
vcxsrv-949282a6e80256ab56a1e95e484886873c7c0e4a.tar.bz2
vcxsrv-949282a6e80256ab56a1e95e484886873c7c0e4a.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/ast.h')
-rw-r--r--mesalib/src/glsl/ast.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h
index 3c0a2b838..bba2481a0 100644
--- a/mesalib/src/glsl/ast.h
+++ b/mesalib/src/glsl/ast.h
@@ -342,6 +342,25 @@ enum {
};
struct ast_type_qualifier {
+ /* Callers of this ralloc-based new need not call delete. It's
+ * easier to just ralloc_free 'ctx' (or any of its ancestors). */
+ static void* operator new(size_t size, void *ctx)
+ {
+ void *node;
+
+ node = rzalloc_size(ctx, size);
+ assert(node != NULL);
+
+ return node;
+ }
+
+ /* If the user *does* call delete, that's OK, we will just
+ * ralloc_free in that case. */
+ static void operator delete(void *table)
+ {
+ ralloc_free(table);
+ }
+
union {
struct {
unsigned invariant:1;
@@ -428,6 +447,10 @@ struct ast_type_qualifier {
* returned string is undefined but not null.
*/
const char *interpolation_string() const;
+
+ bool merge_qualifier(YYLTYPE *loc,
+ _mesa_glsl_parse_state *state,
+ ast_type_qualifier q);
};
class ast_declarator_list;