vulkan: add pNext argument to ff_vk_create_buf()

pull/389/head
Lynne 3 years ago
parent a0d47a2ad9
commit b5e333bba7
No known key found for this signature in database
GPG Key ID: A2FEA5F03F034464
  1. 2
      libavfilter/vf_gblur_vulkan.c
  2. 2
      libavfilter/vf_overlay_vulkan.c
  3. 2
      libavfilter/vf_scale_vulkan.c
  4. 4
      libavutil/vulkan.c
  5. 2
      libavutil/vulkan.h

@ -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));

@ -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)

@ -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));

@ -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

@ -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);
/**

Loading…
Cancel
Save