# HG changeset patch # User Ryan C. Gordon # Date 1602565400 14400 # Node ID ff7fe8bdbb8fdef46e4a605d33d3b50a4811df89 # Parent f7efdb215d495e762f155729baa0bbbe24646af5 glsl: for SM1.1, don't add incorrect gl_TexCoord defines. We handled this elsewhere. diff -r f7efdb215d49 -r ff7fe8bdbb8f profiles/mojoshader_profile_glsl.c --- a/profiles/mojoshader_profile_glsl.c Tue Oct 13 01:02:07 2020 -0400 +++ b/profiles/mojoshader_profile_glsl.c Tue Oct 13 01:03:20 2020 -0400 @@ -1057,13 +1057,15 @@ { // ps_1_1 does a different hack for this attribute. // Refer to emit_GLSL_global()'s REG_TYPE_ADDRESS code. - if (shader_version_atleast(ctx, 1, 4) && (index < 4)) // gl_TexCoord[4+] is unreliable! + if (!shader_version_atleast(ctx, 1, 4)) + usage_str = ""; // just make sure this isn't NULL. + else if (index < 4) // gl_TexCoord[4+] is unreliable! { snprintf(index_str, sizeof (index_str), "%u", (uint) index); usage_str = "gl_TexCoord"; arrayleft = "["; arrayright = "]"; - } // if + } // else if } // if else if (usage == MOJOSHADER_USAGE_COLOR)