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

Allow wgpu::Instance to report which backends were enabled #5167

Merged
merged 6 commits into from Jan 31, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Jan 30, 2024

Connections
In spirit related to

(but does not fix that issue)

Description
Replaces Instance::any_backend_feature_enabled with Instance::enabled_backend_features which reports all available backends instead of just reporting if none is available.

We already chugged through the very same information but didn't expose it. This is useful when a library or application wants to reason about potentially available backends based on its build configuration.

Testing
Run an example, didn't explode.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

…ed_backend_features` which reports all available backends instead of just reporting if none is available.
@Wumpf Wumpf added the type: enhancement New feature or request label Jan 30, 2024
@Wumpf Wumpf requested a review from a team as a code owner January 30, 2024 21:19
@Wumpf Wumpf enabled auto-merge (squash) January 31, 2024 08:30
@Wumpf Wumpf disabled auto-merge January 31, 2024 08:49
wgpu/src/lib.rs Outdated Show resolved Hide resolved
@Wumpf Wumpf enabled auto-merge (squash) January 31, 2024 09:07
@Wumpf Wumpf merged commit 62cc81c into gfx-rs:trunk Jan 31, 2024
27 checks passed
waywardmonkeys added a commit to waywardmonkeys/wgpu that referenced this pull request Feb 5, 2024
The check for macOS and Angle should add `Backends::GL` not
`Backends::VULKAN`. Similarly, the comment gets updated to
not refer to Vulkan.

This code was introduced in gfx-rs#5167.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants