[PATCH 3/4] d3d10core/tests: Use SetRect() in more places.

Józef Kucia jkucia at codeweavers.com
Wed Sep 26 06:58:41 CDT 2018


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/d3d10core/tests/d3d10core.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c
index 4ee79af53d78..158a3e39d973 100644
--- a/dlls/d3d10core/tests/d3d10core.c
+++ b/dlls/d3d10core/tests/d3d10core.c
@@ -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;
-- 
2.16.4




More information about the wine-devel mailing list