mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 09:32:43 +00:00
vulkan: use only coherency to flush mapped memory when needed
Host map'd bufs skipped flushes unconditionally, always forcing the coherent flag regardless of the memory type actually chosen for the import. All known implementations import host memory as coherent, in which case nothing changes.
This commit is contained in:
@@ -1161,7 +1161,7 @@ int ff_vk_flush_buffer(FFVulkanContext *s, FFVkBuffer *buf,
|
||||
VkResult ret;
|
||||
FFVulkanFunctions *vk = &s->vkfn;
|
||||
|
||||
if (buf->host_ref || buf->flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
|
||||
if (buf->flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
|
||||
return 0;
|
||||
|
||||
const VkMappedMemoryRange flush_data = {
|
||||
@@ -1434,7 +1434,6 @@ int ff_vk_host_map_buffer(FFVulkanContext *s, FFVkBuffer **dst,
|
||||
vkb->address += offs;
|
||||
vkb->mapped_mem = src_data;
|
||||
vkb->size = buffer_size - offs;
|
||||
vkb->flags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
|
||||
*dst = vkb;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user