Module: wine Branch: master Commit: 18bf8b49b38709e39d4ccd4d60bbb98c49adc083 URL: http://source.winehq.org/git/wine.git/?a=commit;h=18bf8b49b38709e39d4ccd4d60...
Author: Stefan Dösinger stefan@codeweavers.com Date: Fri Jan 10 12:40:45 2014 +0100
wined3d: Move location flag updating out of surface_init_sysmem.
---
dlls/wined3d/surface.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index ee07e19..6e15c00 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1341,9 +1341,6 @@ static BOOL surface_init_sysmem(struct wined3d_surface *surface) surface->resource.allocatedMemory = surface->resource.heap_memory; }
- surface_validate_location(surface, SFLAG_INSYSMEM); - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); - return TRUE; }
@@ -1370,7 +1367,10 @@ static void surface_unload(struct wined3d_resource *resource) * and all flags get lost */ if (!(surface->flags & SFLAG_PBO)) + { surface_init_sysmem(surface); + surface_validate_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 * an implicit surface. We have to mark it lost so that the @@ -2784,11 +2784,12 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface, return hr; } surface->resource.allocatedMemory = surface->dib.bitmap_data; - surface->flags |= SFLAG_INSYSMEM; } else if (!surface_init_sysmem(surface)) return E_OUTOFMEMORY;
+ surface_validate_location(surface, SFLAG_INSYSMEM); + return WINED3D_OK; }