Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed IF/ELSE/ENDIF labels in nv2 profile.
--HG--
branch : trunk
  • Loading branch information
icculus committed Jun 19, 2008
1 parent 5b31bae commit e27adde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mojoshader.c
Expand Up @@ -4325,11 +4325,11 @@ static void emit_ARB1_ELSE(Context *ctx)
output_line(ctx, "BRA %s;", get_ARB1_if_label_name(ctx, endlabel));

// Now mark the ELSE section with a lable.
const int elselabel = ctx->if_labels_stack[ctx->if_labels_stack_index];
const int elselabel = ctx->if_labels_stack[ctx->if_labels_stack_index-1];
output_line(ctx, "%s:", get_ARB1_if_label_name(ctx, elselabel));

// Replace the ELSE label with the ENDIF on the label stack.
ctx->if_labels_stack[ctx->if_labels_stack_index] = endlabel;
ctx->if_labels_stack[ctx->if_labels_stack_index-1] = endlabel;
} // if

else // stock ARB1 has no branching.
Expand Down

0 comments on commit e27adde

Please sign in to comment.