[PATCH 6/9] wined3d: Replace wined3d_buffer_load_sysmem() calls with wined3d_buffer_load_location().
Józef Kucia
jkucia at codeweavers.com
Thu Oct 20 05:50:55 CDT 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
dlls/wined3d/buffer.c | 14 +++++---------
dlls/wined3d/context.c | 2 +-
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index e559586..ebf95c4 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -648,12 +648,9 @@ static void buffer_unload(struct wined3d_resource *resource)
context = context_acquire(device, NULL);
- /* Download the buffer, but don't permanently enable double buffering */
- if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
- {
- wined3d_buffer_load_sysmem(buffer, context);
- buffer->flags &= ~WINED3D_BUFFER_DOUBLEBUFFER;
- }
+ /* Download the buffer, but don't permanently enable double buffering. */
+ wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM);
+ buffer->flags &= ~WINED3D_BUFFER_DOUBLEBUFFER;
wined3d_buffer_invalidate_location(buffer, WINED3D_LOCATION_BUFFER);
delete_gl_buffer(buffer, context->gl_info);
@@ -995,8 +992,7 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *
if (buffer->buffer_type_hint != GL_ARRAY_BUFFER)
ERR("Converting data in non-vertex buffer.\n");
- if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
- wined3d_buffer_load_sysmem(buffer, context);
+ wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM);
/* Now for each vertex in the buffer that needs conversion */
vertex_count = buffer->resource.size / buffer->stride;
@@ -1151,7 +1147,7 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
else
{
TRACE("Falling back to doublebuffered operation.\n");
- wined3d_buffer_load_sysmem(buffer, context);
+ wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM);
}
TRACE("New pointer is %p.\n", buffer->resource.heap_memory);
buffer->map_ptr = NULL;
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 1ca12bc..a7835f6 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -3432,7 +3432,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context,
if (context->stream_info.all_vbo)
wined3d_buffer_load(state->index_buffer, context, state);
else
- wined3d_buffer_load_sysmem(state->index_buffer, context);
+ wined3d_buffer_load_location(state->index_buffer, context, WINED3D_LOCATION_SYSMEM);
}
for (i = 0; i < context->numDirtyEntries; ++i)
--
2.7.3
More information about the wine-patches
mailing list