assembler: Don't lose the TEXBEM opcode in the special ps_1_1 TEX detection.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 12 Oct 2020 15:33:01 -0400
changeset 1306 0c0304e7d215
parent 1305 1fc6f843168f
child 1307 f7efdb215d49
assembler: Don't lose the TEXBEM opcode in the special ps_1_1 TEX detection.
mojoshader_assembler.c
--- a/mojoshader_assembler.c	Fri Oct 02 14:48:29 2020 -0400
+++ b/mojoshader_assembler.c	Mon Oct 12 15:33:01 2020 -0400
@@ -1181,7 +1181,7 @@
     const unsigned int origtokenlen = ctx->tokenlen;
 
     // "TEX" is only meaningful in ps_1_1.
-    if ((!shader_version_atleast(ctx, 1, 4)) && (check_token_segment(ctx, "TEX")))
+    if ((!shader_version_atleast(ctx, 1, 4)) && (ctx->tokenlen == 3) && (check_token_segment(ctx, "TEX")))
         controls = 0;
 
     // This might need to be TEXLD instead of TEXLDP.