[PR #1891] [MERGED] Fix DirectX 12 fallback after Vulkan surface creation fails #3843

Closed
opened 2026-11-03 04:12:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1891
Author: @rdbtCVS
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: fix/renderer-surface-fallback


📝 Commits (1)

  • b3840ad Fix renderer backend fallback after surface creation failure

📊 Changes

1 file changed (+8 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/gfx.rs (+8 -2)

📄 Description

🤖 Opened by AI agent (OpenAI Codex), not by himself.

What and why

When Vulkan cannot create a window surface, Windows Auto mode currently exits immediately with Failed to create surface for any enabled backend: {} instead of trying DirectX 12. Record surface creation failures and continue through the existing backend retry loop, matching adapter and device failures. If every backend fails, the final error includes each backend’s surface failure.

Explicit backend choices and offscreen startup retain their existing selection behavior.

Vanilla reference

Horizon-only renderer initialization; no vanilla gameplay behavior changes.

Validation

Windows GPU recovery could not be exercised on this Linux host. The existing backend-order test covers Auto, explicit selections, and environment overrides. Validation used fresh temporary game, launcher, data and config directories. An initial run inherited local settings and failed the unrelated horizon-ctl unreachable-game test; the isolated run below passed.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at 6f8cad002, 27 s)

Check Result
Scope ✅ 1 files, +8 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (7 s)
clippy ✅ (1 s)
tests: horizon-client ✅ 1239 passed (16 s)
doc tests ✅ 0 passed (2 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with OpenAI Codex.


🔄 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/1891 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/renderer-surface-fallback` --- ### 📝 Commits (1) - [`b3840ad`](https://github.com/horizon-rust/horizon/commit/b3840adccdaf48f9c04f9e67f5b4decf74fd2545) Fix renderer backend fallback after surface creation failure ### 📊 Changes **1 file changed** (+8 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/gfx.rs` (+8 -2) </details> ### 📄 Description > 🤖 Opened by AI agent (OpenAI Codex), not by himself. ## What and why When Vulkan cannot create a window surface, Windows Auto mode currently exits immediately with `Failed to create surface for any enabled backend: {}` instead of trying DirectX 12. Record surface creation failures and continue through the existing backend retry loop, matching adapter and device failures. If every backend fails, the final error includes each backend’s surface failure. Explicit backend choices and offscreen startup retain their existing selection behavior. ## Vanilla reference Horizon-only renderer initialization; no vanilla gameplay behavior changes. ## Validation Windows GPU recovery could not be exercised on this Linux host. The existing backend-order test covers Auto, explicit selections, and environment overrides. Validation used fresh temporary game, launcher, data and config directories. An initial run inherited local settings and failed the unrelated `horizon-ctl` unreachable-game test; the isolated run below passed. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at 6f8cad002, 27 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +8 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 s) | | tests: horizon-client | ✅ 1239 passed (16 s) | | doc tests | ✅ 0 passed (2 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [OpenAI Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:12:42 +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#3843
No description provided.