Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement instance table API #154

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Implement instance table API #154

wants to merge 3 commits into from

Conversation

zeux
Copy link
Owner

@zeux zeux commented Nov 6, 2023

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)

Similarly to having an option to bypass global instance function
pointers in favor of an instance 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.
The only differences between device/instance/loader snippets is where to
include each one based on command type
@zeux
Copy link
Owner Author

zeux commented Nov 7, 2023

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).

…ProcAddr

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add InstanceTable?
1 participant