Matteo Bruni : d3d8/tests: Use the new readback helpers in test_pointsize( ).
Module: wine Branch: master Commit: 2e4aee0ee74a19f77fce15250ba0d9eade11456c URL: http://source.winehq.org/git/wine.git/?a=commit;h=2e4aee0ee74a19f77fce15250b... Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Oct 12 23:17:07 2015 +0200 d3d8/tests: Use the new readback helpers in test_pointsize(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/visual.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 772fd96..2748445 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -7197,31 +7197,36 @@ static void test_pointsize(void) } else { - color = getPixelColor(device, 64 - size / 2 + 1, 64 - size / 2 + 1); + struct surface_readback rb; + + get_rt_readback(rt, &rb); + color = get_readback_color(&rb, 64 - size / 2 + 1, 64 - size / 2 + 1); ok(color_match(color, 0x00ff0000, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 + size / 2 - 1, 64 - size / 2 + 1); + color = get_readback_color(&rb, 64 + size / 2 - 1, 64 - size / 2 + 1); ok(color_match(color, 0x00ffff00, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 - size / 2 + 1, 64 + size / 2 - 1); + color = get_readback_color(&rb, 64 - size / 2 + 1, 64 + size / 2 - 1); ok(color_match(color, 0x00000000, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 + size / 2 - 1, 64 + size / 2 - 1); + color = get_readback_color(&rb, 64 + size / 2 - 1, 64 + size / 2 - 1); ok(color_match(color, 0x0000ff00, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 - size / 2 - 1, 64 - size / 2 - 1); - ok(color_match(color, 0x0000ffff, 0), + color = get_readback_color(&rb, 64 - size / 2 - 1, 64 - size / 2 - 1); + ok(color_match(color, 0xff00ffff, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 + size / 2 + 1, 64 - size / 2 - 1); - ok(color_match(color, 0x0000ffff, 0), + color = get_readback_color(&rb, 64 + size / 2 + 1, 64 - size / 2 - 1); + ok(color_match(color, 0xff00ffff, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 - size / 2 - 1, 64 + size / 2 + 1); - ok(color_match(color, 0x0000ffff, 0), + color = get_readback_color(&rb, 64 - size / 2 - 1, 64 + size / 2 + 1); + ok(color_match(color, 0xff00ffff, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); - color = getPixelColor(device, 64 + size / 2 + 1, 64 + size / 2 + 1); - ok(color_match(color, 0x0000ffff, 0), + color = get_readback_color(&rb, 64 + size / 2 + 1, 64 + size / 2 + 1); + ok(color_match(color, 0xff00ffff, 0), "Got unexpected color 0x%08x (case %u, %u, size %u).\n", color, i, j, size); + + release_surface_readback(&rb); } } IDirect3DDevice8_SetVertexShader(device, 0);
participants (1)
-
Alexandre Julliard