Commit 01251f3d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use the previous "dirty" status to set WINED3D_BUFFER_NOSYNC in wined3d_buffer_map().

This (presumably) fixes a regression introduced by commit c1032e97.
parent 8c19371b
...@@ -939,6 +939,7 @@ struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffe ...@@ -939,6 +939,7 @@ struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffe
HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags) HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags)
{ {
BOOL dirty = buffer_is_dirty(buffer);
LONG count; LONG count;
BYTE *base; BYTE *base;
...@@ -1034,7 +1035,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN ...@@ -1034,7 +1035,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
if (!(flags & WINED3D_MAP_NOOVERWRITE)) if (!(flags & WINED3D_MAP_NOOVERWRITE))
buffer->flags &= ~WINED3D_BUFFER_NOSYNC; buffer->flags &= ~WINED3D_BUFFER_NOSYNC;
else if (!buffer_is_dirty(buffer)) else if (!dirty)
buffer->flags |= WINED3D_BUFFER_NOSYNC; buffer->flags |= WINED3D_BUFFER_NOSYNC;
} }
......
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