FFmpeg
Loading...
Searching...
No Matches
vulkan_loader.h File Reference
#include <stdio.h>
#include "avassert.h"
#include "vulkan_functions.h"

Go to the source code of this file.

Macros

#define PFN_LOAD_INFO(req_inst, req_dev, ext_flag, name)
 
#define FUNC_NAME(req_inst, req_dev, ext_flag, name)
 

Functions

static uint64_t ff_vk_extensions_to_mask (const char *const *extensions, int nb_extensions)
 
static int ff_vk_load_functions (AVHWDeviceContext *ctx, FFVulkanFunctions *vk, uint64_t extensions_mask, int has_inst, int has_dev)
 Function loader.
 

Macro Definition Documentation

◆ PFN_LOAD_INFO

#define PFN_LOAD_INFO ( req_inst,
req_dev,
ext_flag,
name )
Value:
{ \
req_inst, \
req_dev, \
offsetof(FFVulkanFunctions, name), \
ext_flag, \
},
const char * name
Definition qsvenc.c:142

Definition at line 28 of file vulkan_loader.h.

Referenced by ff_vk_load_functions().

◆ FUNC_NAME

#define FUNC_NAME ( req_inst,
req_dev,
ext_flag,
name )
Value:
"vk"#name"\0"

Function Documentation

◆ ff_vk_extensions_to_mask()

static uint64_t ff_vk_extensions_to_mask ( const char *const * extensions,
int nb_extensions )
inlinestatic

◆ ff_vk_load_functions()

static int ff_vk_load_functions ( AVHWDeviceContext * ctx,
FFVulkanFunctions * vk,
uint64_t extensions_mask,
int has_inst,
int has_dev )
inlinestatic

Function loader.

Vulkan function from scratch loading happens in 3 stages - the first one is before any initialization has happened, and you have neither an instance structure nor a device structure. At this stage, you can only get the bare minimals to initialize an instance. The second stage is when you have an instance. At this stage, you can initialize a VkDevice, and have an idea of what extensions each device supports. Finally, in the third stage, you can proceed and load all core functions, plus you can be sure that any extensions you've enabled during device initialization will be available.

Definition at line 140 of file vulkan_loader.h.

Referenced by create_instance(), ff_vk_filter_init_context(), ff_vk_init(), ff_vulkan_encode_init(), vulkan_decode_bootstrap(), and vulkan_device_init().