Skip to content

selector: Fail select() early when require_wgpu_xx finds no GPU adapter#11433

Open
tronical wants to merge 1 commit intomasterfrom
simon/servo-software-fix
Open

selector: Fail select() early when require_wgpu_xx finds no GPU adapter#11433
tronical wants to merge 1 commit intomasterfrom
simon/servo-software-fix

Conversation

@tronical
Copy link
Copy Markdown
Member

Before this change, calling require_wgpu_27()/require_wgpu_28() on a
system without a usable GPU adapter (e.g. a Windows VM with only the
DX12 Warp software adapter, or a host with no working GPU driver)
silently fell through to a non-wgpu renderer via the winit/linuxkms
fallback chain. Often that's the standalone software renderer, which
doesn't implement set_rendering_notifier, so the failure surfaced much
later as an Unsupported error from the rendering notifier callback,
typically inside application code that depends on the wgpu device.

Probe adapter availability inside BackendSelector::select_internal()
using the existing any_wgpu{27,28}_adapters_with_gpu helpers, and
return an error from select() before any backend is constructed. The
SLINT_WGPU_CPU=1 escape hatch still works because it short-circuits
the helper to true.

Before this change, calling require_wgpu_27()/require_wgpu_28() on a
system without a usable GPU adapter (e.g. a Windows VM with only the
DX12 Warp software adapter, or a host with no working GPU driver)
silently fell through to a non-wgpu renderer via the winit/linuxkms
fallback chain. Often that's the standalone software renderer, which
doesn't implement set_rendering_notifier, so the failure surfaced much
later as an Unsupported error from the rendering notifier callback,
typically inside application code that depends on the wgpu device.

Probe adapter availability inside BackendSelector::select_internal()
using the existing any_wgpu{27,28}_adapters_with_gpu helpers, and
return an error from select() before any backend is constructed. The
SLINT_WGPU_CPU=1 escape hatch still works because it short-circuits
the helper to true.
@tronical tronical added the candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant