summaryrefslogtreecommitdiffstats
path: root/src/glsl/pp/sl_pp_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/pp/sl_pp_context.h')
-rw-r--r--src/glsl/pp/sl_pp_context.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/glsl/pp/sl_pp_context.h b/src/glsl/pp/sl_pp_context.h
index 983a09c02af..b5419bc056b 100644
--- a/src/glsl/pp/sl_pp_context.h
+++ b/src/glsl/pp/sl_pp_context.h
@@ -53,6 +53,15 @@ struct sl_pp_predefined {
int value;
};
+union sl_pp_if_state {
+ struct {
+ unsigned int condition:1;
+ unsigned int went_thru_else:1;
+ unsigned int had_true_cond:1;
+ } u;
+ unsigned int value;
+};
+
struct sl_pp_context {
char *cstr_pool;
unsigned int cstr_pool_max;
@@ -68,7 +77,7 @@ struct sl_pp_context {
struct sl_pp_predefined predefined[SL_PP_MAX_PREDEFINED];
unsigned int num_predefined;
- unsigned int if_stack[SL_PP_MAX_IF_NESTING];
+ union sl_pp_if_state if_stack[SL_PP_MAX_IF_NESTING];
unsigned int if_ptr;
unsigned int if_value;