mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 02:04:46 +00:00
d3d11/tests: Test combined scissors and viewport with negative offsets.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ef7b2180cf
commit
945e4f1d05
|
@ -11550,6 +11550,23 @@ static void test_scissor(void)
|
|||
color = get_texture_color(test_context.backbuffer, 320, 420);
|
||||
ok(compare_color(color, 0xff0000ff, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
|
||||
set_viewport(immediate_context, -1.0f, 0.0f, 641, 480, 0.0f, 1.0f);
|
||||
SetRect(&scissor_rect, -1, 0, 640, 480);
|
||||
ID3D11DeviceContext_RSSetScissorRects(immediate_context, 1, &scissor_rect);
|
||||
ID3D11DeviceContext_ClearRenderTargetView(immediate_context, test_context.backbuffer_rtv, red);
|
||||
check_texture_color(test_context.backbuffer, 0xff0000ff, 1);
|
||||
draw_color_quad(&test_context, &green);
|
||||
color = get_texture_color(test_context.backbuffer, 320, 60);
|
||||
ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
color = get_texture_color(test_context.backbuffer, 80, 240);
|
||||
ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
color = get_texture_color(test_context.backbuffer, 320, 240);
|
||||
ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
color = get_texture_color(test_context.backbuffer, 560, 240);
|
||||
ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
color = get_texture_color(test_context.backbuffer, 320, 420);
|
||||
ok(compare_color(color, 0xff00ff00, 1), "Got unexpected color 0x%08x.\n", color);
|
||||
|
||||
ID3D11RasterizerState_Release(rs);
|
||||
release_test_context(&test_context);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue