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

Handle unsupported surfaces more gracefully #3054

Merged
merged 1 commit into from Oct 5, 2022

Conversation

i509VCB
Copy link
Contributor

@i509VCB i509VCB commented Sep 28, 2022

Checklist

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

Description
The Vulkan backend panicked when creating a surface when using a supported window and display handle but the dependent extensions are not available.

Per discussion on Matrix, the surface should instead not be usable on that device.

Getting the hal surface in wgpu-core may now return None to correctly represent the expected semantics.

Testing
Testing with DX12 and Metal is needed.

@i509VCB i509VCB force-pushed the unsupported-surface branch 2 times, most recently from 9327917 to b8b05c3 Compare September 28, 2022 05:17
The Vulkan backend in particular panicked when creating a surface for which the window handle is not supported. Per discussion on Matrix, the surface should instead not be usable on that device.

Getting the hal surface in wgpu-core may now return `None` to correctly represent those semantics.
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.

Good stuff.

@cwfitzgerald cwfitzgerald merged commit 2372895 into gfx-rs:master Oct 5, 2022
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.

None yet

2 participants