vulkan: allow alloc pNext in ff_vk_create_buf
This commit is contained in:
parent
af48790465
commit
15de0af8f0
@ -174,7 +174,7 @@ static int init_gblur_pipeline(GBlurVulkanContext *s, FFVulkanPipeline *pl, FFVk
|
||||
RET(ff_vk_init_pipeline_layout(&s->vkctx, pl));
|
||||
RET(ff_vk_init_compute_pipeline(&s->vkctx, pl));
|
||||
|
||||
RET(ff_vk_create_buf(&s->vkctx, params_buf, sizeof(float) * ksize, NULL,
|
||||
RET(ff_vk_create_buf(&s->vkctx, params_buf, sizeof(float) * ksize, NULL, NULL,
|
||||
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
|
||||
RET(ff_vk_map_buffers(&s->vkctx, params_buf, &kernel_mapped, 1, 0));
|
||||
|
||||
|
@ -253,7 +253,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
|
||||
}
|
||||
|
||||
RET(ff_vk_create_buf(vkctx, &s->params_buf,
|
||||
sizeof(*par), NULL,
|
||||
sizeof(*par), NULL, NULL,
|
||||
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
|
||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));
|
||||
|
||||
|
@ -232,7 +232,8 @@ int ff_vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext,
|
||||
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size,
|
||||
void *pNext, void *alloc_pNext,
|
||||
VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags)
|
||||
{
|
||||
int err;
|
||||
@ -254,7 +255,7 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNe
|
||||
};
|
||||
VkMemoryDedicatedAllocateInfo ded_alloc = {
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
|
||||
.pNext = NULL,
|
||||
.pNext = alloc_pNext,
|
||||
};
|
||||
VkMemoryDedicatedRequirements ded_req = {
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS,
|
||||
|
@ -413,7 +413,8 @@ int ff_vk_submit_exec_queue(FFVulkanContext *s, FFVkExecContext *e);
|
||||
/**
|
||||
* Create a VkBuffer with the specified parameters.
|
||||
*/
|
||||
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext,
|
||||
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size,
|
||||
void *pNext, void *alloc_pNext,
|
||||
VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags);
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user