From afb2aa2512d4c5ffa7256ce5137bc2c142a5d065 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 30 Jan 2017 13:04:40 +0100 Subject: [PATCH] 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 Signed-off-by: Alexandre Julliard --- dlls/wined3d/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 33571d00030..abf3f7f80f9 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -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)) {