Skip to content

Commit

Permalink
glsl: for SM1.1, don't add incorrect gl_TexCoord defines.
Browse files Browse the repository at this point in the history
We handled this elsewhere.
  • Loading branch information
icculus committed Oct 13, 2020
1 parent 5618e7c commit 410f63c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions profiles/mojoshader_profile_glsl.c
Expand Up @@ -1057,13 +1057,15 @@ void emit_GLSL_attribute(Context *ctx, RegisterType regtype, int regnum,
{
// 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)
Expand Down

0 comments on commit 410f63c

Please sign in to comment.