Francois Gouget : d3d9/tests: CheckDeviceType() may also return D3DERR_NOTAVAILABLE for D3DFMT_X1R5G5B5.

Alexandre Julliard julliard at winehq.org
Thu Feb 21 14:29:36 CST 2013


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Feb 21 16:22:42 2013 +0100

d3d9/tests: CheckDeviceType() may also return D3DERR_NOTAVAILABLE for D3DFMT_X1R5G5B5.

Spice's QXL driver claims to support X1R5G5B5 but then returns
NOTAVAILABLE just like the Windows Standard VGA driver does for R5G6B5
and X8R8G8B8.

---

 dlls/d3d9/tests/device.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index ba8a3ef..bbbcbbc 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -2325,7 +2325,7 @@ static void test_display_formats(void)
 
             if(r5g6b5_format_list[i].shouldPass)
                 ok(hr == D3D_OK ||
-                   broken(hr == D3DERR_NOTAVAILABLE),
+                   broken(hr == D3DERR_NOTAVAILABLE) /* Windows VGA driver */,
                    "format %d %d didn't pass with hr=%#08x\n", r5g6b5_format_list[i].DisplayFormat, r5g6b5_format_list[i].BackBufferFormat, hr);
             else
                 ok(hr != D3D_OK, "format %d %d didn't pass while it was expected to\n", r5g6b5_format_list[i].DisplayFormat, r5g6b5_format_list[i].BackBufferFormat);
@@ -2342,7 +2342,9 @@ static void test_display_formats(void)
             hr = IDirect3D9_CheckDeviceType(d3d9, Adapter, DeviceType, x1r5g5b5_format_list[i].DisplayFormat, x1r5g5b5_format_list[i].BackBufferFormat, FALSE);
 
             if(x1r5g5b5_format_list[i].shouldPass)
-                ok(hr == D3D_OK, "format %d %d didn't pass with hr=%#08x\n", x1r5g5b5_format_list[i].DisplayFormat, x1r5g5b5_format_list[i].BackBufferFormat, hr);
+                ok(hr == D3D_OK ||
+                   broken(hr == D3DERR_NOTAVAILABLE) /* Spice QXL driver */,
+                   "format %d %d didn't pass with hr=%#08x\n", x1r5g5b5_format_list[i].DisplayFormat, x1r5g5b5_format_list[i].BackBufferFormat, hr);
             else
                 ok(hr != D3D_OK, "format %d %d didn't pass while it was expected to\n", x1r5g5b5_format_list[i].DisplayFormat, x1r5g5b5_format_list[i].BackBufferFormat);
         }
@@ -2356,10 +2358,11 @@ static void test_display_formats(void)
         for(i=0; x8r8g8b8_format_list[i].DisplayFormat != 0; i++)
         {
             hr = IDirect3D9_CheckDeviceType(d3d9, Adapter, DeviceType, x8r8g8b8_format_list[i].DisplayFormat, x8r8g8b8_format_list[i].BackBufferFormat, FALSE);
+            trace("CheckDeviceType(%d %d) = %08x shouldPass = %d\n", x8r8g8b8_format_list[i].DisplayFormat, x8r8g8b8_format_list[i].BackBufferFormat, hr, x8r8g8b8_format_list[i].shouldPass);
 
             if(x8r8g8b8_format_list[i].shouldPass)
                 ok(hr == D3D_OK ||
-                   broken(hr == D3DERR_NOTAVAILABLE),
+                   broken(hr == D3DERR_NOTAVAILABLE) /* Windows VGA driver */,
                    "format %d %d didn't pass with hr=%#08x\n", x8r8g8b8_format_list[i].DisplayFormat, x8r8g8b8_format_list[i].BackBufferFormat, hr);
             else
                 ok(hr != D3D_OK, "format %d %d didn't pass while it was expected to\n", x8r8g8b8_format_list[i].DisplayFormat, x8r8g8b8_format_list[i].BackBufferFormat);




More information about the wine-cvs mailing list