Module: wine Branch: master Commit: 2cfd75f7c5b0e8ffe0f4c161c3c174c4bfc3a046 URL: https://gitlab.winehq.org/wine/wine/-/commit/2cfd75f7c5b0e8ffe0f4c161c3c174c...
Author: Zebediah Figura zfigura@codeweavers.com Date: Fri Apr 14 19:13:06 2023 -0500
wined3d: Do not forward texture references to the swapchain.
Rely on the swapchain to reference its individual textures, and rely on the parent texture object to keep the swapchain alive if necessary.
This is necessary to allow detaching textures from a swapchain.
---
dlls/wined3d/texture.c | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 4cd6d7035eb..1bf9adf869c 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1513,9 +1513,6 @@ ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
TRACE("texture %p, swapchain %p.\n", texture, texture->swapchain);
- if (texture->swapchain) - return wined3d_swapchain_incref(texture->swapchain); - refcount = InterlockedIncrement(&texture->resource.ref); TRACE("%p increasing refcount to %u.\n", texture, refcount);
@@ -1606,9 +1603,6 @@ ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
TRACE("texture %p, swapchain %p.\n", texture, texture->swapchain);
- if (texture->swapchain) - return wined3d_swapchain_decref(texture->swapchain); - refcount = InterlockedDecrement(&texture->resource.ref); TRACE("%p decreasing refcount to %u.\n", texture, refcount);