Try declaring aL in the for loop instead of globally.
--- a/mojoshader.c Sat Apr 05 18:55:23 2008 -0400
+++ b/mojoshader.c Sat Apr 05 18:57:29 2008 -0400
@@ -1669,8 +1669,8 @@
output_line(ctx, "vec4 r%d;", regnum);
break;
case REG_TYPE_LOOP:
- output_line(ctx, "ivec4 aL;");
- break;
+ //output_line(ctx, "int aL;");
+ break; // no-op. We declare these in for loops at the moment.
case REG_TYPE_LABEL:
break; // no-op. If we see it here, it means we optimized it out.
default:
@@ -2173,7 +2173,7 @@
static void emit_GLSL_LOOP(Context *ctx)
{
//fail(ctx, "unimplemented."); // !!! FIXME
- output_line(ctx, "for (BLAH, BLAH, BLAH) {");
+ output_line(ctx, "for (int aL = BLAH, BLAH, BLAH) {");
ctx->indent++;
} // emit_GLSL_LOOP