From 8db3b5512e034ee448bbbb7631e4cd79cc362edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Thu, 20 Oct 2016 12:50:53 +0200 Subject: [PATCH] wined3d: Move buffer_get_memory() under wined3d_buffer_load_sysmem(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/buffer.c | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 4a4d3674ca2..8f356d85d49 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -504,31 +504,6 @@ static inline unsigned int fixup_transformed_pos(float *p) return 4 * sizeof(*p); } -/* Context activation is done by the caller. */ -void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *context, - struct wined3d_bo_address *data) -{ - data->buffer_object = buffer->buffer_object; - if (!buffer->buffer_object) - { - if ((buffer->flags & WINED3D_BUFFER_USE_BO) && !buffer->resource.map_count) - { - buffer_create_buffer_object(buffer, context); - if (buffer->buffer_object) - { - data->buffer_object = buffer->buffer_object; - data->addr = NULL; - return; - } - } - data->addr = buffer->resource.heap_memory; - } - else - { - data->addr = NULL; - } -} - ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer) { ULONG refcount = InterlockedIncrement(&buffer->resource.ref); @@ -628,6 +603,31 @@ BYTE *wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_c return buffer->resource.heap_memory; } +/* Context activation is done by the caller. */ +void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *context, + struct wined3d_bo_address *data) +{ + data->buffer_object = buffer->buffer_object; + if (!buffer->buffer_object) + { + if ((buffer->flags & WINED3D_BUFFER_USE_BO) && !buffer->resource.map_count) + { + buffer_create_buffer_object(buffer, context); + if (buffer->buffer_object) + { + data->buffer_object = buffer->buffer_object; + data->addr = NULL; + return; + } + } + data->addr = buffer->resource.heap_memory; + } + else + { + data->addr = NULL; + } +} + static void buffer_unload(struct wined3d_resource *resource) { struct wined3d_buffer *buffer = buffer_from_resource(resource);