Paul Gofman : d3dx9/tests: Add test for releasing pool before effects referencing it.

Alexandre Julliard julliard at winehq.org
Wed Apr 26 16:03:14 CDT 2017


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

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Wed Apr 26 12:21:03 2017 +0300

d3dx9/tests: Add test for releasing pool before effects referencing it.

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 | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 9a436d5..dbf91c4 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -6130,6 +6130,21 @@ static void test_effect_shared_parameters(IDirect3DDevice9 *device)
     hr = effect2->lpVtbl->End(effect2);
     ok(hr == D3D_OK, "Got result %#x.\n", hr);
 
+    if (0)
+    {
+        refcount = pool->lpVtbl->Release(pool);
+        ok(refcount == 2, "Unexpected refcount %u.\n", refcount);
+
+        refcount = pool->lpVtbl->Release(pool);
+        ok(refcount == 1, "Unexpected refcount %u.\n", refcount);
+
+        refcount = pool->lpVtbl->Release(pool);
+        ok(!refcount, "Unexpected refcount %u.\n", refcount);
+
+        /* Native d3dx crashes in GetFloat(). */
+        effect2->lpVtbl->GetFloat(effect2, "arr2[0]", &fvect.x);
+    }
+
     effect1->lpVtbl->Release(effect1);
     effect2->lpVtbl->Release(effect2);
 




More information about the wine-cvs mailing list