aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-06 08:19:53 +0100
committermarha <marha@users.sourceforge.net>2012-02-06 08:19:53 +0100
commitada3d2c30b5a7a1a79e128b7326d50c3bab77a8a (patch)
tree30539a1a7c6b011c3a5d8028d7428a1ad2b07546 /mesalib/src/glsl/glsl_parser_extras.h
parent58ff764d4111bfaa7360c57bc62dd620fbdce06f (diff)
downloadvcxsrv-ada3d2c30b5a7a1a79e128b7326d50c3bab77a8a.tar.gz
vcxsrv-ada3d2c30b5a7a1a79e128b7326d50c3bab77a8a.tar.bz2
vcxsrv-ada3d2c30b5a7a1a79e128b7326d50c3bab77a8a.zip
mesa git update 6 feb 2012
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.h')
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index dd932951f..ee8f71b82 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -42,6 +42,20 @@ enum _mesa_glsl_parser_targets {
struct gl_context;
+struct glsl_switch_state {
+ /** Temporary variables needed for switch statement. */
+ ir_variable *test_var;
+ ir_variable *is_fallthru_var;
+ ir_variable *is_break_var;
+ class ast_switch_statement *switch_nesting_ast;
+
+ /** Table of constant values already used in case labels */
+ struct hash_table *labels_ht;
+ class ast_case_label *previous_default;
+
+ bool is_switch_innermost; // if switch stmt is closest to break, ...
+};
+
struct _mesa_glsl_parse_state {
_mesa_glsl_parse_state(struct gl_context *ctx, GLenum target,
void *mem_ctx);
@@ -150,13 +164,8 @@ struct _mesa_glsl_parse_state {
/** Loop or switch statement containing the current instructions. */
class ast_iteration_statement *loop_nesting_ast;
- class ast_switch_statement *switch_nesting_ast;
- bool is_switch_innermost; // if switch stmt is closest to break, ...
- /** Temporary variables needed for switch statement. */
- ir_variable *test_var;
- ir_variable *is_fallthru_var;
- ir_variable *is_break_var;
+ struct glsl_switch_state switch_state;
/** List of structures defined in user code. */
const glsl_type **user_structures;