|
|
|
@ -174,7 +174,7 @@ void ff_vk_qf_rotate(FFVkQueueFamilyCtx *qf) |
|
|
|
|
qf->cur_queue = (qf->cur_queue + 1) % qf->nb_queues; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, |
|
|
|
|
int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, |
|
|
|
|
VkMemoryPropertyFlagBits req_flags, void *alloc_extension, |
|
|
|
|
VkMemoryPropertyFlagBits *mem_flags, VkDeviceMemory *mem) |
|
|
|
|
{ |
|
|
|
@ -225,6 +225,7 @@ static int vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req, |
|
|
|
|
return AVERROR(ENOMEM); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mem_flags) |
|
|
|
|
*mem_flags |= s->mprops.memoryTypes[index].propertyFlags; |
|
|
|
|
|
|
|
|
|
return 0; |
|
|
|
@ -279,7 +280,7 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNe |
|
|
|
|
if (use_ded_mem) |
|
|
|
|
ded_alloc.buffer = buf->buf; |
|
|
|
|
|
|
|
|
|
err = vk_alloc_mem(s, &req.memoryRequirements, flags, |
|
|
|
|
err = ff_vk_alloc_mem(s, &req.memoryRequirements, flags, |
|
|
|
|
use_ded_mem ? &ded_alloc : (void *)ded_alloc.pNext, |
|
|
|
|
&buf->flags, &buf->mem); |
|
|
|
|
if (err) |
|
|
|
|