From 91cf3fd6aca682995af90f94fd24306a2367d4c9 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 3 Apr 2008 10:01:31 -0400 Subject: [PATCH] Removed comment output at top of program in GLSL profile. --HG-- branch : trunk --- mojoshader.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 2988efdc..6acb9306 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -1477,19 +1477,18 @@ static const char *get_GLSL_comparison_string(Context *ctx) static void emit_GLSL_start(Context *ctx) { - const uint major = (uint) ctx->major_ver; - const uint minor = (uint) ctx->minor_ver; - ctx->output = &ctx->globals; - if (ctx->shader_type == MOJOSHADER_TYPE_PIXEL) - output_line(ctx, "// Pixel shader, version %u.%u", major, minor); - else if (ctx->shader_type == MOJOSHADER_TYPE_VERTEX) - output_line(ctx, "// Vertex shader, version %u.%u", major, minor); - else + switch (ctx->shader_type) { - failf(ctx, "Shader type %u unsupported in this profile.", - (uint) ctx->shader_type); - } // else + case MOJOSHADER_TYPE_PIXEL: + case MOJOSHADER_TYPE_VERTEX: + break; // supported. + + default: + failf(ctx, "Shader type %u unsupported in this profile.", + (uint) ctx->shader_type); + return; + } // switch ctx->output = &ctx->mainline; output_line(ctx, "void main()");