19 #ifndef AVUTIL_VULKAN_LOADER_H
20 #define AVUTIL_VULKAN_LOADER_H
25 #define PFN_LOAD_INFO(req_inst, req_dev, ext_flag, name) \
29 offsetof(FFVulkanFunctions, name), \
31 { "vk"#name, "vk"#name"EXT", "vk"#name"KHR" } \
37 static const struct ExtensionMap {
51 { VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_WIN32_MEMORY },
52 { VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, FF_VK_EXT_EXTERNAL_WIN32_SEM },
64 for (
int i = 0;
i < nb_extensions;
i++) {
66 if (!strcmp(extensions[
i], extension_map[j].
name)) {
67 mask |= extension_map[j].flag;
91 uint64_t extensions_mask,
92 int has_inst,
int has_dev)
96 static const struct FunctionLoadInfo {
101 const char *names[3];
110 const struct FunctionLoadInfo *load = &vk_load_info[
i];
111 PFN_vkVoidFunction
fn;
113 if (load->req_dev && !has_dev)
115 if (load->req_inst && !has_inst)
119 const char *
name = load->names[j];
123 else if (load->req_inst)
134 "as supported, but got NULL function pointer!\n", load->names[0]);
138 *(PFN_vkVoidFunction *)((uint8_t *)vk + load->struct_offset) =
fn;