wined3d: Only check rtv and dsv bindings in device_resource_released() when D3D is initialised.

This fixes a regression introduced by commit
4a9304305a.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Henri Verbeet 2017-01-04 00:04:48 +01:00 committed by Alexandre Julliard
parent c7c0415689
commit 9a789feb81
1 changed files with 9 additions and 6 deletions

View File

@ -4958,14 +4958,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
if (device->d3d_initialized)
{
if ((rtv = device->fb.render_targets[i]) && rtv->resource == resource)
ERR("Resource %p is still in use as render target %u.\n", resource, i);
}
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
{
if ((rtv = device->fb.render_targets[i]) && rtv->resource == resource)
ERR("Resource %p is still in use as render target %u.\n", resource, i);
}
if ((rtv = device->fb.depth_stencil) && rtv->resource == resource)
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
if ((rtv = device->fb.depth_stencil) && rtv->resource == resource)
ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
}
switch (type)
{