Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Output corrections for nv2 profile.
--HG--
branch : trunk
  • Loading branch information
icculus committed Jun 20, 2008
1 parent 652d616 commit 09016a5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mojoshader.c
Expand Up @@ -4325,7 +4325,7 @@ static void emit_ARB1_REP(Context *ctx)

// nv2 fragment programs have a real REP.
if ( (ctx->support_nv2) && (shader_is_pixel(ctx)) )
output_line(ctx, "REP %s", src0);
output_line(ctx, "REP %s;", src0);

else if (ctx->support_nv2)
{
Expand Down Expand Up @@ -4357,7 +4357,7 @@ static void emit_ARB1_ENDREP(Context *ctx)
{
// nv2 fragment programs have a real ENDREP.
if ( (ctx->support_nv2) && (shader_is_pixel(ctx)) )
output_line(ctx, "ENDREP");
output_line(ctx, "ENDREP;");

else if (ctx->support_nv2)
{
Expand Down Expand Up @@ -4387,7 +4387,7 @@ static void nv2_if(Context *ctx)
{
// The condition code register MUST be set up before this!
if (shader_is_pixel(ctx)) // nv2 fragment programs have a real IF.
output_line(ctx, "IF (EQ.x)");
output_line(ctx, "IF EQ.x;");
else
{
// there's no IF construct, but we can use a branch to a label.
Expand Down Expand Up @@ -4418,11 +4418,12 @@ static void emit_ARB1_IF(Context *ctx)
} // else
} // emit_ARB1_IF


static void emit_ARB1_ELSE(Context *ctx)
{
// nv2 fragment programs have a real ELSE.
if ( (ctx->support_nv2) && (shader_is_pixel(ctx)) )
output_line(ctx, "ELSE");
output_line(ctx, "ELSE;");

else if (ctx->support_nv2)
{
Expand Down Expand Up @@ -4452,7 +4453,7 @@ static void emit_ARB1_ENDIF(Context *ctx)
{
// nv2 fragment programs have a real ENDIF.
if ( (ctx->support_nv2) && (shader_is_pixel(ctx)) )
output_line(ctx, "ENDIF");
output_line(ctx, "ENDIF;");

else if (ctx->support_nv2)
{
Expand Down

0 comments on commit 09016a5

Please sign in to comment.