From f9518c8b5aa2716f09fed803e38eb6630a26bacf Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 18 Aug 2008 11:14:23 -0400 Subject: [PATCH] Removed the unnecessary check on POSITION0 in emit_GLSL_finalize(). It's just walking a linked list and throwing away the results anyhow. --HG-- branch : trunk --- mojoshader.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 2f3c9cdb..dfb12c36 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -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)