On 7 December 2016 at 12:43, Józef Kucia jkucia@codeweavers.com wrote:
get_texture_readback(test_context.backbuffer, 0, &rb);for (y = 0; y < 480; ++y){for (x = 0; x < 640; ++x){DWORD color = get_readback_color(&rb, x, y);DWORD expected_color;if (x < 240)expected_color = 0xffffff00;else if (x >= 640 - 240)expected_color = 0xff0000ff;elseexpected_color = 0x00000000;ok(compare_color(color, expected_color, 1),"Test %u: Got 0x%08x, expected 0x%08x at (%u, %u).\n",i, color, expected_color, x, y);}}release_resource_readback(&rb);
For what it's worth, if we'll have more tests like this in the future, adding an optional rectangle argument to check_texture_color() may be useful.