[PR #646] [MERGED] Fix resource pack reload failures and broken Horizon menus #2694

Closed
opened 2026-11-02 15:58:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/646
Author: @Online5277
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/17/2026
Merged by: @ludovic111

Base: main ← Head: fix/resource-pack-reload-errors


📝 Commits (4)

  • 5515cba Handle resource pack reload failures and reset menu atlas cache
  • e0d6e56 Release Wayland surface before replacing the pack renderer
  • 7575719 Reuse the GPU device and presentation mode across pack reloads
  • 1e597f3 Merge main and preserve resource reload and Mods screen tests

📊 Changes

8 files changed (+313 additions, -67 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+26 -7)
📝 crates/horizon-client/src/game/options.rs (+1 -0)
📝 crates/horizon-client/src/game/packs.rs (+37 -6)
📝 crates/horizon-client/src/gfx.rs (+62 -27)
📝 crates/horizon-client/src/options_ui.rs (+111 -1)
📝 crates/horizon-client/src/packs.rs (+6 -10)
📝 crates/horizon-client/src/packs/cache.rs (+33 -16)
📝 crates/horizon-client/src/ui_theme.rs (+37 -0)

📄 Description

Resource-pack reloads could silently fall back after overlay errors, relative resource paths produced dangling overlay links, and Horizon menu text and rounded corners reused stale atlas coordinates. Reloading also replaced live Vulkan devices and window surfaces, which caused the reported NVIDIA/Wayland crashes.

Resolve overlay targets relative to the process, invalidate old overlays, and show startup/reload failures in a dismissible screen. Stage replacement resources before switching, reset the menu atlas cache on success, and retain the previous GPU resources for recovery. Reloads release the exclusive window surface before replacement, reuse the Vulkan instance/device/queue, and preserve the presentation mode.

Validation: 13 pack/cache tests, 22 options tests run serially, 8 HUD tests, the atlas reupload regression, and client all-target Clippy pass after merging current main. One menu-style test failed in the parallel options run and passed in the serial rerun; these tests share global menu-style state. The reporter confirms pack reloads no longer produce errors with the GPU-lifecycle fixes. No client window was launched for the merge verification.

Fixes #618.


🔄 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/646 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/resource-pack-reload-errors` --- ### 📝 Commits (4) - [`5515cba`](https://github.com/horizon-rust/horizon/commit/5515cbab33d2fd3d64558ec269d10649a55f5d2f) Handle resource pack reload failures and reset menu atlas cache - [`e0d6e56`](https://github.com/horizon-rust/horizon/commit/e0d6e562810d882afd87c8800df63d8c28dcc9e0) Release Wayland surface before replacing the pack renderer - [`7575719`](https://github.com/horizon-rust/horizon/commit/7575719d11257cd7b72e64b4e35f13d992f52927) Reuse the GPU device and presentation mode across pack reloads - [`1e597f3`](https://github.com/horizon-rust/horizon/commit/1e597f356ec2148e7910affe17b52717839bb122) Merge main and preserve resource reload and Mods screen tests ### 📊 Changes **8 files changed** (+313 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+26 -7) 📝 `crates/horizon-client/src/game/options.rs` (+1 -0) 📝 `crates/horizon-client/src/game/packs.rs` (+37 -6) 📝 `crates/horizon-client/src/gfx.rs` (+62 -27) 📝 `crates/horizon-client/src/options_ui.rs` (+111 -1) 📝 `crates/horizon-client/src/packs.rs` (+6 -10) 📝 `crates/horizon-client/src/packs/cache.rs` (+33 -16) 📝 `crates/horizon-client/src/ui_theme.rs` (+37 -0) </details> ### 📄 Description Resource-pack reloads could silently fall back after overlay errors, relative resource paths produced dangling overlay links, and Horizon menu text and rounded corners reused stale atlas coordinates. Reloading also replaced live Vulkan devices and window surfaces, which caused the reported NVIDIA/Wayland crashes. Resolve overlay targets relative to the process, invalidate old overlays, and show startup/reload failures in a dismissible screen. Stage replacement resources before switching, reset the menu atlas cache on success, and retain the previous GPU resources for recovery. Reloads release the exclusive window surface before replacement, reuse the Vulkan instance/device/queue, and preserve the presentation mode. Validation: 13 pack/cache tests, 22 options tests run serially, 8 HUD tests, the atlas reupload regression, and client all-target Clippy pass after merging current main. One menu-style test failed in the parallel options run and passed in the serial rerun; these tests share global menu-style state. The reporter confirms pack reloads no longer produce errors with the GPU-lifecycle fixes. No client window was launched for the merge verification. Fixes #618. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:58:19 +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#2694
No description provided.