Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/adapter_gl.c | 4 ++-- dlls/wined3d/adapter_vk.c | 8 ++++---- dlls/wined3d/buffer.c | 6 +++--- dlls/wined3d/directx.c | 4 ++-- dlls/wined3d/surface.c | 10 +++++----- dlls/wined3d/texture.c | 8 ++++---- dlls/wined3d/wined3d_private.h | 7 +++---- 7 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 9040fad8a99..e45ba3fa3f2 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4632,8 +4632,8 @@ static void *adapter_gl_map_bo_address(struct wined3d_context *context, return wined3d_context_gl_map_bo_address(wined3d_context_gl(context), data, size, map_flags); }
-static void adapter_gl_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, - uint32_t bind_flags, unsigned int range_count, const struct wined3d_range *ranges) +static void adapter_gl_unmap_bo_address(struct wined3d_context *context, + const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges) { wined3d_context_gl_unmap_bo_address(wined3d_context_gl(context), data, range_count, ranges); } diff --git a/dlls/wined3d/adapter_vk.c b/dlls/wined3d/adapter_vk.c index 938f61cf8c8..1418c1c541f 100644 --- a/dlls/wined3d/adapter_vk.c +++ b/dlls/wined3d/adapter_vk.c @@ -701,8 +701,8 @@ map: return (uint8_t *)map_ptr + bo->memory_offset + (uintptr_t)data->addr; }
-static void adapter_vk_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, - uint32_t bind_flags, unsigned int range_count, const struct wined3d_range *ranges) +static void adapter_vk_unmap_bo_address(struct wined3d_context *context, + const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges) { struct wined3d_context_vk *context_vk = wined3d_context_vk(context); const struct wined3d_vk_info *vk_info; @@ -849,8 +849,8 @@ static void adapter_vk_copy_bo_address(struct wined3d_context *context,
range.offset = 0; range.size = size; - adapter_vk_unmap_bo_address(context, dst, dst_bind_flags, 1, &range); - adapter_vk_unmap_bo_address(context, src, src_bind_flags, 0, NULL); + adapter_vk_unmap_bo_address(context, dst, 1, &range); + adapter_vk_unmap_bo_address(context, src, 0, NULL); }
static HRESULT adapter_vk_create_swapchain(struct wined3d_device *device, struct wined3d_swapchain_desc *desc, diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index a9d9d8fb71d..402a42af677 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1087,7 +1087,7 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc { WARN("Pointer %p is not %u byte aligned.\n", buffer->map_ptr, RESOURCE_ALIGNMENT);
- wined3d_context_unmap_bo_address(context, &addr, resource->bind_flags, 0, NULL); + wined3d_context_unmap_bo_address(context, &addr, 0, NULL); buffer->map_ptr = NULL;
if (resource->usage & WINED3DUSAGE_DYNAMIC) @@ -1180,7 +1180,7 @@ static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resou
addr.buffer_object = buffer->buffer_object; addr.addr = 0; - wined3d_context_unmap_bo_address(context, &addr, resource->bind_flags, range_count, buffer->maps); + wined3d_context_unmap_bo_address(context, &addr, range_count, buffer->maps);
context_release(context);
@@ -1672,7 +1672,7 @@ static void wined3d_buffer_vk_upload_ranges(struct wined3d_buffer *buffer, struc memcpy((uint8_t *)map_ptr + range->offset, (uint8_t *)data + range->offset - data_offset, range->size); }
- wined3d_context_unmap_bo_address(context, &dst, resource->bind_flags, range_count, ranges); + wined3d_context_unmap_bo_address(context, &dst, range_count, ranges); }
static void wined3d_buffer_vk_download_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index b65f13e7751..6218aacd4a6 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2418,8 +2418,8 @@ static void *adapter_no3d_map_bo_address(struct wined3d_context *context, return data->addr; }
-static void adapter_no3d_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, - uint32_t bind_flags, unsigned int range_count, const struct wined3d_range *ranges) +static void adapter_no3d_unmap_bo_address(struct wined3d_context *context, + const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges) { if (data->buffer_object) ERR("Unsupported buffer object %#lx.\n", data->buffer_object); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 366dcb90061..4f902141a1b 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -654,8 +654,8 @@ static struct wined3d_texture *surface_convert_format(struct wined3d_texture *sr range.offset = 0; range.size = dst_texture->sub_resources[0].size; wined3d_texture_invalidate_location(dst_texture, 0, ~map_binding); - wined3d_context_unmap_bo_address(context, &dst_data, 0, 1, &range); - wined3d_context_unmap_bo_address(context, &src_data, 0, 0, NULL); + wined3d_context_unmap_bo_address(context, &dst_data, 1, &range); + wined3d_context_unmap_bo_address(context, &src_data, 0, NULL); } else { @@ -2116,11 +2116,11 @@ release: } else { - wined3d_context_unmap_bo_address(context, &dst_data, 0, 1, &dst_range); + wined3d_context_unmap_bo_address(context, &dst_data, 1, &dst_range); }
if (!same_sub_resource) - wined3d_context_unmap_bo_address(context, &src_data, 0, 0, NULL); + wined3d_context_unmap_bo_address(context, &src_data, 0, NULL); if (SUCCEEDED(hr) && dst_texture->swapchain && dst_texture->swapchain->front_buffer == dst_texture) { SetRect(&dst_texture->swapchain->front_buffer_update, @@ -2254,7 +2254,7 @@ static void surface_cpu_blt_colour_fill(struct wined3d_rendertarget_view *view, memcpy(dst, map.data, w * h * bpp); }
- wined3d_context_unmap_bo_address(context, &data, 0, 1, &range); + wined3d_context_unmap_bo_address(context, &data, 1, &range); context_release(context); }
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 7f317335477..b7e9eec6852 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -791,7 +791,7 @@ static void wined3d_texture_destroy_dc(void *object) context = context_acquire(device, NULL, 0); range.offset = 0; range.size = texture->sub_resources[sub_resource_idx].size; - wined3d_context_unmap_bo_address(context, &data, 0, 1, &range); + wined3d_context_unmap_bo_address(context, &data, 1, &range); context_release(context); } } @@ -3240,7 +3240,7 @@ static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *reso wined3d_texture_get_memory(texture, sub_resource_idx, &data, texture->resource.map_binding); range.offset = 0; range.size = sub_resource->size; - wined3d_context_unmap_bo_address(context, &data, 0, !!(sub_resource->map_flags & WINED3D_MAP_WRITE), &range); + wined3d_context_unmap_bo_address(context, &data, !!(sub_resource->map_flags & WINED3D_MAP_WRITE), &range);
context_release(context);
@@ -4311,7 +4311,7 @@ static void wined3d_texture_vk_upload_data(struct wined3d_context *context,
range.offset = 0; range.size = sub_resource->size; - wined3d_context_unmap_bo_address(context, &staging_bo_addr, 0, 1, &range); + wined3d_context_unmap_bo_address(context, &staging_bo_addr, 1, &range);
if (!(vk_command_buffer = wined3d_context_vk_get_command_buffer(context_vk))) { @@ -4506,7 +4506,7 @@ static void wined3d_texture_vk_download_data(struct wined3d_context *context,
range.offset = 0; range.size = sub_resource->size; - wined3d_context_unmap_bo_address(context, &staging_bo_addr, 0, 1, &range); + wined3d_context_unmap_bo_address(context, &staging_bo_addr, 1, &range); wined3d_context_vk_destroy_bo(context_vk, &staging_bo); }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 6a6b26a6ff5..b5012283769 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2966,7 +2966,7 @@ struct wined3d_adapter_ops void *(*adapter_map_bo_address)(struct wined3d_context *context, const struct wined3d_bo_address *data, size_t size, uint32_t bind_flags, uint32_t map_flags); void (*adapter_unmap_bo_address)(struct wined3d_context *context, const struct wined3d_bo_address *data, - uint32_t bind_flags, unsigned int range_count, const struct wined3d_range *ranges); + unsigned int range_count, const struct wined3d_range *ranges); void (*adapter_copy_bo_address)(struct wined3d_context *context, const struct wined3d_bo_address *dst, uint32_t dst_bind_flags, const struct wined3d_bo_address *src, uint32_t src_bind_flags, size_t size); @@ -5481,10 +5481,9 @@ static inline void *wined3d_context_map_bo_address(struct wined3d_context *conte }
static inline void wined3d_context_unmap_bo_address(struct wined3d_context *context, - const struct wined3d_bo_address *data, uint32_t bind_flags, - unsigned int range_count, const struct wined3d_range *ranges) + const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges) { - context->device->adapter->adapter_ops->adapter_unmap_bo_address(context, data, bind_flags, range_count, ranges); + context->device->adapter->adapter_ops->adapter_unmap_bo_address(context, data, range_count, ranges); }
static inline void wined3d_context_copy_bo_address(struct wined3d_context *context,