This used to protect against accessing the framebuffer state on the no3d
adapter; that's no longer a concern.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
dlls/wined3d/device.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 4544e28bc44..2ce3e346ef7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5493,18 +5493,15 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type));
- if (device->d3d_initialized)
+ for (i = 0; i < ARRAY_SIZE(device->state.fb.render_targets); ++i)
{
- for (i = 0; i < ARRAY_SIZE(device->state.fb.render_targets); ++i)
- {
- if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
- ERR("Resource %p is still in use as render target %u.\n", resource, i);
- }
-
- if ((rtv = device->state.fb.depth_stencil) && rtv->resource == resource)
- ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
+ if ((rtv = device->state.fb.render_targets[i]) && rtv->resource == resource)
+ ERR("Resource %p is still in use as render target %u.\n", resource, i);
}
+ if ((rtv = device->state.fb.depth_stencil) && rtv->resource == resource)
+ ERR("Resource %p is still in use as depth/stencil buffer.\n", resource);
+
switch (type)
{
case WINED3D_RTYPE_TEXTURE_1D:
--
2.20.1