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

Rust: Method to query if a function is a device or instance function #410

Open
Qwinci opened this issue Feb 12, 2023 · 3 comments
Open

Rust: Method to query if a function is a device or instance function #410

Qwinci opened this issue Feb 12, 2023 · 3 comments

Comments

@Qwinci
Copy link

Qwinci commented Feb 12, 2023

Support for getting global/per-instance/per-device function pointers in Rust Vulkan generator, eg. instead of a single glad_vulkan::vk::load have specific ones for the per-instance and per-device function loading like C has gladLoaderLoadVulkan which can take an instance and a device.

@Dav1dde
Copy link
Owner

Dav1dde commented Feb 12, 2023

Can you explain why the current signature is not enough? The load function takes an FnMut which should allow you to capture a device/instance and manipulate it if necessary.

@Qwinci
Copy link
Author

Qwinci commented Feb 12, 2023

Yeah I guess the current load function works fine, maybe there should be some kind of function which you can use to check if a specific function is device specific so you could use vkGetDeviceProcAddr instead of vkGetInstanceProcAddr to get the device specific functions for those if you have a specific device?

@Dav1dde
Copy link
Owner

Dav1dde commented Feb 12, 2023

Agreed that would be useful, since this is somewhat tricky ... due to some driver bugs ...

@Dav1dde Dav1dde changed the title Support device specific vulkan functions in Rust Vulkan generator Rust: Method to query if a function is a device or instance function Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants