|
|
@ -883,10 +883,6 @@ int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, |
|
|
|
.pNext = alloc_extension, |
|
|
|
.pNext = alloc_extension, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/* Align if we need to */ |
|
|
|
|
|
|
|
if ((req_flags != UINT32_MAX) && req_flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) |
|
|
|
|
|
|
|
req->size = FFALIGN(req->size, s->props.properties.limits.minMemoryMapAlignment); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alloc_info.allocationSize = req->size; |
|
|
|
alloc_info.allocationSize = req->size; |
|
|
|
|
|
|
|
|
|
|
|
/* The vulkan spec requires memory types to be sorted in the "optimal"
|
|
|
|
/* The vulkan spec requires memory types to be sorted in the "optimal"
|
|
|
@ -939,8 +935,9 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, |
|
|
|
.pNext = pNext, |
|
|
|
.pNext = pNext, |
|
|
|
.usage = usage, |
|
|
|
.usage = usage, |
|
|
|
.sharingMode = VK_SHARING_MODE_EXCLUSIVE, |
|
|
|
.sharingMode = VK_SHARING_MODE_EXCLUSIVE, |
|
|
|
.size = size, /* Gets FFALIGNED during alloc if host visible
|
|
|
|
.size = flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT ? |
|
|
|
but should be ok */ |
|
|
|
FFALIGN(size, s->props.properties.limits.minMemoryMapAlignment) : |
|
|
|
|
|
|
|
size, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
VkMemoryAllocateFlagsInfo alloc_flags = { |
|
|
|
VkMemoryAllocateFlagsInfo alloc_flags = { |
|
|
|