From 49838240b7d4cff1ffed1bd91e495f6919061f90 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 1 Aug 2012 08:02:35 +0200 Subject: git mesa update 1 Aug 2012 --- mesalib/src/glsl/ast.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'mesalib/src/glsl/ast.h') diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h index de3f2dfeb..50747822d 100644 --- a/mesalib/src/glsl/ast.h +++ b/mesalib/src/glsl/ast.h @@ -338,6 +338,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; @@ -424,6 +443,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; -- cgit v1.2.3