Stefan Dösinger : d3d9: Account for another different behavior in the viewport test.

Alexandre Julliard julliard at winehq.org
Fri May 20 12:44:30 CDT 2011


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

Author: Stefan Dösinger <stefan at 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);




More information about the wine-cvs mailing list