From dbba4461658cfb63b3caf802af01980e3f414b26 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 24 Apr 2013 21:49:39 -0400 Subject: [PATCH] Assembler: support ps_1_1 TEX instruction. --- mojoshader_assembler.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mojoshader_assembler.c b/mojoshader_assembler.c index 24ae275e..7fd69c1c 100644 --- a/mojoshader_assembler.c +++ b/mojoshader_assembler.c @@ -1143,8 +1143,12 @@ static int parse_instruction_token(Context *ctx, Token token) const char *origtoken = ctx->token; 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"))) + controls = 0; + // This might need to be TEXLD instead of TEXLDP. - if (check_token_segment(ctx, "TEXLDP")) + else if (check_token_segment(ctx, "TEXLDP")) controls = CONTROL_TEXLDP; // This might need to be TEXLD instead of TEXLDB.