Commit 78abb8ae authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Simply use surface_modify_location() in IWineD3DSurfaceImpl_Map() with…

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.
parent d3fd7b24
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment