Paul Gofman : d3dx9/tests: Factor out test_effect_preshader_clear_pbool_consts() function.

Alexandre Julliard julliard at winehq.org
Mon Jun 5 16:56:31 CDT 2017


Module: wine
Branch: master
Commit: 2a3ad1d2098a2b0e462a362e4f689de11868da90
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2a3ad1d2098a2b0e462a362e4f689de11868da90

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Fri Jun  2 12:58:08 2017 +0300

d3dx9/tests: Factor out test_effect_preshader_clear_pbool_consts() function.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3dx9_36/tests/effect.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index bcb526e..ad9c553 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -4305,6 +4305,19 @@ got (%g, %g, %g, %g), parameter %s.\n",
     }
 }
 
+static void test_effect_preshader_clear_pbool_consts(IDirect3DDevice9 *device)
+{
+    BOOL bval = FALSE;
+    unsigned int i;
+    HRESULT hr;
+
+    for (i = 0; i < 16; ++i)
+    {
+        hr = IDirect3DDevice9_SetPixelShaderConstantB(device, i, &bval, 1);
+        ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    }
+}
+
 static void test_effect_preshader(IDirect3DDevice9 *device)
 {
     static const D3DXVECTOR4 test_effect_preshader_fvect_p[] =
@@ -4368,12 +4381,9 @@ static void test_effect_preshader(IDirect3DDevice9 *device)
         hr = IDirect3DDevice9_SetPixelShaderConstantF(device, i, &fvect_filler.x, 1);
         ok(hr == D3D_OK, "Got result %#x.\n", hr);
     }
-    bval = FALSE;
-    for (i = 0; i < 16; ++i)
-    {
-        hr = IDirect3DDevice9_SetPixelShaderConstantB(device, i, &bval, 1);
-        ok(hr == D3D_OK, "Got result %#x.\n", hr);
-    }
+
+    test_effect_preshader_clear_pbool_consts(device);
+
     for (i = 0; i < 16; ++i)
     {
         hr = IDirect3DDevice9_SetPixelShaderConstantI(device, i, ivect_empty, 1);




More information about the wine-cvs mailing list