Module: wine Branch: master Commit: 77c1454cf60cd03a1498323b36bddf25abe45318 URL: http://source.winehq.org/git/wine.git/?a=commit;h=77c1454cf60cd03a1498323b36...
Author: Stefan Dösinger stefan@codeweavers.com Date: Sun Jan 30 22:19:02 2011 +0100
d3d9: Skip the YUV tests when the driver confuses the U and V channels.
---
dlls/d3d9/tests/visual.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index ffee8de..f3ba3b4 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -9713,6 +9713,17 @@ static void yuv_color_test(IDirect3DDevice9 *device) { * differently, so we need a max diff of 16 */ color = getPixelColor(device, 40, 240); + + /* Newer versions of the Nvidia Windows driver mix up the U and V channels, breaking all the tests + * where U != V. Skip the entire test if this bug in this case + */ + if (broken(test_data[i].in == 0xff000000 && color == 0x00008800 && format == D3DFMT_UYVY)) + { + skip("Nvidia channel confusion bug detected, skipping YUV tests\n"); + IDirect3DSurface9_Release(surface); + goto out; + } + ok(color_match(color, ref_color_left, 18), "Input 0x%08x: Got color 0x%08x for pixel 1/1, expected 0x%08x, format %s\n", test_data[i].in, color, ref_color_left, fmt_string); @@ -9725,6 +9736,8 @@ static void yuv_color_test(IDirect3DDevice9 *device) { } IDirect3DSurface9_Release(surface); } + +out: IDirect3DSurface9_Release(target); IDirect3D9_Release(d3d); }