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

[vk] Don't request portability enumeration without the extension. #4038

Merged

Conversation

jimblandy
Copy link
Member

@jimblandy jimblandy commented Aug 11, 2023

VUID-VkInstanceCreateInfo-flags-06559 forbids us from passing vk::InstanceCreateFlags::ENUMERATE_PORTABILITY_KHR unless we actually found and requested the "VK_KHR_portability_enumeration" layer.

Fixes #4004.

Checklist

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

Testing
This is covered by wgpu-test::wgpu-tests encoder::drop_encoder.

@jimblandy jimblandy force-pushed the portability-enumeration-needs-extension branch from 0c1fbce to b12f69b Compare August 11, 2023 22:55
@jimblandy jimblandy force-pushed the portability-enumeration-needs-extension branch 2 times, most recently from b67f491 to 159d0f7 Compare August 12, 2023 00:39
Use the `ash` crate's definition of
`vk::InstanceCreateFlags::ENUMERATE_PORTABILITY_KHR` in
`wgpu_hal::vulkan::Instance::init`, rather than re-declaring it
locally ourselves.
VUID-VkInstanceCreateInfo-flags-06559 forbids us from passing
`vk::InstanceCreateFlags::ENUMERATE_PORTABILITY_KHR` unless we
actually found and requested the "VK_KHR_portability_enumeration"
extension.

Fixes gfx-rs#4004.
@jimblandy jimblandy force-pushed the portability-enumeration-needs-extension branch from 159d0f7 to 49cc50e Compare August 12, 2023 00:50
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Nice

@cwfitzgerald cwfitzgerald merged commit 07f92c9 into gfx-rs:trunk Aug 12, 2023
20 checks passed
@jimblandy jimblandy deleted the portability-enumeration-needs-extension branch December 13, 2023 16:36
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.

VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR Present When Portability Extension Is Not
2 participants