Commit 7d066631 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Flush non-coherent memory ranges in adapter_vk_unmap_bo_address().

parent 66f71443
......@@ -556,13 +556,30 @@ static void adapter_vk_unmap_bo_address(struct wined3d_context *context, const s
{
const struct wined3d_vk_info *vk_info;
struct wined3d_device_vk *device_vk;
VkMappedMemoryRange range;
struct wined3d_bo_vk *bo;
unsigned int i;
if (!(bo = (struct wined3d_bo_vk *)data->buffer_object))
return;
vk_info = wined3d_context_vk(context)->vk_info;
device_vk = wined3d_device_vk(context->device);
if (!(bo->memory_type & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT))
{
range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
range.pNext = NULL;
range.memory = bo->vk_memory;
for (i = 0; i < range_count; ++i)
{
range.offset = ranges[i].offset;
range.size = ranges[i].size;
VK_CALL(vkFlushMappedMemoryRanges(device_vk->vk_device, 1, &range));
}
}
VK_CALL(vkUnmapMemory(device_vk->vk_device, bo->vk_memory));
}
......
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