Skip to content

Commit

Permalink
Try declaring aL in the for loop instead of globally.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 5, 2008
1 parent ec3e82c commit 78e3b3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mojoshader.c
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 78e3b3a

Please sign in to comment.