FFmpeg 5.1.6
Data Fields
AVVulkanDeviceContext Struct Reference

Main Vulkan context, allocated as AVHWDeviceContext.hwctx. More...

#include <libavutil/hwcontext_vulkan.h>

Data Fields

const VkAllocationCallbacks * alloc
 Custom memory allocator, else NULL. More...
 
PFN_vkGetInstanceProcAddr get_proc_addr
 Pointer to the instance-provided vkGetInstanceProcAddr loading function. More...
 
VkInstance inst
 Vulkan instance. More...
 
VkPhysicalDevice phys_dev
 Physical device. More...
 
VkDevice act_dev
 Active device. More...
 
VkPhysicalDeviceFeatures2 device_features
 This structure should be set to the set of features that present and enabled during device creation. More...
 
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
 
int queue_family_index
 Queue family index for graphics operations, and the number of queues enabled for it. More...
 
int nb_graphics_queues
 
int queue_family_tx_index
 Queue family index for transfer operations and the number of queues enabled. More...
 
int nb_tx_queues
 
int queue_family_comp_index
 Queue family index for compute operations and the number of queues enabled. More...
 
int nb_comp_queues
 
int queue_family_encode_index
 Queue family index for video encode ops, and the amount of queues enabled. More...
 
int nb_encode_queues
 
int queue_family_decode_index
 Queue family index for video decode ops, and the amount of queues enabled. More...
 
int nb_decode_queues
 

Detailed Description

Main Vulkan context, allocated as AVHWDeviceContext.hwctx.

All of these can be set before init to change what the context uses

Definition at line 42 of file hwcontext_vulkan.h.

Field Documentation

◆ alloc

const VkAllocationCallbacks* AVVulkanDeviceContext::alloc

Custom memory allocator, else NULL.

Definition at line 46 of file hwcontext_vulkan.h.

◆ get_proc_addr

PFN_vkGetInstanceProcAddr AVVulkanDeviceContext::get_proc_addr

Pointer to the instance-provided vkGetInstanceProcAddr loading function.

If NULL, will pick either libvulkan or libvolk, depending on libavutil's compilation settings, and set this field.

Definition at line 53 of file hwcontext_vulkan.h.

◆ inst

VkInstance AVVulkanDeviceContext::inst

Vulkan instance.

Must be at least version 1.2.

Definition at line 58 of file hwcontext_vulkan.h.

◆ phys_dev

VkPhysicalDevice AVVulkanDeviceContext::phys_dev

Physical device.

Definition at line 63 of file hwcontext_vulkan.h.

◆ act_dev

VkDevice AVVulkanDeviceContext::act_dev

Active device.

Definition at line 68 of file hwcontext_vulkan.h.

◆ device_features

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 76 of file hwcontext_vulkan.h.

◆ enabled_inst_extensions

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 85 of file hwcontext_vulkan.h.

◆ nb_enabled_inst_extensions

int AVVulkanDeviceContext::nb_enabled_inst_extensions

Definition at line 86 of file hwcontext_vulkan.h.

◆ enabled_dev_extensions

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 96 of file hwcontext_vulkan.h.

◆ nb_enabled_dev_extensions

int AVVulkanDeviceContext::nb_enabled_dev_extensions

Definition at line 97 of file hwcontext_vulkan.h.

◆ queue_family_index

int AVVulkanDeviceContext::queue_family_index

Queue family index for graphics operations, and the number of queues enabled for it.

If unavaiable, will be set to -1. Not required. av_hwdevice_create() will attempt to find a dedicated queue for each queue family, or pick the one with the least unrelated flags set. Queue indices here may overlap if a queue has to share capabilities.

Definition at line 106 of file hwcontext_vulkan.h.

◆ nb_graphics_queues

int AVVulkanDeviceContext::nb_graphics_queues

Definition at line 107 of file hwcontext_vulkan.h.

◆ queue_family_tx_index

int AVVulkanDeviceContext::queue_family_tx_index

Queue family index for transfer operations and the number of queues enabled.

Required.

Definition at line 113 of file hwcontext_vulkan.h.

◆ nb_tx_queues

int AVVulkanDeviceContext::nb_tx_queues

Definition at line 114 of file hwcontext_vulkan.h.

◆ queue_family_comp_index

int AVVulkanDeviceContext::queue_family_comp_index

Queue family index for compute operations and the number of queues enabled.

Required.

Definition at line 120 of file hwcontext_vulkan.h.

◆ nb_comp_queues

int AVVulkanDeviceContext::nb_comp_queues

Definition at line 121 of file hwcontext_vulkan.h.

◆ queue_family_encode_index

int AVVulkanDeviceContext::queue_family_encode_index

Queue family index for video encode ops, and the amount of queues enabled.

If the device doesn't support such, queue_family_encode_index will be -1. Not required.

Definition at line 128 of file hwcontext_vulkan.h.

◆ nb_encode_queues

int AVVulkanDeviceContext::nb_encode_queues

Definition at line 129 of file hwcontext_vulkan.h.

◆ queue_family_decode_index

int AVVulkanDeviceContext::queue_family_decode_index

Queue family index for video decode ops, and the amount of queues enabled.

If the device doesn't support such, queue_family_decode_index will be -1. Not required.

Definition at line 136 of file hwcontext_vulkan.h.

◆ nb_decode_queues

int AVVulkanDeviceContext::nb_decode_queues

Definition at line 137 of file hwcontext_vulkan.h.


The documentation for this struct was generated from the following file: