From 1d3f462fefb687b8719d1ffcab71073dbf772ae0 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Thu, 20 May 2010 01:21:40 +0200 Subject: [PATCH] d3dx9: Add missing texkill instruction parsing. --- dlls/d3dx9_36/asmshader.y | 9 ++++++--- dlls/d3dx9_36/tests/asm.c | 5 +++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/asmshader.y b/dlls/d3dx9_36/asmshader.y index 06a6825bb7..0949ee312f 100644 --- a/dlls/d3dx9_36/asmshader.y +++ b/dlls/d3dx9_36/asmshader.y @@ -705,6 +705,11 @@ instruction: INSTR_ADD omods dreg ',' sregs TRACE("DP2ADD\n"); asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP2ADD, $2.mod, $2.shift, 0, &$3, &$5, 3); } + | INSTR_TEXKILL dreg + { + TRACE("TEXKILL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXKILL, 0, 0, 0, &$2, 0, 0); + } | INSTR_TEXLD omods dreg ',' sregs { TRACE("TEXLD\n"); @@ -769,9 +774,7 @@ dreg_name: REG_TEMP } | REG_INPUT { - asmparser_message(&asm_ctx, "Line %u: Register v%u is not a valid destination register\n", - asm_ctx.line_no, $1); - set_parse_status(&asm_ctx, PARSE_WARN); + $$.regnum = $1; $$.type = BWRITERSPR_INPUT; } | REG_CONSTFLOAT { diff --git a/dlls/d3dx9_36/tests/asm.c b/dlls/d3dx9_36/tests/asm.c index 54894df36d..79c6c07545 100644 --- a/dlls/d3dx9_36/tests/asm.c +++ b/dlls/d3dx9_36/tests/asm.c @@ -1141,6 +1141,11 @@ static void ps_3_0_test(void) { {0xffff0300, 0x0500005d, 0x802f0000, 0x80e40001, 0x80e40002, 0x80e40003, 0x80e40004, 0x0000ffff} }, + { /* shader 10 */ + "ps_3_0\n" + "texkill v0\n", + {0xffff0300, 0x01000041, 0x900f0000, 0x0000ffff} + }, }; exec_tests("ps_3_0", tests, sizeof(tests) / sizeof(tests[0]));