[1/6] d3dx9: Add missing texkill instruction parsing.
Matteo Bruni
matteo.mystral at gmail.com
Fri May 21 10:06:25 CDT 2010
-------------- next part --------------
From d194d7f823ba832517230d2710b0efc61b0e6493 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <matteo.mystral at gmail.com>
Date: Thu, 20 May 2010 01:21:40 +0200
Subject: d3dx9: Add missing texkill instruction parsing.
Also, REG_INPUT is a valid destination register.
---
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 06a6825..0949ee3 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 54894df..79c6c07 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]));
--
1.6.4.4
More information about the wine-patches
mailing list