aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-09 16:58:33 +0100
committermarha <marha@users.sourceforge.net>2011-11-09 16:58:33 +0100
commita8e5f06fe01732fbd643bc435dd3b8eaa602defe (patch)
treeb18cd9881bc5a6d317edca6c38fa912bade00802 /mesalib/src/glsl/ast.h
parent1ed503a856d9753a813951796bc6ba56c42ecd28 (diff)
downloadvcxsrv-a8e5f06fe01732fbd643bc435dd3b8eaa602defe.tar.gz
vcxsrv-a8e5f06fe01732fbd643bc435dd3b8eaa602defe.tar.bz2
vcxsrv-a8e5f06fe01732fbd643bc435dd3b8eaa602defe.zip
libX11 mesa pixman git update 9 nov 2011
Diffstat (limited to 'mesalib/src/glsl/ast.h')
-rw-r--r--mesalib/src/glsl/ast.h83
1 files changed, 79 insertions, 4 deletions
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h
index 9fe6c4125..d899bc62a 100644
--- a/mesalib/src/glsl/ast.h
+++ b/mesalib/src/glsl/ast.h
@@ -629,13 +629,78 @@ public:
class ast_case_label : public ast_node {
public:
+ ast_case_label(ast_expression *test_value);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
/**
- * An expression of NULL means 'default'.
+ * An test value of NULL means 'default'.
*/
- ast_expression *expression;
+ ast_expression *test_value;
+};
+
+
+class ast_case_label_list : public ast_node {
+public:
+ ast_case_label_list(void);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ /**
+ * A list of case labels.
+ */
+ exec_list labels;
};
+
+class ast_case_statement : public ast_node {
+public:
+ ast_case_statement(ast_case_label_list *labels);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_case_label_list *labels;
+
+ /**
+ * A list of statements.
+ */
+ exec_list stmts;
+};
+
+
+class ast_case_statement_list : public ast_node {
+public:
+ ast_case_statement_list(void);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ /**
+ * A list of cases.
+ */
+ exec_list cases;
+};
+
+
+class ast_switch_body : public ast_node {
+public:
+ ast_switch_body(ast_case_statement_list *stmts);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_case_statement_list *stmts;
+};
+
+
class ast_selection_statement : public ast_node {
public:
ast_selection_statement(ast_expression *condition,
@@ -654,8 +719,18 @@ public:
class ast_switch_statement : public ast_node {
public:
- ast_expression *expression;
- exec_list statements;
+ ast_switch_statement(ast_expression *test_expression,
+ ast_node *body);
+ virtual void print(void) const;
+
+ virtual ir_rvalue *hir(exec_list *instructions,
+ struct _mesa_glsl_parse_state *state);
+
+ ast_expression *test_expression;
+ ast_node *body;
+
+protected:
+ void test_to_hir(exec_list *, struct _mesa_glsl_parse_state *);
};
class ast_iteration_statement : public ast_node {