FFmpeg
|
Main Vulkan context, allocated as AVHWDeviceContext.hwctx. More...
#include <hwcontext_vulkan.h>
Data Fields | |
const VkAllocationCallbacks * | alloc |
Custom memory allocator, else NULL. More... | |
VkInstance | inst |
Vulkan instance. More... | |
VkPhysicalDevice | phys_dev |
Physical device. More... | |
VkDevice | act_dev |
Active device. More... | |
int | queue_family_index |
Queue family index for graphics. More... | |
int | nb_graphics_queues |
int | queue_family_tx_index |
Queue family index to use for transfer operations, and the amount of queues enabled. More... | |
int | nb_tx_queues |
int | queue_family_comp_index |
Queue family index for compute ops, and the amount of queues enabled. More... | |
int | nb_comp_queues |
const char *const * | enabled_inst_extensions |
Enabled instance extensions. More... | |
int | nb_enabled_inst_extensions |
const char *const * | enabled_dev_extensions |
Enabled device extensions. More... | |
int | nb_enabled_dev_extensions |
VkPhysicalDeviceFeatures2 | device_features |
This structure should be set to the set of features that present and enabled during device creation. More... | |
Main Vulkan context, allocated as AVHWDeviceContext.hwctx.
All of these can be set before init to change what the context uses
Definition at line 39 of file hwcontext_vulkan.h.
const VkAllocationCallbacks* AVVulkanDeviceContext::alloc |
Custom memory allocator, else NULL.
Definition at line 43 of file hwcontext_vulkan.h.
Referenced by alloc_mem(), create_exec_ctx(), create_frame(), create_instance(), free_buf(), free_exec_ctx(), vulkan_device_create_internal(), vulkan_device_free(), vulkan_frame_free(), and wait_start_exec_ctx().
VkInstance AVVulkanDeviceContext::inst |
Vulkan instance.
Must be at least version 1.1.
Definition at line 47 of file hwcontext_vulkan.h.
Referenced by create_instance(), find_device(), and vulkan_device_free().
VkPhysicalDevice AVVulkanDeviceContext::phys_dev |
Physical device.
Definition at line 51 of file hwcontext_vulkan.h.
Referenced by check_extensions(), cuda_device_derive(), find_device(), pixfmt_is_supported(), search_queue_families(), try_export_flags(), vulkan_device_create_internal(), and vulkan_device_init().
VkDevice AVVulkanDeviceContext::act_dev |
Active device.
Definition at line 55 of file hwcontext_vulkan.h.
Referenced by alloc_bind_mem(), alloc_mem(), create_buf(), create_exec_ctx(), create_frame(), free_buf(), free_exec_ctx(), map_buffers(), submit_exec_ctx(), unmap_buffers(), vulkan_device_create_internal(), vulkan_device_free(), vulkan_frame_free(), vulkan_unmap_frame(), and wait_start_exec_ctx().
int AVVulkanDeviceContext::queue_family_index |
Queue family index for graphics.
Definition at line 64 of file hwcontext_vulkan.h.
Referenced by search_queue_families(), and vulkan_device_init().
int AVVulkanDeviceContext::nb_graphics_queues |
Definition at line 65 of file hwcontext_vulkan.h.
Referenced by search_queue_families().
int AVVulkanDeviceContext::queue_family_tx_index |
Queue family index to use for transfer operations, and the amount of queues enabled.
In case there is no dedicated transfer queue, nb_tx_queues must be 0 and queue_family_tx_index must be the same as either the graphics queue or the compute queue, if available.
Definition at line 72 of file hwcontext_vulkan.h.
Referenced by search_queue_families(), vulkan_device_init(), and vulkan_frames_init().
int AVVulkanDeviceContext::nb_tx_queues |
Definition at line 73 of file hwcontext_vulkan.h.
Referenced by search_queue_families().
int AVVulkanDeviceContext::queue_family_comp_index |
Queue family index for compute ops, and the amount of queues enabled.
In case there are no dedicated compute queues, nb_comp_queues must be 0 and its queue family index must be set to the graphics queue.
Definition at line 79 of file hwcontext_vulkan.h.
Referenced by search_queue_families(), vulkan_device_init(), and vulkan_frames_init().
int AVVulkanDeviceContext::nb_comp_queues |
Definition at line 80 of file hwcontext_vulkan.h.
Referenced by search_queue_families().
const char* const * AVVulkanDeviceContext::enabled_inst_extensions |
Enabled instance extensions.
If supplying your own device context, set this to an array of strings, with each entry containing the specified Vulkan extension string to enable. Duplicates are possible and accepted. If no extensions are enabled, set these fields to NULL, and 0 respectively.
Definition at line 88 of file hwcontext_vulkan.h.
Referenced by create_instance(), and vulkan_device_free().
int AVVulkanDeviceContext::nb_enabled_inst_extensions |
Definition at line 89 of file hwcontext_vulkan.h.
Referenced by create_instance(), and vulkan_device_free().
const char* const * AVVulkanDeviceContext::enabled_dev_extensions |
Enabled device extensions.
By default, VK_KHR_external_memory_fd, VK_EXT_external_memory_dma_buf, VK_EXT_image_drm_format_modifier, VK_KHR_external_semaphore_fd and VK_EXT_external_memory_host are enabled if found. If supplying your own device context, these fields takes the same format as the above fields, with the same conditions that duplicates are possible and accepted, and that NULL and 0 respectively means no extensions are enabled.
Definition at line 98 of file hwcontext_vulkan.h.
Referenced by vulkan_device_create_internal(), vulkan_device_free(), and vulkan_device_init().
int AVVulkanDeviceContext::nb_enabled_dev_extensions |
Definition at line 99 of file hwcontext_vulkan.h.
Referenced by vulkan_device_create_internal(), vulkan_device_free(), and vulkan_device_init().
VkPhysicalDeviceFeatures2 AVVulkanDeviceContext::device_features |
This structure should be set to the set of features that present and enabled during device creation.
When a device is created by FFmpeg, it will default to enabling all that are present of the shaderImageGatherExtended, fragmentStoresAndAtomics, shaderInt64 and vertexPipelineStoresAndAtomics features.
Definition at line 106 of file hwcontext_vulkan.h.
Referenced by vulkan_device_create_internal().