From 78abb8ae07190714546ecc770680e54fcee20d66 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 11 Nov 2010 12:39:19 +0100 Subject: [PATCH] wined3d: Simply use surface_modify_location() in IWineD3DSurfaceImpl_Map() with WINED3DLOCK_DISCARD. The call to surface_add_dirty_rect() would have taken care of evicting the other locations anyway, but we really shouldn't be touching the location flags directly. --- dlls/wined3d/surface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a18f067b3d..394ae6dad9 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1655,11 +1655,11 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Map(IWineD3DSurface *iface, TRACE("Warning: trying to lock unlockable surf@%p\n", This); } - if (Flags & WINED3DLOCK_DISCARD) { - /* Set SFLAG_INSYSMEM, so we'll never try to download the data from the texture. */ - TRACE("WINED3DLOCK_DISCARD flag passed, marking local copy as up to date\n"); - surface_prepare_system_memory(This); /* Makes sure memory is allocated */ - This->Flags |= SFLAG_INSYSMEM; + if (Flags & WINED3DLOCK_DISCARD) + { + TRACE("WINED3DLOCK_DISCARD flag passed, marking SYSMEM as up to date.\n"); + surface_prepare_system_memory(This); + surface_modify_location(This, SFLAG_INSYSMEM, TRUE); goto lock_end; } -- 2.33.8