[1/3] d3dx9: Fix dst register handling in ps_1_4.

Matteo Bruni matteo.mystral at gmail.com
Wed Jul 21 10:16:33 CDT 2010


-------------- next part --------------
From fd973b1294205eb1f734415012fa1786d2bd91b9 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <matteo.mystral at gmail.com>
Date: Wed, 21 Jul 2010 17:07:24 +0200
Subject: d3dx9: Fix dst register handling in ps_1_4.

---
 dlls/d3dx9_36/asmparser.c |    2 +-
 dlls/d3dx9_36/tests/asm.c |   12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx9_36/asmparser.c b/dlls/d3dx9_36/asmparser.c
index 10188a0..dfa8362 100644
--- a/dlls/d3dx9_36/asmparser.c
+++ b/dlls/d3dx9_36/asmparser.c
@@ -838,7 +838,7 @@ static void asmparser_dstreg_ps_1_4(struct asm_parser *This,
                           debug_print_dstreg(dst));
         set_parse_status(This, PARSE_ERR);
     }
-    reg = map_oldps_register(dst, FALSE);
+    reg = map_oldps_register(dst, TRUE);
     memcpy(&instr->dst, &reg, sizeof(reg));
     instr->has_dst = TRUE;
 }
diff --git a/dlls/d3dx9_36/tests/asm.c b/dlls/d3dx9_36/tests/asm.c
index fe3eee0..7d7d211 100644
--- a/dlls/d3dx9_36/tests/asm.c
+++ b/dlls/d3dx9_36/tests/asm.c
@@ -583,11 +583,21 @@ static void ps_1_4_test(void) {
             "texdepth_x2 r5\n",
             {0xffff0104, 0x00000057, 0x810f0005, 0x0000ffff}
         },
-        {   /* shader 18 */
+        {   /* shader 19 */
             "ps_1_4\n"
             "bem_d2 r1, c0, r0\n",
             {0xffff0104, 0x00000059, 0x8f0f0001, 0xa0e40000, 0x80e40000, 0x0000ffff}
         },
+        {   /* shader 20 */
+            "ps_1_4\n"
+            "texkill t0\n",
+            {0xffff0104, 0x00000041, 0xb00f0000, 0x0000ffff}
+        },
+        {   /* shader 21 */
+            "ps_1_4\n"
+            "texkill r0\n",
+            {0xffff0104, 0x00000041, 0x800f0000, 0x0000ffff}
+        },
     };
 
     exec_tests("ps_1_4", tests, sizeof(tests) / sizeof(tests[0]));
-- 
1.7.1


More information about the wine-patches mailing list