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

Better way to handle vk khr portability enumeration extension #4044

Conversation

hybcloud
Copy link
Contributor

@hybcloud hybcloud commented Aug 13, 2023

Better way to handle vk khr portability enumeration extension of hard-coded c_str.

Checklist

  • Run cargo clippy.
  • Run cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
#4038
#3958
https://github.com/ash-rs/ash/blob/f5587619979b791c8d37110393c4a9b4c50e0a34/examples/src/lib.rs#L235

Description
The PR enhances the solution of #4038, which solves the bug introduced in #3958 by using ash's KHR definition (semantically, it's the funtion's name, not extension's name, but they share the same name, and ash uses it as extension's name in its own
example code
(https://github.com/ash-rs/ash/blob/f5587619979b791c8d37110393c4a9b4c50e0a34/examples/src/lib.rs#L235)
(In ash's example code just mentioned, they requires another extension called KhrGetPhysicalDeviceProperties2. The extension is a KHR in vk1.0 but soon get into core in vk 1.1, and I don't have a mac to test if it matters, so I choose to keep it right the same as before)
)

Testing
Thanks to #4038, validation layers on windows stop reporting error about VK_KHR_portability_subset. It's a simple enhancement of #4038, and wgpu example (hello-triangle) has been shown to work fine when backends flag is VULKAN.

@hybcloud hybcloud force-pushed the better_way_to_handle_VK_KHR_portability_enumeration_extension branch from b9ea6d4 to 970850c Compare August 13, 2023 08:49
@hybcloud hybcloud force-pushed the better_way_to_handle_VK_KHR_portability_enumeration_extension branch from 970850c to 0fd920c Compare August 13, 2023 08:56
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch, thank you for contributing!

@Wumpf Wumpf enabled auto-merge (squash) August 15, 2023 07:20
@Wumpf Wumpf merged commit 57874e5 into gfx-rs:trunk Aug 15, 2023
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.

2 participants