Commit 2a1e2ad2 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d10core/tests: Use SetRect() in more places.

parent 5ab8d43c
......@@ -4809,10 +4809,7 @@ static void test_scissor(void)
hr = ID3D10Device_CreateRasterizerState(device, &rs_desc, &rs);
ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr);
scissor_rect.left = 160;
scissor_rect.top = 120;
scissor_rect.right = 480;
scissor_rect.bottom = 360;
SetRect(&scissor_rect, 160, 120, 480, 360);
ID3D10Device_RSSetScissorRects(device, 1, &scissor_rect);
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_RSSetViewports(device, 2, vp);
rects[0].left = 0;
rects[0].top = 0;
rects[0].right = width;
rects[0].bottom = texture_desc.Height / 2;
SetRect(&rects[0], 0, 0, width, texture_desc.Height / 2);
memset(&rects[1], 0, sizeof(*rects));
ID3D10Device_RSSetScissorRects(device, 1, rects);
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);
/* Set both rectangles. */
rects[0].left = 0;
rects[0].top = 0;
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;
SetRect(&rects[0], 0, 0, width, texture_desc.Height / 2);
SetRect(&rects[1], width, 0, 2 * width, texture_desc.Height / 2);
ID3D10Device_ClearRenderTargetView(device, rtv, clear_color);
ID3D10Device_RSSetScissorRects(device, 2, rects);
constant.draw_id = 5;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment