From 78e3b3ac9bd14e64980c6ff3c64d02df606c19e3 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 5 Apr 2008 18:57:29 -0400 Subject: [PATCH] Try declaring aL in the for loop instead of globally. --HG-- branch : trunk --- mojoshader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 0aa39f93..547b0006 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -1669,8 +1669,8 @@ static void emit_GLSL_global(Context *ctx, RegisterType regtype, int regnum) 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_CALLNZ(Context *ctx) 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