wined3d: Try to avoid stalling on dynamic buffer maps.

Particularly for applications that use dynamic buffers without
WINED3D_MAP_DISCARD/WINED3D_MAP_NOOVERWRITE.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-01-30 13:04:40 +01:00 committed by Alexandre Julliard
parent efdb898bef
commit afb2aa2512
1 changed files with 2 additions and 1 deletions

View File

@ -1039,7 +1039,8 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
dirty_size = 0;
}
if (buffer->flags & WINED3D_BUFFER_PIN_SYSMEM)
if (!(flags & (WINED3D_MAP_NOOVERWRITE | WINED3D_MAP_DISCARD | WINED3D_MAP_READONLY))
|| buffer->flags & WINED3D_BUFFER_PIN_SYSMEM)
{
if (!(buffer->locations & WINED3D_LOCATION_SYSMEM))
{