Skip to content

Commit

Permalink
Removed the unnecessary check on POSITION0 in emit_GLSL_finalize().
Browse files Browse the repository at this point in the history
It's just walking a linked list and throwing away the results anyhow.

--HG--
branch : trunk
  • Loading branch information
icculus committed Aug 18, 2008
1 parent 8216d7c commit f9518c8
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions mojoshader.c
Expand Up @@ -2269,29 +2269,10 @@ static void emit_GLSL_phase(Context *ctx)

static void emit_GLSL_finalize(Context *ctx)
{
const RegisterList *reg;

// throw some blank lines around to make source more readable.
push_output(ctx, &ctx->globals);
output_blank_line(ctx);
pop_output(ctx);

push_output(ctx, &ctx->mainline_intro);
ctx->indent++;

// Make sure this is always set, moved from our generic attribute.
reg = declared_attribute(ctx, MOJOSHADER_USAGE_POSITION, 0);
if (reg != NULL)
{
#if 0 // !!! FIXME: probably not necessary?
// !!! FIXME: only emit if shader didn't definitely set gl_Position.
output_line(ctx, "gl_Position = %s;",
get_GLSL_varname(ctx, reg->regtype, reg->regnum));
#endif
} // if

ctx->indent--;
pop_output(ctx);
} // emit_GLSL_finalize

static void emit_GLSL_global(Context *ctx, RegisterType regtype, int regnum)
Expand Down

0 comments on commit f9518c8

Please sign in to comment.