Skip to content

Commit 21ceafb

Browse files
committed
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.
1 parent c2de00d commit 21ceafb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

volk.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ VkDevice volkGetLoadedDevice(void)
163163

164164
void volkLoadInstanceTable(struct VolkInstanceTable* table, VkInstance instance)
165165
{
166+
/* vkGetDeviceProcAddr is used by volkLoadDeviceTable; for now we load this global pointer even though it might be instance-specific */
167+
vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)vkGetInstanceProcAddr(instance, "vkGetDeviceProcAddr");
168+
166169
volkGenLoadInstanceTable(table, instance, vkGetInstanceProcAddrStub);
167170
}
168171

0 commit comments

Comments
 (0)