Module: wine
Branch: master
Commit: cc6d90b8236ce5ba73b09e6f5eeb164e506a07a7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cc6d90b8236ce5ba73b09e6f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Jun 3 15:58:05 2020 +0430
wined3d: Get rid of the "d3d_initialized" check in device_resource_released().
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>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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 4544e28bc4..2ce3e346ef 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:
Module: wine
Branch: master
Commit: c125c65846b843ab5f3369a4fa38956d5aca5a21
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c125c65846b843ab5f3369a4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Wed Jun 3 15:58:04 2020 +0430
wined3d: Get rid of the "d3d_initialized" check in context_resource_released().
When this was introduced in commit 401e99b0c074af848379b2602df37fb1e6c7536b,
it protected against calling the equivalent of context_acquire() on the
equivalent of the no3d adapter. Commit
94d33d3e861d8e01b4edcb940e8ab1aa98359520 removed the call in question.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/wined3d/context.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 7959199e1f..3a263e1f6b 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -36,9 +36,6 @@ void context_resource_released(const struct wined3d_device *device, struct wined
{
unsigned int i;
- if (!device->d3d_initialized)
- return;
-
for (i = 0; i < device->context_count; ++i)
{
struct wined3d_context *context = device->contexts[i];