[PR #3985] [MERGED] Renderer: prefer a real GPU over a software adapter (#3978) #5335

Closed
opened 2026-11-03 05:11:53 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3985
Author: @DUzzL
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/issue-3978-skip-software-adapter


📝 Commits (5)

  • c8144e5 Renderer: take a software adapter only after every backend failed (#3978)
  • d929bb5 Merge main; move the software-adapter skip into open_backend
  • a3cbfd7 Merge remote-tracking branch 'origin/main' into pr-3985
  • a9015a5 Renderer: a software-only first try asks again with non-conformant adapters
  • 2c613da Merge main into #3985

📊 Changes

1 file changed (+54 additions, -4 deletions)

View changed files

📝 crates/horizon-client-render/src/gfx.rs (+54 -4)

📄 Description

Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #3978

On Windows, Auto tries Vulkan, then DirectX 12, then OpenGL. A GPU with no Vulkan and no DX12 driver (Quadro 2000, Fermi) got the DX12 software adapter (WARP) from the second step, which counted as success, so OpenGL was never tried and the game rendered on the CPU.

Change: open_device first skips adapters of type Cpu and moves on to the next backend. Only if no backend gives a real GPU does it retry allowing software adapters, with a warning in the log that rendering is on the CPU. Behaviour is unchanged for systems whose only adapter is software.

Tested: cargo fmt --check, cargo clippy -p horizon-client-render --all-targets -- -D warnings and cargo test -p horizon-client-render --lib (553 passed, 16 ignored, including the gfx::tests::software_adapters tests) all pass. Not tested: on real Fermi hardware or with an actual WARP/GL fallback (no such machine here), and pr_ready.py not run. Whether wgpu's GL backend works on that GPU is unverified.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3985 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/issue-3978-skip-software-adapter` --- ### 📝 Commits (5) - [`c8144e5`](https://github.com/horizon-rust/horizon/commit/c8144e531e2de3818688c0679d476f7c2d3a3d36) Renderer: take a software adapter only after every backend failed (#3978) - [`d929bb5`](https://github.com/horizon-rust/horizon/commit/d929bb58a8093197ffb22cde441e04998479b8c8) Merge main; move the software-adapter skip into open_backend - [`a3cbfd7`](https://github.com/horizon-rust/horizon/commit/a3cbfd71d0be23a25c57ec3a134a25a1b88d79ff) Merge remote-tracking branch 'origin/main' into pr-3985 - [`a9015a5`](https://github.com/horizon-rust/horizon/commit/a9015a5525e0a26b9b08f5f4060cec51ec70aa81) Renderer: a software-only first try asks again with non-conformant adapters - [`2c613da`](https://github.com/horizon-rust/horizon/commit/2c613da8c5e7d6bb968438e1d1ea15c9e9b5562e) Merge main into #3985 ### 📊 Changes **1 file changed** (+54 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/gfx.rs` (+54 -4) </details> ### 📄 Description > Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #3978 On Windows, Auto tries Vulkan, then DirectX 12, then OpenGL. A GPU with no Vulkan and no DX12 driver (Quadro 2000, Fermi) got the DX12 software adapter (WARP) from the second step, which counted as success, so OpenGL was never tried and the game rendered on the CPU. Change: `open_device` first skips adapters of type `Cpu` and moves on to the next backend. Only if no backend gives a real GPU does it retry allowing software adapters, with a warning in the log that rendering is on the CPU. Behaviour is unchanged for systems whose only adapter is software. Tested: `cargo fmt --check`, `cargo clippy -p horizon-client-render --all-targets -- -D warnings` and `cargo test -p horizon-client-render --lib` (553 passed, 16 ignored, including the `gfx::tests::software_adapters` tests) all pass. Not tested: on real Fermi hardware or with an actual WARP/GL fallback (no such machine here), and `pr_ready.py` not run. Whether wgpu's GL backend works on that GPU is unverified. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:11:53 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5335
No description provided.