mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vulkan: add pNext argument to ff_vk_create_buf()
This commit is contained in:
parent
a0d47a2ad9
commit
b5e333bba7
@ -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…
Reference in New Issue
Block a user