From 21ceafb55b7ca55b15aee758a8541c06e29780cd Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Thu, 9 Nov 2023 17:19:43 -0800 Subject: [PATCH] In order for volkLoadDeviceTable to work, we need to load vkGetDeviceProcAddr In the future we might expose something like volkLoadInstanceDeviceTable (which would take both instance and device handles), but with the current interface the only option is to load an extra pointer, which technically is instance-specific. --- volk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/volk.c b/volk.c index b6f986f..5c9ecf2 100644 --- a/volk.c +++ b/volk.c @@ -163,6 +163,9 @@ VkDevice volkGetLoadedDevice(void) void volkLoadInstanceTable(struct VolkInstanceTable* table, VkInstance instance) { + /* vkGetDeviceProcAddr is used by volkLoadDeviceTable; for now we load this global pointer even though it might be instance-specific */ + vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(instance, "vkGetDeviceProcAddr"); + volkGenLoadInstanceTable(table, instance, vkGetInstanceProcAddrStub); }