=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11/tests: Use SetRect() in more places.

Alexandre Julliard julliard at winehq.org
Wed Sep 26 14:22:33 CDT 2018


Module: wine
Branch: master
Commit: 37edf1ec182bfc0b738e3eeadce0e8adb4cadec2
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=37edf1ec182bfc0b738e3eeadce0e8adb4cadec2

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Sep 26 13:58:42 2018 +0200

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

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/tests/d3d11.c | 20 ++++----------------
 1 file changed, 4 insertions(+), 16 deletions(-)

diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 3ab2642..41afdf9 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9597,10 +9597,7 @@ static void test_scissor(void)
     hr = ID3D11Device_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);
     ID3D11DeviceContext_RSSetScissorRects(immediate_context, 1, &scissor_rect);
 
     ID3D11DeviceContext_ClearRenderTargetView(immediate_context, test_context.backbuffer_rtv, red);
@@ -27272,10 +27269,7 @@ static void test_multiple_viewports(void)
     ID3D11DeviceContext_ClearRenderTargetView(context, rtv, clear_color);
     ID3D11DeviceContext_RSSetViewports(context, 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));
     ID3D11DeviceContext_RSSetScissorRects(context, 1, rects);
     constant.draw_id = 4;
@@ -27290,14 +27284,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);
     ID3D11DeviceContext_ClearRenderTargetView(context, rtv, clear_color);
     ID3D11DeviceContext_RSSetScissorRects(context, 2, rects);
     constant.draw_id = 5;




More information about the wine-cvs mailing list