aboutsummaryrefslogtreecommitdiff
path: root/cube
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2025-04-23 18:16:06 -0500
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2025-04-25 13:11:28 -0600
commit682e42f7ae70a8fadf374199c02de737daa5c70d (patch)
tree25e90302493dec297224e92fbccf37cf8424067e /cube
parent3e9d7a008869360dccbd8c812f4795afa7f8b416 (diff)
downloadusermoji-682e42f7ae70a8fadf374199c02de737daa5c70d.tar.xz
build: Remove Volk dependency
The intent of using Volk for function loading was to validate Volk's implementation continually with each header update. This didn't end up occurring, as Volk does not get updated in lock step with Vulkan-Tools, leading to Vulkan-Tools using an older version of Volk. And then during SDK release the version would need to be updated at the last minute, causing churn and extra work. Function loading now occurs in two new files, cube_functions.h and vulkaninfo_functions.h. Since both cube and vulkaninfo's function usage are fixed (as in not code-generated), it is straightforward to implement the necessary Vulkan-Loader library opening and function loading code.
Diffstat (limited to 'cube')
-rw-r--r--cube/BUILD.gn1
-rw-r--r--cube/CMakeLists.txt4
-rw-r--r--cube/cube.c13
-rw-r--r--cube/cube.cpp18
-rw-r--r--cube/cube_functions.h355
5 files changed, 364 insertions, 27 deletions
diff --git a/cube/BUILD.gn b/cube/BUILD.gn
index 64a3e924..502e3a50 100644
--- a/cube/BUILD.gn
+++ b/cube/BUILD.gn
@@ -133,7 +133,6 @@ executable("vkcube") {
configs += [
":cube_config",
- "${volk_dir}:volk_config",
]
deps = [
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
index 634795ff..42cb17e0 100644
--- a/cube/CMakeLists.txt
+++ b/cube/CMakeLists.txt
@@ -285,7 +285,7 @@ endif()
target_compile_definitions(vkcube PRIVATE ${ENABLED_CUBE_PLATFORMS})
target_include_directories(vkcube PRIVATE .)
-target_link_libraries(vkcube Vulkan::Headers volk::volk_headers)
+target_link_libraries(vkcube Vulkan::Headers)
if (ANDROID)
install(TARGETS vkcube DESTINATION ${CMAKE_INSTALL_LIBDIR})
@@ -358,7 +358,7 @@ endif()
target_include_directories(vkcubepp PRIVATE .)
target_compile_definitions(vkcubepp PRIVATE ${ENABLED_CUBE_PLATFORMS})
-target_link_libraries(vkcubepp Vulkan::Headers volk::volk_headers)
+target_link_libraries(vkcubepp Vulkan::Headers)
if (XCB_LINK_LIBRARIES )
target_compile_definitions(vkcubepp PUBLIC "XCB_LIBRARY=\"${XCB_LINK_LIBRARIES}\"")
diff --git a/cube/cube.c b/cube/cube.c
index f34c322f..3a25dac4 100644
--- a/cube/cube.c
+++ b/cube/cube.c
@@ -55,11 +55,9 @@
#define APP_NAME_STR_LEN 80
#endif // _WIN32
-// Volk requires VK_NO_PROTOTYPES before including vulkan.h
-#define VK_NO_PROTOTYPES
+#include "cube_functions.h"
+
#include <vulkan/vulkan.h>
-#define VOLK_IMPLEMENTATION
-#include "volk.h"
#include "linmath.h"
#include "object_type_string_helper.h"
@@ -2659,6 +2657,7 @@ static void demo_cleanup(struct demo *demo) {
#endif
vkDestroyInstance(demo->inst, NULL);
+ unload_vulkan_library();
}
static void demo_resize(struct demo *demo) {
@@ -3922,7 +3921,7 @@ static void demo_init_vk(struct demo *demo) {
demo->is_minimized = false;
demo->cmd_pool = VK_NULL_HANDLE;
- err = volkInitialize();
+ err = load_vulkan_library();
if (err != VK_SUCCESS) {
ERR_EXIT(
"Unable to find the Vulkan runtime on the system.\n\n"
@@ -4220,7 +4219,7 @@ static void demo_init_vk(struct demo *demo) {
"vkCreateInstance Failure");
}
- volkLoadInstance(demo->inst);
+ load_vulkan_instance_functions(demo->inst);
}
static void demo_select_physical_device(struct demo *demo) {
@@ -4467,7 +4466,7 @@ static void demo_create_device(struct demo *demo) {
err = vkCreateDevice(demo->gpu, &device, NULL, &demo->device);
assert(!err);
- volkLoadDevice(demo->device);
+ load_vulkan_device_functions(demo->device);
}
static void demo_create_surface(struct demo *demo) {
diff --git a/cube/cube.cpp b/cube/cube.cpp
index 544c6aa3..e1d67e85 100644
--- a/cube/cube.cpp
+++ b/cube/cube.cpp
@@ -57,13 +57,8 @@
#define VULKAN_HPP_NO_EXCEPTIONS
#define VULKAN_HPP_TYPESAFE_CONVERSION 1
-// Volk requires VK_NO_PROTOTYPES before including vulkan.hpp
-#define VK_NO_PROTOTYPES
#include <vulkan/vulkan.hpp>
-#define VOLK_IMPLEMENTATION
-#include "volk.h"
-
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
#include "linmath.h"
@@ -1566,18 +1561,7 @@ VKAPI_ATTR vk::Bool32 VKAPI_CALL Demo::debug_messenger_callback(vk::DebugUtilsMe
}
void Demo::init_vk() {
- // See https://github.com/KhronosGroup/Vulkan-Hpp/pull/1755
- // Currently Vulkan-Hpp doesn't check for libvulkan.1.dylib
- // Which affects vkcube installation on Apple platforms.
- VkResult err = volkInitialize();
- if (err != VK_SUCCESS) {
- ERR_EXIT(
- "Unable to find the Vulkan runtime on the system.\n\n"
- "This likely indicates that no Vulkan capable drivers are installed.",
- "Installation Failure");
- }
-
- VULKAN_HPP_DEFAULT_DISPATCHER.init(vkGetInstanceProcAddr);
+ VULKAN_HPP_DEFAULT_DISPATCHER.init();
uint32_t apiVersion = 0;
vk::Result enumerate_instance_version_result = vk::enumerateInstanceVersion(&apiVersion);
diff --git a/cube/cube_functions.h b/cube/cube_functions.h
new file mode 100644
index 00000000..6592968f
--- /dev/null
+++ b/cube/cube_functions.h
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2025 The Khronos Group Inc.
+ * Copyright (c) 2025 Valve Corporation
+ * Copyright (c) 2025 LunarG, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Author: Charles Giessen <charles@lunarg.com>
+ *
+ */
+#pragma once
+
+// Need to include relevant system headers to open the dynamic library
+#if defined(_WIN32)
+#include <windows.h>
+#elif defined(__APPLE__)
+#include <stdlib.h>
+#include <dlfcn.h>
+#else
+#include <dlfcn.h>
+#endif
+
+// We are providing storage for all functions, make sure the vulkan headers doesn't conflate with ours.
+#if !defined(VK_NO_PROTOTYPES)
+#define VK_NO_PROTOTYPES
+#endif
+
+#include <vulkan/vulkan.h>
+
+void* vulkan_library;
+
+// Global Functions
+PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr;
+PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties;
+PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties;
+PFN_vkCreateInstance vkCreateInstance;
+
+// Per-platform Instance functions
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR;
+#endif
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
+PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR;
+#endif
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
+PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR;
+#endif
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
+PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR;
+#endif
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;
+#endif
+#if defined(VK_USE_PLATFORM_METAL_EXT)
+PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT;
+#endif
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
+PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT;
+#endif
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX;
+#endif
+
+// Instance functions
+PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT;
+PFN_vkCreateDevice vkCreateDevice;
+PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT;
+PFN_vkDestroyInstance vkDestroyInstance;
+PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR;
+PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties;
+PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices;
+PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR;
+PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR;
+PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR;
+PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR;
+PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR;
+PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures;
+PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties;
+PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
+PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
+PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties;
+PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR;
+PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR;
+PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR;
+PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR;
+
+// While technically a device function, it needs to be loaded with get instance proc addr
+PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr;
+
+// Device functions
+PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR;
+PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
+PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets;
+PFN_vkAllocateMemory vkAllocateMemory;
+PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
+PFN_vkBindBufferMemory vkBindBufferMemory;
+PFN_vkBindImageMemory vkBindImageMemory;
+PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT;
+PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
+PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
+PFN_vkCmdBindPipeline vkCmdBindPipeline;
+PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage;
+PFN_vkCmdDraw vkCmdDraw;
+PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT;
+PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
+PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier;
+PFN_vkCmdSetScissor vkCmdSetScissor;
+PFN_vkCmdSetViewport vkCmdSetViewport;
+PFN_vkCreateBuffer vkCreateBuffer;
+PFN_vkCreateCommandPool vkCreateCommandPool;
+PFN_vkCreateDescriptorPool vkCreateDescriptorPool;
+PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout;
+PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR;
+PFN_vkCreateFence vkCreateFence;
+PFN_vkCreateFramebuffer vkCreateFramebuffer;
+PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines;
+PFN_vkCreateImage vkCreateImage;
+PFN_vkCreateImageView vkCreateImageView;
+PFN_vkCreatePipelineCache vkCreatePipelineCache;
+PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
+PFN_vkCreateRenderPass vkCreateRenderPass;
+PFN_vkCreateSampler vkCreateSampler;
+PFN_vkCreateSemaphore vkCreateSemaphore;
+PFN_vkCreateShaderModule vkCreateShaderModule;
+PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR;
+PFN_vkDestroyBuffer vkDestroyBuffer;
+PFN_vkDestroyCommandPool vkDestroyCommandPool;
+PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool;
+PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout;
+PFN_vkDestroyDevice vkDestroyDevice;
+PFN_vkDestroyFence vkDestroyFence;
+PFN_vkDestroyFramebuffer vkDestroyFramebuffer;
+PFN_vkDestroyImage vkDestroyImage;
+PFN_vkDestroyImageView vkDestroyImageView;
+PFN_vkDestroyPipeline vkDestroyPipeline;
+PFN_vkDestroyPipelineCache vkDestroyPipelineCache;
+PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout;
+PFN_vkDestroyRenderPass vkDestroyRenderPass;
+PFN_vkDestroySampler vkDestroySampler;
+PFN_vkDestroySemaphore vkDestroySemaphore;
+PFN_vkDestroyShaderModule vkDestroyShaderModule;
+PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR;
+PFN_vkDeviceWaitIdle vkDeviceWaitIdle;
+PFN_vkEndCommandBuffer vkEndCommandBuffer;
+PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
+PFN_vkFreeMemory vkFreeMemory;
+PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
+PFN_vkGetDeviceQueue vkGetDeviceQueue;
+PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
+PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout;
+PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE;
+PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE;
+PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR;
+PFN_vkMapMemory vkMapMemory;
+PFN_vkQueuePresentKHR vkQueuePresentKHR;
+PFN_vkQueueSubmit vkQueueSubmit;
+PFN_vkResetCommandBuffer vkResetCommandBuffer;
+PFN_vkResetFences vkResetFences;
+PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT;
+PFN_vkUnmapMemory vkUnmapMemory;
+PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;
+PFN_vkWaitForFences vkWaitForFences;
+
+#define LOAD_INSTANCE_FUNCTION(instance, function) function = (PFN_##function)vkGetInstanceProcAddr(instance, #function)
+#define LOAD_DEVICE_FUNCTION(device, function) function = (PFN_##function)vkGetDeviceProcAddr(device, #function)
+
+static VkResult load_vulkan_library() {
+ vulkan_library = NULL;
+#if defined(WIN32)
+ HMODULE library = LoadLibraryA("vulkan-1.dll");
+ if (library == NULL) return VK_ERROR_INITIALIZATION_FAILED;
+
+ vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)(void (*)(void))GetProcAddress(library, "vkGetInstanceProcAddr");
+#elif defined(__APPLE__)
+ void* library = dlopen("libvulkan.dylib", RTLD_NOW | RTLD_LOCAL);
+ if (library == NULL) {
+ library = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL);
+ }
+ if (library == NULL && getenv("DYLD_FALLBACK_LIBRARY_PATH") == NULL) {
+ library = dlopen("/usr/local/lib/libvulkan.dylib", RTLD_NOW | RTLD_LOCAL);
+ if (library == NULL) {
+ library = dlopen("/usr/local/lib/libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL);
+ }
+ }
+ if (library == NULL) {
+ return VK_ERROR_INITIALIZATION_FAILED;
+ }
+
+ vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(library, "vkGetInstanceProcAddr");
+#else // Assume everything else supports dlopen
+ void* library = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL);
+ if (library == NULL) library = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
+ if (library == NULL) {
+ return VK_ERROR_INITIALIZATION_FAILED;
+ }
+ vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(library, "vkGetInstanceProcAddr");
+#endif
+ if (vkGetInstanceProcAddr == NULL) {
+ return VK_ERROR_INITIALIZATION_FAILED;
+ }
+ vulkan_library = library;
+ LOAD_INSTANCE_FUNCTION(NULL, vkEnumerateInstanceExtensionProperties);
+ LOAD_INSTANCE_FUNCTION(NULL, vkEnumerateInstanceLayerProperties);
+ LOAD_INSTANCE_FUNCTION(NULL, vkCreateInstance);
+
+ return VK_SUCCESS;
+}
+
+static void unload_vulkan_library() {
+ if (vulkan_library != NULL) {
+#if defined(WIN32)
+ FreeLibrary((HMODULE)vulkan_library);
+#else
+ dlclose(vulkan_library);
+#endif
+ vulkan_library = NULL;
+ }
+}
+
+static void load_vulkan_instance_functions(VkInstance instance) {
+#if defined(VK_USE_PLATFORM_WIN32_KHR)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateWin32SurfaceKHR);
+#endif
+#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateWaylandSurfaceKHR);
+#endif
+#if defined(VK_USE_PLATFORM_ANDROID_KHR)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateAndroidSurfaceKHR);
+#endif
+#if defined(VK_USE_PLATFORM_XLIB_KHR)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateXlibSurfaceKHR);
+#endif
+#if defined(VK_USE_PLATFORM_XCB_KHR)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateXcbSurfaceKHR);
+#endif
+#if defined(VK_USE_PLATFORM_METAL_EXT)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateMetalSurfaceEXT);
+#endif
+#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateDirectFBSurfaceEXT);
+#endif
+#if defined(VK_USE_PLATFORM_SCREEN_QNX)
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateScreenSurfaceQNX);
+#endif
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateDebugUtilsMessengerEXT);
+ LOAD_INSTANCE_FUNCTION(instance, vkCreateDevice);
+ LOAD_INSTANCE_FUNCTION(instance, vkDestroyDebugUtilsMessengerEXT);
+ LOAD_INSTANCE_FUNCTION(instance, vkDestroyInstance);
+ LOAD_INSTANCE_FUNCTION(instance, vkDestroySurfaceKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkEnumerateDeviceExtensionProperties);
+ LOAD_INSTANCE_FUNCTION(instance, vkEnumeratePhysicalDevices);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetDisplayModePropertiesKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetDisplayPlaneCapabilitiesKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetDisplayPlaneSupportedDisplaysKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceDisplayPlanePropertiesKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceDisplayPropertiesKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceFeatures);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceFormatProperties);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceMemoryProperties);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceProperties);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceQueueFamilyProperties);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceSurfaceCapabilitiesKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceSurfaceFormatsKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceSurfacePresentModesKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetPhysicalDeviceSurfaceSupportKHR);
+ LOAD_INSTANCE_FUNCTION(instance, vkGetDeviceProcAddr);
+}
+static void load_vulkan_device_functions(VkDevice device) {
+ LOAD_DEVICE_FUNCTION(device, vkAcquireNextImageKHR);
+ LOAD_DEVICE_FUNCTION(device, vkAllocateCommandBuffers);
+ LOAD_DEVICE_FUNCTION(device, vkAllocateDescriptorSets);
+ LOAD_DEVICE_FUNCTION(device, vkAllocateMemory);
+ LOAD_DEVICE_FUNCTION(device, vkBeginCommandBuffer);
+ LOAD_DEVICE_FUNCTION(device, vkBindBufferMemory);
+ LOAD_DEVICE_FUNCTION(device, vkBindImageMemory);
+ LOAD_DEVICE_FUNCTION(device, vkCmdBeginDebugUtilsLabelEXT);
+ LOAD_DEVICE_FUNCTION(device, vkCmdBeginRenderPass);
+ LOAD_DEVICE_FUNCTION(device, vkCmdBindDescriptorSets);
+ LOAD_DEVICE_FUNCTION(device, vkCmdBindPipeline);
+ LOAD_DEVICE_FUNCTION(device, vkCmdCopyBufferToImage);
+ LOAD_DEVICE_FUNCTION(device, vkCmdDraw);
+ LOAD_DEVICE_FUNCTION(device, vkCmdEndDebugUtilsLabelEXT);
+ LOAD_DEVICE_FUNCTION(device, vkCmdEndRenderPass);
+ LOAD_DEVICE_FUNCTION(device, vkCmdPipelineBarrier);
+ LOAD_DEVICE_FUNCTION(device, vkCmdSetScissor);
+ LOAD_DEVICE_FUNCTION(device, vkCmdSetViewport);
+ LOAD_DEVICE_FUNCTION(device, vkCreateBuffer);
+ LOAD_DEVICE_FUNCTION(device, vkCreateCommandPool);
+ LOAD_DEVICE_FUNCTION(device, vkCreateDescriptorPool);
+ LOAD_DEVICE_FUNCTION(device, vkCreateDescriptorSetLayout);
+ LOAD_DEVICE_FUNCTION(device, vkCreateDisplayPlaneSurfaceKHR);
+ LOAD_DEVICE_FUNCTION(device, vkCreateFence);
+ LOAD_DEVICE_FUNCTION(device, vkCreateFramebuffer);
+ LOAD_DEVICE_FUNCTION(device, vkCreateGraphicsPipelines);
+ LOAD_DEVICE_FUNCTION(device, vkCreateImage);
+ LOAD_DEVICE_FUNCTION(device, vkCreateImageView);
+ LOAD_DEVICE_FUNCTION(device, vkCreatePipelineCache);
+ LOAD_DEVICE_FUNCTION(device, vkCreatePipelineLayout);
+ LOAD_DEVICE_FUNCTION(device, vkCreateRenderPass);
+ LOAD_DEVICE_FUNCTION(device, vkCreateSampler);
+ LOAD_DEVICE_FUNCTION(device, vkCreateSemaphore);
+ LOAD_DEVICE_FUNCTION(device, vkCreateShaderModule);
+ LOAD_DEVICE_FUNCTION(device, vkCreateSwapchainKHR);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyBuffer);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyCommandPool);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyDescriptorPool);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyDescriptorSetLayout);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyDevice);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyFence);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyFramebuffer);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyImage);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyImageView);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyPipeline);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyPipelineCache);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyPipelineLayout);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyRenderPass);
+ LOAD_DEVICE_FUNCTION(device, vkDestroySampler);
+ LOAD_DEVICE_FUNCTION(device, vkDestroySemaphore);
+ LOAD_DEVICE_FUNCTION(device, vkDestroyShaderModule);
+ LOAD_DEVICE_FUNCTION(device, vkDestroySwapchainKHR);
+ LOAD_DEVICE_FUNCTION(device, vkDeviceWaitIdle);
+ LOAD_DEVICE_FUNCTION(device, vkEndCommandBuffer);
+ LOAD_DEVICE_FUNCTION(device, vkFreeCommandBuffers);
+ LOAD_DEVICE_FUNCTION(device, vkFreeMemory);
+ LOAD_DEVICE_FUNCTION(device, vkGetBufferMemoryRequirements);
+ LOAD_DEVICE_FUNCTION(device, vkGetDeviceProcAddr);
+ LOAD_DEVICE_FUNCTION(device, vkGetDeviceQueue);
+ LOAD_DEVICE_FUNCTION(device, vkGetImageMemoryRequirements);
+ LOAD_DEVICE_FUNCTION(device, vkGetImageSubresourceLayout);
+ LOAD_DEVICE_FUNCTION(device, vkGetPastPresentationTimingGOOGLE);
+ LOAD_DEVICE_FUNCTION(device, vkGetRefreshCycleDurationGOOGLE);
+ LOAD_DEVICE_FUNCTION(device, vkGetSwapchainImagesKHR);
+ LOAD_DEVICE_FUNCTION(device, vkMapMemory);
+ LOAD_DEVICE_FUNCTION(device, vkQueuePresentKHR);
+ LOAD_DEVICE_FUNCTION(device, vkQueueSubmit);
+ LOAD_DEVICE_FUNCTION(device, vkResetCommandBuffer);
+ LOAD_DEVICE_FUNCTION(device, vkResetFences);
+ LOAD_DEVICE_FUNCTION(device, vkSetDebugUtilsObjectNameEXT);
+ LOAD_DEVICE_FUNCTION(device, vkUnmapMemory);
+ LOAD_DEVICE_FUNCTION(device, vkUpdateDescriptorSets);
+ LOAD_DEVICE_FUNCTION(device, vkWaitForFences);
+}
+
+#undef LOAD_INSTANCE_FUNCTION
+#undef LOAD_DEVICE_FUNCTION