vulkan: add pNext argument to ff_vk_create_buf()

This commit is contained in:
Lynne 2022-03-17 12:23:56 +01:00
parent a0d47a2ad9
commit b5e333bba7
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
5 changed files with 6 additions and 6 deletions

View File

@ -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,
RET(ff_vk_create_buf(&s->vkctx, params_buf, sizeof(float) * ksize, 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));

View File

@ -181,7 +181,7 @@ static av_cold int init_filter(AVFilterContext *ctx)
} *par;
err = ff_vk_create_buf(vkctx, &s->params_buf,
sizeof(*par),
sizeof(*par), NULL,
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
if (err)

View File

@ -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),
sizeof(*par), NULL,
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT));

View File

@ -205,7 +205,7 @@ static int vk_alloc_mem(FFVulkanContext *s, VkMemoryRequirements *req,
return 0;
}
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size,
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext,
VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags)
{
int err;
@ -215,7 +215,7 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size,
VkBufferCreateInfo buf_spawn = {
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
.pNext = NULL,
.pNext = pNext,
.usage = usage,
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
.size = size, /* Gets FFALIGNED during alloc if host visible

View File

@ -397,7 +397,7 @@ 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,
int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, void *pNext,
VkBufferUsageFlags usage, VkMemoryPropertyFlagBits flags);
/**