[Local Trace Issue] Track Fork-Local AnyRender wgpu_context Patch & Lifecycle
- Component:
crates/wgpu_context (in dioxuslabs/anyrender)
- Status: Active Local Trace (GitHub Issue: #1)
- Downstream Consumer:
D:\business\dioxus\blitz
- Output File:
/Volumes/HDD-1T-2021-Mac/Vault/business/project/mine/dioxus/util/blitz-host/issue-local-anyrender-trace.md
1. Why the Fork-Local Patch Exists
When launching Blitz applications (including apps/browser) on Windows hardware equipped with Intel integrated GPUs (e.g., Intel HD Graphics 520, Skylake generation, driver 27.20.100.8854), the application window displays a permanent solid white screen (#FFFFFF).
Root Cause
- In upstream
wgpu_context-0.9.0/src/lib.rs:125, wgpu::Instance is instantiated with:
backends: wgpu::Backends::from_env().unwrap_or_default()
- On Windows,
wgpu enumerates Vulkan before DirectX 12 when WGPU_BACKEND is unset.
- On affected Intel Windows drivers, Vulkan returns
VK_SUCCESS on vkQueuePresentKHR, but silently fails to flip or blit swapchain buffers to the Windows Desktop Window Manager (DWM).
- DirectX 12 (DXGI swapchains) on the same hardware functions flawlessly.
- In
wgpu_context, I implemented a true sequential fallback policy in DeviceHandle::new_from_compatible_surface_with_backends:
- Checks explicit user/environment overrides first (
WGPU_BACKEND).
- On Windows when unset, enumerates
Backends::DX12 adapters, validates surface support, and creates the device.
- If DX12 device creation fails or no compatible DX12 adapter exists, it automatically falls back to
Backends::VULKAN.
- On non-Windows platforms or if both fail, it falls back to standard default adapter resolution.
2. Active Branch and Tag Being Consumed
- Fork Remote Repository:
https://github.com/techton7/anyrender
- Local Clone Workspace:
D:\business\dioxus\anyrender / /Volumes/HDD-1T-2021-Mac/Vault/business/project/mine/dioxus/anyrender
- Active Git Branch:
local/win-dx12-policy
- Git Commit:
dda945f (feat(wgpu_context): implement Windows DX12-first Vulkan-fallback policy)
- Active Git Tag:
wgpu_context-v0.9.1-win-policy
3. Upstream Target Repository, Issue & PR
- Target Upstream Repository:
https://github.com/dioxuslabs/anyrender
- Target Branch:
main
- Target Subcrate:
crates/wgpu_context
- Upstream Issue: #99 (
Adopt Windows DX12-First GPU Backend Policy with Ordered Vulkan Fallback)
- Upstream PR: #100 (
feat(wgpu_context): implement Windows DX12-first Vulkan-fallback policy)
- Local PR Documentation:
pr-windows-dx12-first-vulkan-fallback.md
- Local Issue Documentation:
issue-windows-dx12-first-vulkan-fallback.md
4. Explicit Removal Conditions (Lifecycle Closure)
This local tracking issue and the associated [patch.crates-io] in Blitz may be closed and deleted ONLY when all of the following conditions are met:
- Upstream Merge:
dioxuslabs/anyrender merges the Windows DX12-first / Vulkan-fallback policy PR into main.
- Crates.io Release: Upstream publishes a new release of
wgpu_context to crates.io (e.g. v0.9.1 or v0.10.0).
- Dependency Bump: Downstream renderers (
anyrender_vello_hybrid, anyrender_vello) or the Blitz workspace update their wgpu_context dependency version.
- Patch Removal: The
[patch.crates-io] entry in D:\business\dioxus\blitz\Cargo.toml:
wgpu_context = { git = "https://github.com/techton7/anyrender", tag = "wgpu_context-v0.9.1-win-policy" }
is completely removed from Cargo.toml.
- Clean Verification: Blitz builds cleanly and runs on Windows Intel hardware with
WGPU_BACKEND unset without any local or git patches.
[Local Trace Issue] Track Fork-Local AnyRender
wgpu_contextPatch & Lifecyclecrates/wgpu_context(indioxuslabs/anyrender)D:\business\dioxus\blitz/Volumes/HDD-1T-2021-Mac/Vault/business/project/mine/dioxus/util/blitz-host/issue-local-anyrender-trace.md1. Why the Fork-Local Patch Exists
When launching Blitz applications (including
apps/browser) on Windows hardware equipped with Intel integrated GPUs (e.g., Intel HD Graphics 520, Skylake generation, driver 27.20.100.8854), the application window displays a permanent solid white screen (#FFFFFF).Root Cause
wgpu_context-0.9.0/src/lib.rs:125,wgpu::Instanceis instantiated with:wgpuenumerates Vulkan before DirectX 12 whenWGPU_BACKENDis unset.VK_SUCCESSonvkQueuePresentKHR, but silently fails to flip or blit swapchain buffers to the Windows Desktop Window Manager (DWM).wgpu_context, I implemented a true sequential fallback policy inDeviceHandle::new_from_compatible_surface_with_backends:WGPU_BACKEND).Backends::DX12adapters, validates surface support, and creates the device.Backends::VULKAN.2. Active Branch and Tag Being Consumed
https://github.com/techton7/anyrenderD:\business\dioxus\anyrender//Volumes/HDD-1T-2021-Mac/Vault/business/project/mine/dioxus/anyrenderlocal/win-dx12-policydda945f(feat(wgpu_context): implement Windows DX12-first Vulkan-fallback policy)wgpu_context-v0.9.1-win-policy3. Upstream Target Repository, Issue & PR
https://github.com/dioxuslabs/anyrendermaincrates/wgpu_contextAdopt Windows DX12-First GPU Backend Policy with Ordered Vulkan Fallback)feat(wgpu_context): implement Windows DX12-first Vulkan-fallback policy)pr-windows-dx12-first-vulkan-fallback.mdissue-windows-dx12-first-vulkan-fallback.md4. Explicit Removal Conditions (Lifecycle Closure)
This local tracking issue and the associated
[patch.crates-io]in Blitz may be closed and deleted ONLY when all of the following conditions are met:dioxuslabs/anyrendermerges the Windows DX12-first / Vulkan-fallback policy PR intomain.wgpu_contextto crates.io (e.g.v0.9.1orv0.10.0).anyrender_vello_hybrid,anyrender_vello) or the Blitz workspace update theirwgpu_contextdependency version.[patch.crates-io]entry inD:\business\dioxus\blitz\Cargo.toml:Cargo.toml.WGPU_BACKENDunset without any local or git patches.