1 #ifndef HALIDE_RUNTIME_VULKAN_INTERFACE_H
2 #define HALIDE_RUNTIME_VULKAN_INTERFACE_H
11 #define VK_MAKE_API_VERSION(variant, major, minor, patch) \
12 ((((uint32_t)(variant)) << 29) | (((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch)))
15 #define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)
19 #define HL_VK_ENV_DELIM ";"
21 #define HL_VK_ENV_DELIM ":"
25 #define VK_NO_PROTOTYPES
57 const char *lib_names[] = {
65 for (
auto &lib_name : lib_names) {
68 debug(user_context) <<
" Loaded Vulkan loader library: " << lib_name <<
"\n";
71 debug(user_context) <<
" Missing Vulkan loader library: " << lib_name <<
"\n";
80 #define VULKAN_FN(fn) WEAK PFN_##fn fn;
83 #include "vulkan_functions.h"
89 debug(user_context) <<
" vk_load_vulkan_loader_functions (user_context: " << user_context <<
")\n";
90 #define VULKAN_FN(fn) fn = (PFN_##fn)halide_vulkan_get_symbol(user_context, #fn);
98 debug(user_context) <<
" vk_load_vulkan_functions (user_context: " << user_context <<
")\n";
99 #define VULKAN_FN(fn) fn = (PFN_##fn)vkGetInstanceProcAddr(instance, #fn);
void * halide_get_library_symbol(void *lib, const char *name)
void * halide_load_library(const char *name)
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName)
VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
void WEAK vk_load_vulkan_loader_functions(void *user_context)
WEAK void * halide_vulkan_get_symbol(void *user_context, const char *name)
void WEAK vk_load_vulkan_functions(void *user_context, VkInstance instance)
WEAK halide_device_interface_t vulkan_device_interface
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...