[PATCH 4/5] wined3d: Try to avoid stalling on dynamic buffer maps.

Henri Verbeet hverbeet at codeweavers.com
Mon Jan 30 06:04:40 CST 2017


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

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 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 33571d0..abf3f7f 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))
             {
-- 
2.1.4




More information about the wine-patches mailing list