Commit 69bdff62 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Avoid moving buffers while they're mapped.

parent 263df244
......@@ -476,7 +476,7 @@ void buffer_get_memory(struct wined3d_buffer *buffer, const struct wined3d_gl_in
data->buffer_object = buffer->buffer_object;
if (!buffer->buffer_object)
{
if (buffer->flags & WINED3D_BUFFER_CREATEBO)
if ((buffer->flags & WINED3D_BUFFER_CREATEBO) && !buffer->resource.map_count)
{
buffer_create_buffer_object(buffer, gl_info);
buffer->flags &= ~WINED3D_BUFFER_CREATEBO;
......@@ -753,6 +753,12 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
TRACE("buffer %p.\n", buffer);
if (buffer->resource.map_count)
{
WARN("Buffer is mapped, skipping preload.\n");
return;
}
buffer->flags &= ~(WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD);
if (!buffer->buffer_object)
......
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