=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: d3d8/tests: Relax the partially initialized varyings test.

Alexandre Julliard julliard at winehq.org
Thu Apr 13 13:06:09 CDT 2017


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Apr 12 14:03:44 2017 +0200

d3d8/tests: Relax the partially initialized varyings test.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d8/tests/visual.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index 88667b4..4f0c397 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -8233,21 +8233,27 @@ static void test_uninitialized_varyings(void)
         const DWORD *ps;
         D3DCOLOR expected;
         BOOL allow_zero_alpha;
+        BOOL partial;
         BOOL broken_warp;
     }
     /* On AMD specular color is generally initialized to 0x00000000 and texcoords to 0xff000000
-     * while on Nvidia it's the opposite. Just allow both. */
+     * while on Nvidia it's the opposite. Just allow both.
+     *
+     * Partially initialized varyings reliably handle the component that has been initialized.
+     * The uninitialized components generally follow the rule above, with some exceptions on
+     * radeon cards. r500 and r600 GPUs have been found to set uninitialized components to 0.0,
+     * 0.5 and 1.0 without a sensible pattern. */
     tests[] =
     {
         {D3DVS_VERSION(1, 1),         vs1_code,                   0,              NULL, 0xffffffff},
         {                  0,             NULL, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff000000, TRUE},
         {D3DVS_VERSION(1, 1),         vs1_code, D3DPS_VERSION(1, 1),  ps1_diffuse_code, 0xffffffff},
-        {D3DVS_VERSION(1, 1),         vs1_code, D3DPS_VERSION(1, 1), ps1_specular_code, 0xff000000, TRUE,  TRUE},
+        {D3DVS_VERSION(1, 1),         vs1_code, D3DPS_VERSION(1, 1), ps1_specular_code, 0xff000000, TRUE,  FALSE, TRUE},
         {D3DVS_VERSION(1, 1),         vs1_code, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff000000, TRUE},
         {D3DVS_VERSION(1, 1), vs1_partial_code,                   0,              NULL, 0xff7fffff, FALSE, TRUE},
         {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1),  ps1_diffuse_code, 0xff7fffff, FALSE, TRUE},
-        {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_specular_code, 0xff7f0000, TRUE},
-        {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff7f0000, TRUE},
+        {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_specular_code, 0xff7f0000, TRUE,  TRUE},
+        {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff7f0000, TRUE,  TRUE},
     };
     IDirect3DDevice8 *device;
     IDirect3D8 *d3d;
@@ -8351,7 +8357,8 @@ static void test_uninitialized_varyings(void)
         color = get_readback_color(&rb, 320, 240);
         ok(color_match(color, tests[i].expected, 1)
                 || (tests[i].allow_zero_alpha && color_match(color, tests[i].expected & 0x00ffffff, 1))
-                || (broken(warp && tests[i].broken_warp)),
+                || (broken(warp && tests[i].broken_warp))
+                || broken(tests[i].partial && color_match(color & 0x00ff0000, tests[i].expected & 0x00ff0000, 1)),
                 "Got unexpected color 0x%08x, case %u.\n", color, i);
         release_surface_readback(&rb);
 




More information about the wine-cvs mailing list