Skip to content

Commit

Permalink
Fixed CALLNZ in the GLSL profile.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 3, 2008
1 parent d06676d commit 003ecad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mojoshader.c
Expand Up @@ -1801,9 +1801,11 @@ static void emit_GLSL_CALL(Context *ctx)

static void emit_GLSL_CALLNZ(Context *ctx)
{
// !!! FIXME: if src1 is a constbool that's true, we can remove the
// !!! FIXME: if. If it's false, we can make this a no-op.
const char *src0 = make_GLSL_sourcearg_string(ctx, 0);
const char *src1 = make_GLSL_sourcearg_string(ctx, 1);
output_line(ctx, "if (%s) { %s(); }", src0, src1);
output_line(ctx, "if (%s) { %s(); }", src1, src0);
} // emit_GLSL_CALLNZ

static void emit_GLSL_LOOP(Context *ctx)
Expand Down

0 comments on commit 003ecad

Please sign in to comment.