Matteo Bruni : d3dx9: Check for oCx register number.

Alexandre Julliard julliard at winehq.org
Fri May 21 12:15:21 CDT 2010


Module: wine
Branch: master
Commit: 961db7964d89e7650a5618a53c5a3cf94b28515a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=961db7964d89e7650a5618a53c5a3cf94b28515a

Author: Matteo Bruni <matteo.mystral at gmail.com>
Date:   Fri May 21 15:53:44 2010 +0200

d3dx9: Check for oCx register number.

---

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

diff --git a/dlls/d3dx9_36/asmparser.c b/dlls/d3dx9_36/asmparser.c
index 3062639..dfd0936 100644
--- a/dlls/d3dx9_36/asmparser.c
+++ b/dlls/d3dx9_36/asmparser.c
@@ -259,7 +259,7 @@ static const struct allowed_reg_type ps_3_reg_allowed[] = {
     { BWRITERSPR_MISCTYPE,      2 }, /* vPos and vFace */
     { BWRITERSPR_LOOP,          1 },
     { BWRITERSPR_LABEL,      2048 },
-    { BWRITERSPR_COLOROUT,    ~0U },
+    { BWRITERSPR_COLOROUT,      4 },
     { BWRITERSPR_DEPTHOUT,      1 },
     { ~0U, 0 } /* End tag */
 };
diff --git a/dlls/d3dx9_36/tests/asm.c b/dlls/d3dx9_36/tests/asm.c
index 79c6c07..0b8cd3e 100644
--- a/dlls/d3dx9_36/tests/asm.c
+++ b/dlls/d3dx9_36/tests/asm.c
@@ -1146,6 +1146,11 @@ static void ps_3_0_test(void) {
             "texkill v0\n",
             {0xffff0300, 0x01000041, 0x900f0000, 0x0000ffff}
         },
+        {   /* shader 11 */
+            "ps_3_0\n"
+            "add oC3, r0, r1\n",
+            {0xffff0300, 0x03000002, 0x800f0803, 0x80e40000, 0x80e40001, 0x0000ffff}
+        },
     };
 
     exec_tests("ps_3_0", tests, sizeof(tests) / sizeof(tests[0]));
@@ -1236,6 +1241,12 @@ static void failure_test(void) {
         /* shader 25: _x4 instruction modified not allowed in > ps_1_x */
         "ps_3_0\n"
         "add_x4 r0, r0, r1\n",
+        /* shader 26: there aren't oCx registers in ps_1_x */
+        "ps_1_3\n"
+        "add oC0, r0, r1\n",
+        /* shader 27: oC3 is the max in >= ps_2_0 */
+        "ps_3_0\n"
+        "add oC4, r0, r1\n",
     };
     HRESULT hr;
     unsigned int i;




More information about the wine-cvs mailing list