Commit 6fd21281 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Do not preload the buffer in wined3d_buffer_unmap().

parent 413ccc82
......@@ -879,7 +879,7 @@ drop_query:
This->flags &= ~WINED3D_BUFFER_APPLESYNC;
}
void buffer_mark_used(struct wined3d_buffer *buffer)
static void buffer_mark_used(struct wined3d_buffer *buffer)
{
buffer->flags &= ~WINED3D_BUFFER_DISCARD;
}
......@@ -1188,10 +1188,6 @@ static void wined3d_buffer_unmap(struct wined3d_buffer *buffer)
buffer_clear_dirty_areas(buffer);
buffer->map_ptr = NULL;
}
else if (buffer->flags & WINED3D_BUFFER_HASDESC)
{
wined3d_resource_preload(&buffer->resource);
}
}
HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset,
......
......@@ -3505,8 +3505,12 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i)
{
if (map & 1)
buffer_mark_used(state->streams[context->stream_info.elements[i].stream_idx].buffer);
wined3d_buffer_load(state->streams[context->stream_info.elements[i].stream_idx].buffer,
context, state);
}
/* Loading the buffers above may have invalidated the stream info. */
if (isStateDirty(context, STATE_STREAMSRC))
context_update_stream_info(context, state);
}
if (state->index_buffer)
{
......
......@@ -3239,7 +3239,6 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc
return CONTAINING_RECORD(resource, struct wined3d_buffer, resource);
}
void buffer_mark_used(struct wined3d_buffer *buffer) DECLSPEC_HIDDEN;
DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer,
struct wined3d_bo_address *data, DWORD locations) DECLSPEC_HIDDEN;
void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, DWORD location) DECLSPEC_HIDDEN;
......
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