Henri Verbeet : wined3d: Try to avoid stalling on dynamic buffer maps.

Alexandre Julliard julliard at winehq.org
Sun Mar 18 09:02:34 CDT 2018


Module: wine
Branch: oldstable
Commit: 77a1b76ee6a9686a2184e6372fa69525e30bd7c7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=77a1b76ee6a9686a2184e6372fa69525e30bd7c7

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jan 30 13:04:40 2017 +0100

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit afb2aa2512d4c5ffa7256ce5137bc2c142a5d065)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 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 f87c4b3..d7eada7 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1102,7 +1102,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))
             {




More information about the wine-cvs mailing list