Module: wine
Branch: master
Commit: b57d1e7c33e704343d2c02995bf01b957718f4d4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b57d1e7c33e704343d2c02995…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Tue Dec 20 21:42:10 2011 +0100
wined3d: Don't call surface_init_sysmem() on surfaces with a PBO.
---
dlls/wined3d/surface.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 64dd24d..998d28e 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1810,7 +1810,8 @@ static void surface_unload(struct wined3d_resource *resource)
* or the depth stencil into an FBO the texture or render buffer will be removed
* and all flags get lost
*/
- surface_init_sysmem(surface);
+ if (!(surface->flags & SFLAG_PBO))
+ surface_init_sysmem(surface);
/* 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
* an implicit surface. We have to mark it lost so that the