Module: wine Branch: master Commit: 6745982aaa712b9054411cf54ec08b7d1aac8303 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6745982aaa712b9054411cf54e...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sun Feb 16 22:42:20 2014 +0100
d3d9/tests: Skip YUV tests if the formats cannot be converted.
The Windows 8 testbot supports some YUV formats as plain surfaces, but cannot convert them to RGB in StretchRect.
---
dlls/d3d9/tests/visual.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 89f02b9..13d0ea6 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -10382,6 +10382,7 @@ static void yuv_color_test(IDirect3DDevice9 *device) IDirect3D9 *d3d; D3DCOLOR color; D3DFORMAT skip_once = D3DFMT_UNKNOWN; + D3DSURFACE_DESC desc;
static const struct { @@ -10435,6 +10436,8 @@ static void yuv_color_test(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Failed to get d3d9 interface, hr %#x.\n", hr); hr = IDirect3DDevice9_GetRenderTarget(device, 0, &target); ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); + hr = IDirect3DSurface9_GetDesc(target, &desc); + ok(SUCCEEDED(hr), "Failed to get surface description, hr %#x.\n", hr);
for (i = 0; i < sizeof(test_data) / sizeof(test_data[0]); i++) { @@ -10450,6 +10453,16 @@ static void yuv_color_test(IDirect3DDevice9 *device) } continue; } + if (FAILED(IDirect3D9_CheckDeviceFormatConversion(d3d, 0, + D3DDEVTYPE_HAL, test_data[i].format, desc.Format))) + { + if (skip_once != test_data[i].format) + { + skip("Driver cannot blit %s surfaces.\n", test_data[i].fmt_string); + skip_once = test_data[i].format; + } + continue; + }
/* A pixel is effectively 16 bit large, but two pixels are stored together, so the minimum size is 2x1. * However, Nvidia Windows drivers have problems with 2x1 YUY2/UYVY surfaces, so use a 4x1 surface and