summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_codegen.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-25 09:50:37 -0600
committerBrian Paul <[email protected]>2009-06-26 13:16:34 -0600
commitf652f15e6dad86bfc7a027978a9b67d00202259c (patch)
tree16464f48fe0f4420826d37720e58f3a9002880e8 /src/mesa/shader/slang/slang_codegen.h
parentdd453fa37c243a98ca2e2c76d3b396e2d294350e (diff)
glsl: rework loop nesting code
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.h')
-rw-r--r--src/mesa/shader/slang/slang_codegen.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h
index 64418d527b7..fb4fe64ace7 100644
--- a/src/mesa/shader/slang/slang_codegen.h
+++ b/src/mesa/shader/slang/slang_codegen.h
@@ -31,6 +31,9 @@
#include "slang_compile.h"
+#define MAX_LOOP_DEPTH 30
+
+
typedef struct slang_assemble_ctx_
{
slang_atom_pool *atoms;
@@ -40,8 +43,11 @@ typedef struct slang_assemble_ctx_
slang_var_table *vartable;
slang_info_log *log;
struct slang_label_ *curFuncEndLabel;
- const slang_operation *CurLoopOper;
- struct slang_ir_node_ *CurLoop;
+
+ const slang_operation *LoopOperStack[MAX_LOOP_DEPTH];
+ struct slang_ir_node_ *LoopIRStack[MAX_LOOP_DEPTH];
+ GLuint LoopDepth;
+
struct slang_function_ *CurFunction;
GLboolean UnresolvedRefs;
GLboolean EmitContReturn;