Skip to content

Desktop: Prefer the Vulkan WGPU adapter on Linux#4270

Open
timon-schelling wants to merge 2 commits into
masterfrom
desktop-prefere-vulkan-on-linux
Open

Desktop: Prefer the Vulkan WGPU adapter on Linux#4270
timon-schelling wants to merge 2 commits into
masterfrom
desktop-prefere-vulkan-on-linux

Conversation

@timon-schelling

Copy link
Copy Markdown
Member

No description provided.

@timon-schelling

timon-schelling commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

!build desktop (Run ID 27945901504)

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the WGPU context creation and adapter selection logic by introducing a builder pattern with selection support and sorting available adapters by priority. The feedback suggests improving robustness by falling back to other adapters if the preferred one fails to initialize, as well as refining the sorting logic to prioritize macOS/iOS (Metal) and to sort by device type before backend to ensure discrete GPUs are always preferred.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread node-graph/libraries/wgpu-executor/src/context.rs
Comment thread node-graph/libraries/wgpu-executor/src/context.rs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 3 files

Confidence score: 2/5

  • In node-graph/libraries/wgpu-executor/src/context.rs, the Linux adapter sort can rank Vulkan CPU adapters above non-Vulkan hardware GPUs, so default selection may fall back to software rendering with major performance regression. Rebalance the ranking to prefer hardware adapters first (then backend preference) before merging.
  • In node-graph/libraries/wgpu-executor/src/context.rs, request_device failure on the first candidate currently short-circuits build() and can lead to a downstream .expect() panic, turning a recoverable driver/adapter issue into an app crash. Try the next sorted adapters and return a handled error path instead of panicking before merging.
  • In desktop/wrapper/src/lib.rs, the public re-export of WgpuBackends appears unused in-repo, which is low risk but adds API surface and maintenance noise. Either remove it now or land it alongside its first consumer to keep the wrapper interface intentional.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread node-graph/libraries/wgpu-executor/src/context.rs
Comment thread node-graph/libraries/wgpu-executor/src/context.rs Outdated
Comment thread desktop/wrapper/src/lib.rs
@github-actions

Copy link
Copy Markdown
📦 Mac Build Complete for e132f59
Download binary

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
📦 Linux Build Complete for e132f59
Download binary
Download Flatpak

@github-actions

Copy link
Copy Markdown
📦 Windows Build Complete for e132f59
Download binary

@Keavon Keavon changed the title Desktop: Prefere vulkan wgpu adapter on Linux Desktop: Prefer the Vulkan WGPU adapter on Linux Jun 22, 2026
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.

2 participants