[PATCH 5/5] wined3d: Discard non-sysmem locations in unload.
Stefan Dösinger
stefan at codeweavers.com
Sat Nov 23 17:19:00 CST 2013
---
dlls/wined3d/surface.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 1be985b..9a52af0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1173,7 +1173,6 @@ static void surface_unload(struct wined3d_resource *resource)
surface_prepare_system_memory(surface);
memset(surface->resource.allocatedMemory, 0, surface->resource.size);
surface_validate_location(surface, SFLAG_INSYSMEM);
- surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
/* We also get here when the ddraw swapchain is destroyed, for example
* for a mode switch. In this case this surface won't necessarily be
@@ -1183,11 +1182,9 @@ static void surface_unload(struct wined3d_resource *resource)
}
else
{
- /* Load the surface into system memory */
surface_load_location(surface, SFLAG_INSYSMEM);
- surface_invalidate_location(surface, surface->draw_binding);
}
- surface_invalidate_location(surface, SFLAG_INTEXTURE | SFLAG_INSRGBTEX);
+ surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
context = context_acquire(device, NULL);
--
1.8.3.2
More information about the wine-patches
mailing list