vulkan: add ff_vk_image_create()

This commit is contained in:
Lynne
2022-11-23 13:05:59 +01:00
parent e8fce74abf
commit fa67ccee37
2 changed files with 100 additions and 0 deletions

View File

@@ -427,6 +427,17 @@ int ff_vk_unmap_buffers(FFVulkanContext *s, FFVkBuffer *buf, int nb_buffers,
*/
void ff_vk_free_buf(FFVulkanContext *s, FFVkBuffer *buf);
/**
* Creates an image, allocates and binds memory in the given
* idx value of the dst frame. If mem is non-NULL, then no memory will be
* allocated, but instead the given memory will be bound to the image.
*/
int ff_vk_image_create(FFVulkanContext *s, AVVkFrame *dst, int idx,
int width, int height, VkFormat fmt, VkImageTiling tiling,
VkImageUsageFlagBits usage, VkImageCreateFlags flags,
void *create_pnext,
VkDeviceMemory *mem, void *alloc_pnext);
/**
* Frees the main Vulkan context.
*/