Better way to handle vk khr portability enumeration extension #4044
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Better way to handle vk khr portability enumeration extension of hard-coded c_str.
Checklist
cargo clippy
.cargo clippy --target wasm32-unknown-unknown
if applicable.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.