From: Zebediah Figura zfigura@codeweavers.com
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);