aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 11:33:12 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 11:33:12 +0200
commitd79e641dea89c0d5d651b11971c4c9e14df34629 (patch)
tree59d636ef9c4c21906ea28ac719589f25b9794d0a /mesalib/src/glsl/ast.h
parentbf59764a4685c4bef029eddfa75d7496d2a91ae0 (diff)
parentc6f80401dc533b04341afe8d596960d1bc25efce (diff)
downloadvcxsrv-d79e641dea89c0d5d651b11971c4c9e14df34629.tar.gz
vcxsrv-d79e641dea89c0d5d651b11971c4c9e14df34629.tar.bz2
vcxsrv-d79e641dea89c0d5d651b11971c4c9e14df34629.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/os/log.c
Diffstat (limited to 'mesalib/src/glsl/ast.h')
-rw-r--r--mesalib/src/glsl/ast.h82
1 files changed, 10 insertions, 72 deletions
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h
index 93d36bf34..8439ed961 100644
--- a/mesalib/src/glsl/ast.h
+++ b/mesalib/src/glsl/ast.h
@@ -210,7 +210,7 @@ public:
subexpressions[0] = NULL;
subexpressions[1] = NULL;
subexpressions[2] = NULL;
- primary_expression.identifier = (char *) identifier;
+ primary_expression.identifier = identifier;
this->non_lvalue_description = NULL;
}
@@ -226,7 +226,7 @@ public:
ast_expression *subexpressions[3];
union {
- char *identifier;
+ const char *identifier;
int int_constant;
float float_constant;
unsigned uint_constant;
@@ -321,11 +321,11 @@ public:
class ast_declaration : public ast_node {
public:
- ast_declaration(char *identifier, int is_array, ast_expression *array_size,
+ ast_declaration(const char *identifier, int is_array, ast_expression *array_size,
ast_expression *initializer);
virtual void print(void) const;
- char *identifier;
+ const char *identifier;
int is_array;
ast_expression *array_size;
@@ -411,83 +411,23 @@ struct ast_type_qualifier {
class ast_struct_specifier : public ast_node {
public:
- ast_struct_specifier(char *identifier, ast_node *declarator_list);
+ ast_struct_specifier(const char *identifier, ast_node *declarator_list);
virtual void print(void) const;
virtual ir_rvalue *hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state);
- char *name;
+ const char *name;
exec_list declarations;
};
-enum ast_types {
- ast_void,
- ast_float,
- ast_int,
- ast_uint,
- ast_bool,
- ast_vec2,
- ast_vec3,
- ast_vec4,
- ast_bvec2,
- ast_bvec3,
- ast_bvec4,
- ast_ivec2,
- ast_ivec3,
- ast_ivec4,
- ast_uvec2,
- ast_uvec3,
- ast_uvec4,
- ast_mat2,
- ast_mat2x3,
- ast_mat2x4,
- ast_mat3x2,
- ast_mat3,
- ast_mat3x4,
- ast_mat4x2,
- ast_mat4x3,
- ast_mat4,
- ast_sampler1d,
- ast_sampler2d,
- ast_sampler2drect,
- ast_sampler3d,
- ast_samplercube,
- ast_samplerexternaloes,
- ast_sampler1dshadow,
- ast_sampler2dshadow,
- ast_sampler2drectshadow,
- ast_samplercubeshadow,
- ast_sampler1darray,
- ast_sampler2darray,
- ast_sampler1darrayshadow,
- ast_sampler2darrayshadow,
- ast_isampler1d,
- ast_isampler2d,
- ast_isampler3d,
- ast_isamplercube,
- ast_isampler1darray,
- ast_isampler2darray,
- ast_usampler1d,
- ast_usampler2d,
- ast_usampler3d,
- ast_usamplercube,
- ast_usampler1darray,
- ast_usampler2darray,
-
- ast_struct,
- ast_type_name
-};
-
class ast_type_specifier : public ast_node {
public:
- ast_type_specifier(int specifier);
-
/** Construct a type specifier from a type name */
ast_type_specifier(const char *name)
- : type_specifier(ast_type_name), type_name(name), structure(NULL),
+ : type_name(name), structure(NULL),
is_array(false), array_size(NULL), precision(ast_precision_none),
is_precision_statement(false)
{
@@ -496,7 +436,7 @@ public:
/** Construct a type specifier from a structure definition */
ast_type_specifier(ast_struct_specifier *s)
- : type_specifier(ast_struct), type_name(s->name), structure(s),
+ : type_name(s->name), structure(s),
is_array(false), array_size(NULL), precision(ast_precision_none),
is_precision_statement(false)
{
@@ -511,8 +451,6 @@ public:
ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *);
- enum ast_types type_specifier;
-
const char *type_name;
ast_struct_specifier *structure;
@@ -572,7 +510,7 @@ public:
struct _mesa_glsl_parse_state *state);
ast_fully_specified_type *type;
- char *identifier;
+ const char *identifier;
int is_array;
ast_expression *array_size;
@@ -603,7 +541,7 @@ public:
struct _mesa_glsl_parse_state *state);
ast_fully_specified_type *return_type;
- char *identifier;
+ const char *identifier;
exec_list parameters;