Matteo Bruni : d3dx9: Add missing texkill instruction parsing.
Alexandre Julliard
julliard at winehq.org
Fri May 21 12:15:21 CDT 2010
Module: wine
Branch: master
Commit: 1d3f462fefb687b8719d1ffcab71073dbf772ae0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d3f462fefb687b8719d1ffcab71073dbf772ae0
Author: Matteo Bruni <matteo.mystral at gmail.com>
Date: Thu May 20 01:21:40 2010 +0200
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 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]));
More information about the wine-cvs
mailing list