[PATCH 4/5] ddraw/tests: r200 accepts 3DDEVICE | ZBUFFER render targets in ddraw4 (try 2).

Stefan Dösinger stefan at codeweavers.com
Mon Oct 28 17:35:49 CDT 2013


It doesn't in ddraw2 and 7.

Try 2: Mark alternative result broken.
---
 dlls/ddraw/tests/ddraw4.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index f880f8e..f56c4e7 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -4269,7 +4269,7 @@ static void test_rt_caps(void)
         DWORD caps_in;
         DWORD caps_out;
         HRESULT create_device_hr;
-        HRESULT set_rt_hr;
+        HRESULT set_rt_hr, alternative_set_rt_hr;
     }
     test_data[] =
     {
@@ -4279,6 +4279,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             D3D_OK,
             D3D_OK,
+            D3D_OK,
         },
         {
             NULL,
@@ -4286,6 +4287,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             D3D_OK,
             D3D_OK,
+            D3D_OK,
         },
         {
             NULL,
@@ -4293,6 +4295,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             NULL,
@@ -4300,6 +4303,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
             D3DERR_SURFACENOTINVIDMEM,
             D3D_OK,
+            D3D_OK,
         },
         {
             NULL,
@@ -4307,6 +4311,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             NULL,
@@ -4314,6 +4319,7 @@ static void test_rt_caps(void)
             DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             D3D_OK,
             D3D_OK,
+            D3D_OK,
         },
         {
             NULL,
@@ -4321,6 +4327,7 @@ static void test_rt_caps(void)
             DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             D3D_OK,
             D3D_OK,
+            D3D_OK,
         },
         {
             NULL,
@@ -4328,6 +4335,7 @@ static void test_rt_caps(void)
             DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             NULL,
@@ -4335,6 +4343,7 @@ static void test_rt_caps(void)
             DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
             D3DERR_SURFACENOTINVIDMEM,
             D3D_OK,
+            D3D_OK,
         },
         {
             NULL,
@@ -4342,6 +4351,7 @@ static void test_rt_caps(void)
             DDSCAPS_SYSTEMMEMORY,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &p8_fmt,
@@ -4349,6 +4359,7 @@ static void test_rt_caps(void)
             DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &p8_fmt,
@@ -4356,6 +4367,7 @@ static void test_rt_caps(void)
             ~0U /* AMD r200 */,
             DDERR_NOPALETTEATTACHED,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &p8_fmt,
@@ -4363,6 +4375,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &p8_fmt,
@@ -4370,6 +4383,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE,
             DDERR_NOPALETTEATTACHED,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &p8_fmt,
@@ -4377,6 +4391,7 @@ static void test_rt_caps(void)
             DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &z_fmt,
@@ -4384,6 +4399,7 @@ static void test_rt_caps(void)
             DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDPIXELFORMAT,
+            D3D_OK /* r200 */,
         },
         {
             &z_fmt,
@@ -4391,6 +4407,7 @@ static void test_rt_caps(void)
             DDSCAPS_3DDEVICE | DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDPIXELFORMAT,
+            D3D_OK /* r200 */,
         },
         {
             &z_fmt,
@@ -4398,6 +4415,7 @@ static void test_rt_caps(void)
             DDSCAPS_VIDEOMEMORY | DDSCAPS_ZBUFFER | DDSCAPS_LOCALVIDMEM,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
         {
             &z_fmt,
@@ -4405,6 +4423,7 @@ static void test_rt_caps(void)
             DDSCAPS_SYSTEMMEMORY | DDSCAPS_3DDEVICE | DDSCAPS_ZBUFFER,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDPIXELFORMAT,
+            D3D_OK /* r200 */,
         },
         {
             &z_fmt,
@@ -4412,6 +4431,7 @@ static void test_rt_caps(void)
             DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER,
             DDERR_INVALIDCAPS,
             DDERR_INVALIDCAPS,
+            DDERR_INVALIDCAPS,
         },
     };
 
@@ -4520,7 +4540,8 @@ static void test_rt_caps(void)
                 i, test_data[i].caps_in, hr);
 
         hr = IDirect3DDevice3_SetRenderTarget(device, rt, 0);
-        ok(hr == test_data[i].set_rt_hr, "Test %u: Got unexpected hr %#x, expected %#x.\n",
+        ok(hr == test_data[i].set_rt_hr || broken(hr == test_data[i].alternative_set_rt_hr),
+                "Test %u: Got unexpected hr %#x, expected %#x.\n",
                 i, hr, test_data[i].set_rt_hr);
         if (SUCCEEDED(hr) || hr == DDERR_INVALIDPIXELFORMAT)
             expected_rt = rt;
-- 
1.8.1.5




More information about the wine-patches mailing list