Conversation
This was referenced Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #99
Hi everyone,
1. Summary of Changes
This pull request implements an ordered GPU backend selection policy on Windows in
wgpu_context: prioritizing DirectX 12 by default, providing automatic sequential fallback to Vulkan when DX12 is unavailable, and strictly respecting explicit user/environment overrides (WGPU_BACKEND).Key Scope Points
wgpu_context):DeviceHandle::new_from_compatible_surface_with_backendsto execute sequential backend fallback.override_backends: Option<wgpu::Backends>and constructorwith_features_limits_and_backendstoWGPUContext.pub use wgpu;.anyrender_vello_hybridandanyrender_vellorequire no code changes. Both delegate surface and device initialization toDeviceHandle::new_from_compatible_surface, immediately inheriting the policy.dioxus-native) require no first-wave code changes. Consumer-side validation and eventual removal of ad-hoc env hacks are rollout benefits, not part of the upstream patch scope.2. Exact Seam Touched
wgpu_contextcrates/wgpu_context/src/lib.rs3. Policy Semantics
The selection logic follows a strict 3-tier sequence:
4. Validation Evidence & Proof Boundaries
Testing was performed on Windows 10 x64 hardware with Intel(R) HD Graphics 520 (Skylake generation, driver 27.20.100.8854):
cargo check -p wgpu_context: Passed cleanly with exit code 0.browser/dioxus-nativeconsuming this patch): Compiled cleanly without downstream code changes.WGPU_BACKENDunset):WGPU_BACKENDunset.adapter: name='Intel(R) HD Graphics 520', backend=Dx12, driver='27.20.100.8854'.$env:WGPU_BACKEND = "vulkan".backend=Vulkan. Confirmed that explicit user/CI intent is never overridden.Thanks!