From df2b1bea63223533fcae81eccf9abe86b2fc8dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Mon, 7 Apr 2008 23:24:12 +0200 Subject: [PATCH] wined3d: Mark the SYSMEM copy outdated after releasing memory. Strictly speaking this is redundant because the UnLoad before did the job, but if we mess with the allocated memory we have to tell the surface about that. Updating INDRAWABLE will automatically mark SYSMEM outdated. --- dlls/wined3d/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index cd39e2087f4..c5944603466 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -7002,6 +7002,8 @@ static void updateSurfaceDesc(IWineD3DSurfaceImpl *surface, WINED3DPRESENT_PARAM surface->resource.allocatedMemory = NULL; surface->resource.heapMemory = NULL; surface->resource.size = IWineD3DSurface_GetPitch((IWineD3DSurface *) surface) * surface->pow2Width; + /* INDRAWABLE is a sane place for implicit targets / depth stencil after the reset */ + IWineD3DSurface_ModifyLocation((IWineD3DSurface *) surface, SFLAG_INDRAWABLE, TRUE); } static HRESULT WINAPI reset_unload_resources(IWineD3DResource *resource, void *data) {