Commit 34e9d94d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9/tests: Use a separate device for depth_buffer_test().

parent 38e2f4ca
......@@ -11736,7 +11736,7 @@ done:
DestroyWindow(window);
}
static void depth_buffer_test(IDirect3DDevice9 *device)
static void depth_buffer_test(void)
{
static const struct vertex quad1[] =
{
......@@ -11768,11 +11768,25 @@ static void depth_buffer_test(IDirect3DDevice9 *device)
};
IDirect3DSurface9 *backbuffer, *rt1, *rt2, *rt3;
IDirect3DDevice9 *device;
unsigned int i, j;
D3DVIEWPORT9 vp;
IDirect3D9 *d3d;
D3DCOLOR color;
ULONG refcount;
HWND window;
HRESULT hr;
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
0, 0, 640, 480, NULL, NULL, NULL, NULL);
d3d = Direct3DCreate9(D3D_SDK_VERSION);
ok(!!d3d, "Failed to create a D3D object.\n");
if (!(device = create_device(d3d, window, window, TRUE)))
{
skip("Failed to create a D3D device, skipping tests.\n");
goto done;
}
vp.X = 0;
vp.Y = 0;
vp.Width = 640;
......@@ -11864,6 +11878,11 @@ static void depth_buffer_test(IDirect3DDevice9 *device)
IDirect3DSurface9_Release(rt3);
IDirect3DSurface9_Release(rt2);
IDirect3DSurface9_Release(rt1);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
done:
IDirect3D9_Release(d3d);
DestroyWindow(window);
}
/* Test that partial depth copies work the way they're supposed to. The clear
......@@ -15669,11 +15688,11 @@ START_TEST(visual)
texop_range_test(device_ptr);
alphareplicate_test(device_ptr);
dp3_alpha_test(device_ptr);
depth_buffer_test(device_ptr);
cleanup_device(device_ptr);
device_ptr = NULL;
depth_buffer_test();
depth_buffer2_test();
depth_blit_test();
intz_test();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment