FFmpeg
Macros | Functions
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)   "vk"#name"\0"
 

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. More...
 

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, \
},

Definition at line 28 of file vulkan_loader.h.

◆ FUNC_NAME

#define FUNC_NAME (   req_inst,
  req_dev,
  ext_flag,
  name 
)    "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 105 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().

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
FFVulkanFunctions
Definition: vulkan_functions.h:263