victory-gpu: guard against AMD driver 0xc0000005 and default to Series S profile #185

Open
github-bot wants to merge 1 commit from github-bot/gh-185 into main AGit
Owner

@⁠Willian-Massao on GitHub · 2026-11-26 10:44 UTC · original
Willian-Massao:fix/amd-driver-seh-guard-and-series-s → main · +108 −9 · 10 files · 1 commits · open

Problem

When running on an AMD Radeon RX 9070 XT (RDNA4, amdxc64.dll 8.18.10.0514), background compute pipeline compilation triggers an unhandled null pointer dereference (0xc0000005, read 0x8: nothing mapped there at amdxc64.dll+0x861b9f, rcx = 0x0) during early loading / intro cutscenes (FBK_STRY000_INTRO, frame 1395). Without an SEH guard, this terminates the game process.

Additionally, the default Series X profile allocates heavy 4K memory buffers, putting extreme pressure on memory budgets.

Changes

  • SEH Guard (crates/victory-gpu/src/pipeline/seh_guard.c + build.rs): Wraps HostPipeline::new in a minimal Windows SEH __try / __except (EXCEPTION_ACCESS_VIOLATION) block so driver compiler crashes do not terminate the process.
  • Skip List (crates/victory-gpu/src/pipeline/make.rs & library.rs):
    • Catches driver compiler crashes, logs a warning, and records the failing shader hash into bad_shaders.txt in the pipeline cache directory (library::bad_shaders_path()).
    • Reads bad_shaders.txt and VICTORY_SKIP_PIPELINES before calling the driver on subsequent runs to skip known failing shaders cleanly.
  • Series S Profile Support & Default:
    • Adds VICTORY_CONSOLE environment variable support.
    • Sets SeriesS as the default console profile (Console::SeriesS, Lockhart device type 0x60), significantly reducing memory footprint and initial asset weight.
  • Configurable Pipeline Workers: Supports VICTORY_PIPELINE_THREADS alongside VICTORY_PIPELINE_WORKERS.

Measured Gameplay Verification (AMD Radeon RX 9070 XT)

With these changes applied, the game successfully passes the intro cutscenes without crashing and reaches stable active gameplay:

  • Prison interior: ~21 FPS
  • Jason's house: ~15 FPS
**@⁠Willian-Massao** on GitHub · 2026-11-26 10:44 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/185) `Willian-Massao:fix/amd-driver-seh-guard-and-series-s` → `main` · +108 −9 · 10 files · 1 commits · open ## Problem When running on an **AMD Radeon RX 9070 XT** (RDNA4, `amdxc64.dll` 8.18.10.0514), background compute pipeline compilation triggers an unhandled null pointer dereference (`0xc0000005`, `read 0x8: nothing mapped there` at `amdxc64.dll+0x861b9f`, `rcx = 0x0`) during early loading / intro cutscenes (`FBK_STRY000_INTRO`, frame 1395). Without an SEH guard, this terminates the game process. Additionally, the default Series X profile allocates heavy 4K memory buffers, putting extreme pressure on memory budgets. ## Changes - **SEH Guard (`crates/victory-gpu/src/pipeline/seh_guard.c` + `build.rs`):** Wraps `HostPipeline::new` in a minimal Windows SEH `__try / __except (EXCEPTION_ACCESS_VIOLATION)` block so driver compiler crashes do not terminate the process. - **Skip List (`crates/victory-gpu/src/pipeline/make.rs` & `library.rs`):** - Catches driver compiler crashes, logs a warning, and records the failing shader hash into `bad_shaders.txt` in the pipeline cache directory (`library::bad_shaders_path()`). - Reads `bad_shaders.txt` and `VICTORY_SKIP_PIPELINES` before calling the driver on subsequent runs to skip known failing shaders cleanly. - **Series S Profile Support & Default:** - Adds `VICTORY_CONSOLE` environment variable support. - Sets `SeriesS` as the default console profile (`Console::SeriesS`, Lockhart device type `0x60`), significantly reducing memory footprint and initial asset weight. - **Configurable Pipeline Workers:** Supports `VICTORY_PIPELINE_THREADS` alongside `VICTORY_PIPELINE_WORKERS`. ## Measured Gameplay Verification (AMD Radeon RX 9070 XT) With these changes applied, the game successfully passes the intro cutscenes without crashing and reaches stable active gameplay: - **Prison interior:** ~21 FPS - **Jason's house:** ~15 FPS
On AMD Radeon RX 9070 XT (RDNA4, amdxc64.dll 8.18.10.0514), background compute pipeline compilation triggers an unhandled access violation (0xc0000005, read 0x8 at amdxc64.dll+0x861b9f) during early loading / intro cutscenes, crashing the process.

Changes:
- Add a Windows SEH __try/__except wrapper (seh_guard.c + build.rs) around HostPipeline::new to catch driver compiler access violations.
- Persist failing shader hashes to bad_shaders.txt and skip them before calling the driver on subsequent runs (also honors VICTORY_SKIP_PIPELINES).
- Add support for VICTORY_CONSOLE env variable and set Series S as the default profile, significantly reducing memory footprint and avoiding 4K asset bloat.
- Allow overriding pipeline workers via VICTORY_PIPELINE_THREADS.

Gameplay verification on RX 9070 XT:
- Successfully plays through intro cutscenes past the previous frame 1395 crash.
- Reaches active gameplay: ~21 FPS inside the prison and ~15 FPS at Jason's house.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:22:03 +00:00
github-bot force-pushed github-bot/gh-185 from 69c39e7b56 to 36793b9a4c 2026-11-27 00:57:03 +00:00 Compare
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/185/head:github-bot/gh-185'
git switch 'github-bot/gh-185'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-185'
git switch 'github-bot/gh-185'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-185'
git switch 'github-bot/gh-185'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-185'
git switch 'main'
git merge --squash 'github-bot/gh-185'
git switch 'main'
git merge --ff-only 'github-bot/gh-185'
git switch 'main'
git merge 'github-bot/gh-185'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.