Try declaring aL in the for loop instead of globally. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sat, 05 Apr 2008 18:57:29 -0400
branchtrunk
changeset 107 5bdff608c98d
parent 106 fd0370e31e86
child 108 b1b685bc63cb
Try declaring aL in the for loop instead of globally.
mojoshader.c
--- 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