Skip to content

Reject software wgpu adapters to allow renderer fallback#3365

Open
zao111222333 wants to merge 2 commits into
iced-rs:masterfrom
zao111222333:graphics_driver
Open

Reject software wgpu adapters to allow renderer fallback#3365
zao111222333 wants to merge 2 commits into
iced-rs:masterfrom
zao111222333:graphics_driver

Conversation

@zao111222333

Copy link
Copy Markdown

This PR prevents iced_wgpu from selecting software-rendered wgpu adapters, such as llvmpipe (LLVM 17.0.2, 256 bits) on Red Hat 8.10, as the primary renderer.

Previously, when Backend::Best was used, the fallback compositor tried wgpu first. If wgpu successfully created an adapter backed by llvmpipe, iced treated it as a valid wgpu renderer and never fell back to tiny-skia.

The change now:

  • Detects software adapters using wgpu::DeviceType::Cpu
  • Also checks known software adapter names like llvmpipe, lavapipe, softpipe, and swiftshader
  • Rejects these adapters before requesting a device in the window compositor
  • Applies the same detection to the headless wgpu renderer
  • Adds tests covering llvmpipe rejection and normal hardware adapter acceptance

@edwloef

edwloef commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

This feels like it should only happen if tiny-skia is actually enabled as a fallback, otherwise you just can't start up an iced app using software-rendered gpu backends.

@zao111222333

Copy link
Copy Markdown
Author

This feels like it should only happen if tiny-skia is actually enabled as a fallback, otherwise you just can't start up an iced app using software-rendered gpu backends.

That's more reasonable, is there any "fallback or not" option in iced? So I can reuse that configuration

@pml68

pml68 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

That's more reasonable, is there any "fallback or not" option in iced? So I can reuse that configuration

If tiny-skia and wgpu (or at least wgpu-bare) are both enabled then so is the fallback mechanism.

@zao111222333

zao111222333 commented Jun 17, 2026

Copy link
Copy Markdown
Author

Now it only rejects software wgpu adapters when the tiny-skia fallback is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants