|
|
@ -962,6 +962,10 @@ int ff_vk_create_buf(FFVulkanContext *s, FFVkBuffer *buf, size_t size, |
|
|
|
.pNext = &ded_req, |
|
|
|
.pNext = &ded_req, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
av_log(s, AV_LOG_DEBUG, "Creating a buffer of %"SIZE_SPECIFIER" bytes, " |
|
|
|
|
|
|
|
"usage: 0x%x, flags: 0x%x\n", |
|
|
|
|
|
|
|
size, usage, flags); |
|
|
|
|
|
|
|
|
|
|
|
ret = vk->CreateBuffer(s->hwctx->act_dev, &buf_spawn, s->hwctx->alloc, &buf->buf); |
|
|
|
ret = vk->CreateBuffer(s->hwctx->act_dev, &buf_spawn, s->hwctx->alloc, &buf->buf); |
|
|
|
if (ret != VK_SUCCESS) { |
|
|
|
if (ret != VK_SUCCESS) { |
|
|
|
av_log(s, AV_LOG_ERROR, "Failed to create buffer: %s\n", |
|
|
|
av_log(s, AV_LOG_ERROR, "Failed to create buffer: %s\n", |
|
|
@ -1200,9 +1204,6 @@ int ff_vk_get_pooled_buffer(FFVulkanContext *ctx, AVBufferPool **buf_pool, |
|
|
|
ff_vk_free_buf(ctx, data); |
|
|
|
ff_vk_free_buf(ctx, data); |
|
|
|
memset(data, 0, sizeof(*data)); |
|
|
|
memset(data, 0, sizeof(*data)); |
|
|
|
|
|
|
|
|
|
|
|
av_log(ctx, AV_LOG_DEBUG, "Allocating buffer of %"SIZE_SPECIFIER" bytes for pool %p\n", |
|
|
|
|
|
|
|
size, *buf_pool); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
err = ff_vk_create_buf(ctx, data, size, |
|
|
|
err = ff_vk_create_buf(ctx, data, size, |
|
|
|
create_pNext, NULL, usage, |
|
|
|
create_pNext, NULL, usage, |
|
|
|
mem_props); |
|
|
|
mem_props); |
|
|
|