d3d10core/tests: Use SetRect() in more places.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5ab8d43c30
commit
2a1e2ad2e5
|
@ -4809,10 +4809,7 @@ static void test_scissor(void)
|
||||||
hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs);
|
hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs);
|
||||||
ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr);
|
ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr);
|
||||||
|
|
||||||
scissor_rect.left = 160;
|
SetRect(&scissor_rect, 160, 120, 480, 360);
|
||||||
scissor_rect.top = 120;
|
|
||||||
scissor_rect.right = 480;
|
|
||||||
scissor_rect.bottom = 360;
|
|
||||||
ID3D10Device_RSSetScissorRects(device, 1, &scissor_rect);
|
ID3D10Device_RSSetScissorRects(device, 1, &scissor_rect);
|
||||||
|
|
||||||
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red);
|
ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, red);
|
||||||
|
@ -16923,10 +16920,7 @@ static void test_multiple_viewports(void)
|
||||||
ID3D10Device_ClearRenderTargetView(device, rtv, clear_color);
|
ID3D10Device_ClearRenderTargetView(device, rtv, clear_color);
|
||||||
ID3D10Device_RSSetViewports(device, 2, vp);
|
ID3D10Device_RSSetViewports(device, 2, vp);
|
||||||
|
|
||||||
rects[0].left = 0;
|
SetRect(&rects[0], 0, 0, width, texture_desc.Height / 2);
|
||||||
rects[0].top = 0;
|
|
||||||
rects[0].right = width;
|
|
||||||
rects[0].bottom = texture_desc.Height / 2;
|
|
||||||
memset(&rects[1], 0, sizeof(*rects));
|
memset(&rects[1], 0, sizeof(*rects));
|
||||||
ID3D10Device_RSSetScissorRects(device, 1, rects);
|
ID3D10Device_RSSetScissorRects(device, 1, rects);
|
||||||
constant.draw_id = 4;
|
constant.draw_id = 4;
|
||||||
|
@ -16941,14 +16935,8 @@ static void test_multiple_viewports(void)
|
||||||
check_texture_sub_resource_vec4(texture, 0, &rect, &expected_values[7], 1);
|
check_texture_sub_resource_vec4(texture, 0, &rect, &expected_values[7], 1);
|
||||||
|
|
||||||
/* Set both rectangles. */
|
/* Set both rectangles. */
|
||||||
rects[0].left = 0;
|
SetRect(&rects[0], 0, 0, width, texture_desc.Height / 2);
|
||||||
rects[0].top = 0;
|
SetRect(&rects[1], width, 0, 2 * width, texture_desc.Height / 2);
|
||||||
rects[0].right = width;
|
|
||||||
rects[0].bottom = texture_desc.Height / 2;
|
|
||||||
rects[1].left = width;
|
|
||||||
rects[1].top = 0;
|
|
||||||
rects[1].right = width * 2;
|
|
||||||
rects[1].bottom = texture_desc.Height / 2;
|
|
||||||
ID3D10Device_ClearRenderTargetView(device, rtv, clear_color);
|
ID3D10Device_ClearRenderTargetView(device, rtv, clear_color);
|
||||||
ID3D10Device_RSSetScissorRects(device, 2, rects);
|
ID3D10Device_RSSetScissorRects(device, 2, rects);
|
||||||
constant.draw_id = 5;
|
constant.draw_id = 5;
|
||||||
|
|
Loading…
Reference in New Issue