wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
commita5214c306fd82982ed10fd8221ac00230186c9a6
authorHenri Verbeet <hverbeet@codeweavers.com>
Wed, 16 Sep 2009 06:37:15 +0000 (16 08:37 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 16 Sep 2009 18:04:32 +0000 (16 13:04 -0500)
tree1e85b87980c3f00ac4c3df9f4c65496cdb719c34
parent6b6d8ccc393a439453c5bb4fdea335e40cb1318b
wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.

This prevents for example a d3d9 depth stencil from being destroyed when it
has no external references but is still in use by the device/stateblock. A
nice side effect is that it simplifies handling of "implicit" surfaces like
the frontbuffer and backbuffers, as well as the forwarding of reference counts
for surfaces that are part of a texture.
32 files changed:
dlls/d3d10core/device.c
dlls/d3d10core/texture2d.c
dlls/d3d8/cubetexture.c
dlls/d3d8/d3d8_private.h
dlls/d3d8/device.c
dlls/d3d8/directx.c
dlls/d3d8/surface.c
dlls/d3d8/swapchain.c
dlls/d3d8/texture.c
dlls/d3d9/cubetexture.c
dlls/d3d9/d3d9_private.h
dlls/d3d9/device.c
dlls/d3d9/directx.c
dlls/d3d9/surface.c
dlls/d3d9/swapchain.c
dlls/d3d9/texture.c
dlls/ddraw/ddraw.c
dlls/ddraw/ddraw_private.h
dlls/ddraw/main.c
dlls/ddraw/surface.c
dlls/dxgi/swapchain.c
dlls/wined3d/cubetexture.c
dlls/wined3d/device.c
dlls/wined3d/directx.c
dlls/wined3d/surface.c
dlls/wined3d/surface_base.c
dlls/wined3d/swapchain.c
dlls/wined3d/swapchain_base.c
dlls/wined3d/swapchain_gdi.c
dlls/wined3d/texture.c
dlls/wined3d/wined3d_private.h
include/wine/wined3d.idl