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

Francois Gouget fgouget at codeweavers.com
Thu Feb 21 09:22:42 CST 2013


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 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index f433ba8..61a7e65 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -2335,7 +2335,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);
@@ -2352,7 +2352,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);
         }
@@ -2366,10 +2368,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);
-- 
1.7.10.4



More information about the wine-patches mailing list