Matteo Bruni : d3d9/tests: Use get_readback_color() in test_null_format().

Alexandre Julliard julliard at winehq.org
Thu Nov 26 16:31:00 CST 2020


Module: wine
Branch: master
Commit: 065d16a766176b473f9653f9664175aa303f8d41
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=065d16a766176b473f9653f9664175aa303f8d41

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Nov 25 18:11:27 2020 +0100

d3d9/tests: Use get_readback_color() in test_null_format().

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d9/tests/visual.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 5218d8a2029..efd8d701885 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -24986,6 +24986,7 @@ static void test_null_format(void)
         {600, 320, 0x0000ff00},
     };
     IDirect3DSurface9 *original_rt, *small_rt, *null_rt, *small_null_rt;
+    struct surface_readback rb;
     IDirect3DDevice9 *device;
     IDirect3D9 *d3d;
     unsigned int i;
@@ -25101,13 +25102,15 @@ static void test_null_format(void)
     hr = IDirect3DDevice9_EndScene(device);
     ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
 
+    get_rt_readback(original_rt, &rb);
     for (i = 0; i < ARRAY_SIZE(expected_colors); ++i)
     {
-        color = getPixelColor(device, expected_colors[i].x, expected_colors[i].y);
+        color = get_readback_color(&rb, expected_colors[i].x, expected_colors[i].y);
         ok(color_match(color, expected_colors[i].color, 1),
                 "Expected color 0x%08x at (%u, %u), got 0x%08x.\n",
                 expected_colors[i].color, expected_colors[i].x, expected_colors[i].y, color);
     }
+    release_surface_readback(&rb);
 
     hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
     ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr);




More information about the wine-cvs mailing list