Hi everyone,
1. Problem
When running on Windows 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).
The root cause is that wgpu selects the Vulkan backend by default on Windows. While Intel's Windows Vulkan driver returns VK_SUCCESS on vkQueuePresentKHR, it silently fails to flip or blit swapchain buffers to the Windows Desktop Window Manager (DWM).
In contrast, selecting DirectX 12 (dx12) on the same hardware immediately succeeds because DXGI swapchains present natively to DWM.
2. Current Workaround
Setting std::env::set_var("WGPU_BACKEND", "dx12") at application startup avoids the white screen, but this is fragile:
- It only protects the specific binary setting it, leaving other embedders broken.
- It mutates global process state.
- It provides no fallback if DX12 device creation fails (e.g. headless CI or remote environments).
3. Desired Behavior
A sensible default backend policy in wgpu_context:
- Explicit override wins: If
WGPU_BACKEND (or WGPU_ADAPTER_NAME) is set, honor it directly.
- Windows default (DX12-first): When unset on Windows, attempt DirectX 12 adapter enumeration and device creation first.
- Sequential Vulkan fallback: If DX12 adapter/device creation fails, automatically fall back to Vulkan before exhausting options.
4. Why This Belongs in wgpu_context
Instance initialization, adapter enumeration, and device creation reside in wgpu_context::DeviceHandle::new_from_compatible_surface. Downstream renderers (anyrender_vello_hybrid, anyrender_vello) and application frameworks (Blitz, dioxus-native) delegate directly to this context layer. Fixing it here ensures all downstream consumers benefit without renderer-specific workarounds.
5. Proposed Fix
A PR implementing this sequential fallback policy is open at #100.
Thanks!
wgpu_context)Hi everyone,
1. Problem
When running on Windows 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).The root cause is that
wgpuselects the Vulkan backend by default on Windows. While Intel's Windows Vulkan driver returnsVK_SUCCESSonvkQueuePresentKHR, it silently fails to flip or blit swapchain buffers to the Windows Desktop Window Manager (DWM).In contrast, selecting DirectX 12 (
dx12) on the same hardware immediately succeeds because DXGI swapchains present natively to DWM.2. Current Workaround
Setting
std::env::set_var("WGPU_BACKEND", "dx12")at application startup avoids the white screen, but this is fragile:3. Desired Behavior
A sensible default backend policy in
wgpu_context:WGPU_BACKEND(orWGPU_ADAPTER_NAME) is set, honor it directly.4. Why This Belongs in
wgpu_contextInstance initialization, adapter enumeration, and device creation reside in
wgpu_context::DeviceHandle::new_from_compatible_surface. Downstream renderers (anyrender_vello_hybrid,anyrender_vello) and application frameworks (Blitz,dioxus-native) delegate directly to this context layer. Fixing it here ensures all downstream consumers benefit without renderer-specific workarounds.5. Proposed Fix
A PR implementing this sequential fallback policy is open at #100.
Thanks!