Commit cef12f97 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Drop the "bind_flags" parameter to wined3d_adapter_ops.adapter_unmap_bo_address().

parent 5e5db31c
......@@ -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);
}
......
......@@ -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,
......
......@@ -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,
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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,
......
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