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

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2017-04-26 12:21:03 +03:00 committed by Alexandre Julliard
parent 9043ff030e
commit eb9febab03
1 changed files with 15 additions and 0 deletions

View File

@ -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);