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

Open
Willian-Massao wants to merge 1 commit from upstream-pr/185 into main
Willian-Massao commented 2026-11-26 10:44:32 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by Willian-Massao on 2026-11-26T10:44:32Z.


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
<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:5508544003 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/185). Originally posted by [Willian-Massao](https://github.com/Willian-Massao) on 2026-11-26T10:44:32Z. --- ## 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
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/185:upstream-pr/185'
git switch 'upstream-pr/185'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/185'
git switch 'upstream-pr/185'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/185'
git switch 'upstream-pr/185'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/185'
git switch 'main'
git merge --squash 'upstream-pr/185'
git switch 'main'
git merge --ff-only 'upstream-pr/185'
git switch 'main'
git merge 'upstream-pr/185'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
avatarmanz/VIctory-7900XTX!185
No description provided.