volk icon indicating copy to clipboard operation
volk copied to clipboard

Implement instance table API

Open zeux opened this issue 1 year ago • 1 comments

Similarly to having an option to bypass global device function pointers in favor of a device function table, we now provide an API to load instance pointers into a separate structure.

This makes it possible to create multiple instances and use them concurrently; this isn't needed as often as multi-device API but can still be valuable for some applications.

Fixes #137

(needs further testing)

zeux avatar Nov 06 '23 03:11 zeux

This runs into a problem with vkGetDeviceProcAddr - it's an instance method so it's only loaded by volkLoadInstance, and without this volkLoadDeviceTable doesn't actually work because it relies on this global function. This will either require volkLoadInstanceTable to actually load this one global function, or we need to change volkLoadDeviceTable interface (or, well, add volkLoadDeviceInstanceTable or thereabouts that accepts both instance and device pointers).

zeux avatar Nov 07 '23 00:11 zeux