Module: wine
Branch: master
Commit: 77c1454cf60cd03a1498323b36bddf25abe45318
URL: http://source.winehq.org/git/wine.git/?a=commit;h=77c1454cf60cd03a1498323b3…
Author: Stefan Dösinger <stefan(a)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);
}
Module: wine
Branch: master
Commit: 803bad09592c8b57a9bec3ac2661ce7c9067a17e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=803bad09592c8b57a9bec3ac2…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Sun Jan 30 22:18:31 2011 +0100
d3d9: Account for another different behavior in the viewport test.
---
dlls/d3d9/tests/visual.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 439b5cc..ffee8de 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -10394,9 +10394,15 @@ static void viewport_test(IDirect3DDevice9 *device) {
* TODO: Test Width < surface.width, but X + Width > surface.width
* TODO: Test Width < surface.width, what happens with the height?
*
- * Note that Windows 7 rejects MinZ / MaxZ outside [0;1], but accepts Width
- * and Height fields bigger than the framebuffer. However, it later refuses
- * to draw.
+ * The expected behavior is that the viewport behaves like the "default"
+ * viewport with X = Y = 0, Width = surface_width, Height = surface_height,
+ * MinZ = 0.0, MaxZ = 1.0.
+ *
+ * Starting with Windows 7 the behavior among driver versions is not
+ * consistent. The SetViewport call is accepted on all drivers. Some
+ * drivers(older nvidia ones) refuse to draw and return an error. Newer
+ * nvidia drivers draw, but use the actual values in the viewport and only
+ * display the upper left part on the surface.
*/
memset(&vp, 0, sizeof(vp));
vp.X = 0;
@@ -10430,10 +10436,10 @@ static void viewport_test(IDirect3DDevice9 *device) {
color = getPixelColor(device, 158, 122);
ok(color == 0x00ff0000, "viewport test: (158,122) has color %08x\n", color);
color = getPixelColor(device, 162, 122);
- ok(color == 0x00ffffff, "viewport test: (162,122) has color %08x\n", color);
+ ok(color == 0x00ffffff || broken(color == 0x00ff0000), "viewport test: (162,122) has color %08x\n", color);
color = getPixelColor(device, 478, 358);
- ok(color == 0x00ffffff, "viewport test: (478,358 has color %08x\n", color);
+ ok(color == 0x00ffffff || broken(color == 0x00ff0000), "viewport test: (478,358 has color %08x\n", color);
color = getPixelColor(device, 482, 358);
ok(color == 0x00ff0000, "viewport test: (482,358) has color %08x\n", color);
color = getPixelColor(device, 478, 362);