[PATCH 2/5] d3d9/tests: Use get_readback_color() in test_null_format().
Matteo Bruni
mbruni at codeweavers.com
Wed Nov 25 11:11:27 CST 2020
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
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);
--
2.26.2
More information about the wine-devel
mailing list