1#ifndef HALIDE_RUNTIME_VULKAN_INTERFACE_H
2#define HALIDE_RUNTIME_VULKAN_INTERFACE_H
12#define HL_VK_ENV_DELIM ";"
14#define HL_VK_ENV_DELIM ":"
18#define VK_NO_PROTOTYPES
20#include <vulkan/vulkan.h>
73#define VULKAN_FN(fn) WEAK PFN_##fn fn = nullptr;
74#define HL_USE_VULKAN_LOADER_FNS
75#define HL_USE_VULKAN_INSTANCE_FNS
76#define HL_USE_VULKAN_DEVICE_FNS
78#undef HL_USE_VULKAN_DEVICE_FNS
79#undef HL_USE_VULKAN_INSTANCE_FNS
80#undef HL_USE_VULKAN_LOADER_FNS
86#define VULKAN_FN(fn) fn = (PFN_##fn)halide_vulkan_get_symbol(user_context, #fn);
87#define HL_USE_VULKAN_LOADER_FNS
89#undef HL_USE_VULKAN_LOADER_FNS
96#define VULKAN_FN(fn) fn = (PFN_##fn)vkGetInstanceProcAddr(instance, #fn);
97#define HL_USE_VULKAN_INSTANCE_FNS
99#undef HL_USE_VULKAN_INSTANCE_FNS
105#define VULKAN_FN(fn) fn = (PFN_##fn)(nullptr);
106#define HL_USE_VULKAN_INSTANCE_FNS
108#undef HL_USE_VULKAN_INSTANCE_FNS
115#define VULKAN_FN(fn) fn = (PFN_##fn)vkGetDeviceProcAddr(device, #fn);
116#define HL_USE_VULKAN_DEVICE_FNS
118#undef HL_USE_VULKAN_DEVICE_FNS
124#define VULKAN_FN(fn) fn = (PFN_##fn)(nullptr);
125#define HL_USE_VULKAN_DEVICE_FNS
127#undef HL_USE_VULKAN_DEVICE_FNS
#define debug(n)
For optional debugging during codegen, use the debug macro as follows:
void * halide_get_library_symbol(void *lib, const char *name)
void * halide_load_library(const char *name)
WEAK void * halide_vulkan_get_symbol(void *user_context, const char *name)
void WEAK vk_unload_vulkan_device_functions(void *user_context)
void WEAK vk_unload_vulkan_instance_functions(void *user_context)
void WEAK vk_load_vulkan_loader_functions(void *user_context)
void WEAK vk_load_vulkan_device_functions(void *user_context, VkDevice device)
void WEAK vk_load_vulkan_instance_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,...
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
Each GPU API provides a halide_device_interface_t struct pointing to the code that manages device all...