From 1d735fd921a9d3f7fa3e038d0ea159b2efd9eb09 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 20 Jul 2020 14:50:10 -0400 Subject: [PATCH] For SM1.1 TEX, don't add texcoord attributes. Other parts of the system will generate the tX registers as global variables, assign gl_TexCoord[X] to them, and overwrite them with the sampled pixels during the TEX instruction. Setting these as texcoord attributes causes it to _also_ generate a generic vertex attribute and cause all sorts of problems. --- mojoshader.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mojoshader.c b/mojoshader.c index 04a67af..dfd8b5c 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -1937,8 +1937,6 @@ static void state_TEXLD(Context *ctx) if (info->regtype != REG_TYPE_TEXTURE) fail(ctx, "TEX param must be a texture register"); add_sampler(ctx, sampler, TEXTURE_TYPE_2D, 0); - add_attribute_register(ctx, REG_TYPE_TEXTURE, sampler, - MOJOSHADER_USAGE_TEXCOORD, sampler, 0xF, 0); } // else } // state_TEXLD