Work around RDNA 4 compiler faults when building pipelines #56

Open
github-bot wants to merge 2 commits from github-bot/gh-56 into main AGit
Owner

@⁠ExMoha on GitHub · 2026-11-25 23:02 UTC · original
ExMoha:rdna4-pipeline-crash → main · +341 −9 · 7 files · 2 commits · open

On an RX 9070 (RDNA 4), the runtime crashed inside amdxc64.dll (null read) while building some compute pipelines during the first story load. The DXIL passes the validator, and RGA builds the same pipeline for gfx1100 but not for gfx1201, so it's a driver compiler bug. The trigger is what REUSE merged: one heap handle or heap index annotated as two resource kinds, or read in another block, plus getDimensions reused across blocks.

  • Crash reports name the pipelines being made (runtime and victory translate --pipelines), and VICTORY_TRANSLATE_SKIP gets the offline tool past a faulting container.
  • own_heap_handles gives each such annotation its own handle and index. getDimensions is reused within a block only. Values are unchanged.

Tested on an RX 9070, Adrenalin 26.11.2 (32.0.32029.2010): every pipeline in the archive except two builds afterwards. Those two fault even with every clean-up pass off, so they're a separate, still-open trigger. Validation counts match main. Tests pass: victory-shader 239, victory-gpu 189, victory-loader 25. With those two skipped, the title now reaches the first cutscene, where before it crashed on the load before it.

Not tested on RDNA 3 hardware.

**@⁠ExMoha** on GitHub · 2026-11-25 23:02 UTC · [original](https://github.com/DexNom/VIctory/pull/56) `ExMoha:rdna4-pipeline-crash` → `main` · +341 −9 · 7 files · 2 commits · open On an RX 9070 (RDNA 4), the runtime crashed inside `amdxc64.dll` (null read) while building some compute pipelines during the first story load. The DXIL passes the validator, and RGA builds the same pipeline for gfx1100 but not for gfx1201, so it's a driver compiler bug. The trigger is what REUSE merged: one heap handle or heap index annotated as two resource kinds, or read in another block, plus `getDimensions` reused across blocks. - **Crash reports name the pipelines being made** (runtime and `victory translate --pipelines`), and `VICTORY_TRANSLATE_SKIP` gets the offline tool past a faulting container. - **`own_heap_handles`** gives each such annotation its own handle and index. `getDimensions` is reused within a block only. Values are unchanged. **Tested on an RX 9070, Adrenalin 26.11.2 (32.0.32029.2010):** every pipeline in the archive except two builds afterwards. Those two fault even with every clean-up pass off, so they're a separate, still-open trigger. Validation counts match `main`. Tests pass: victory-shader 239, victory-gpu 189, victory-loader 25. With those two skipped, the title now reaches the first cutscene, where before it crashed on the load before it. Not tested on RDNA 3 hardware.
A host driver that faults while compiling a pipeline left no trace of
which one it was: a pipeline is logged only once made. Crash reports now
list each pipeline being made at that moment, with its shaders, thread
and cache key, the faulting thread's marked.

- victory-loader: add_crash_context adds lines from other crates to every
  unhandled-exception report; read without blocking.
- victory-gpu: Pending::make records the pipeline while it is made.
- victory-hle: registers that list when the device is created.
- victory translate --pipelines: the same report for the offline tool,
  and VICTORY_TRANSLATE_SKIP=<hash prefix>,... to get past a container
  whose pipeline faults the driver.
AMD's RDNA 4 compiler (amdxc64 for gfx1201) faults with a null read
while building some compute pipelines whose DXIL passes the validator
and builds for RDNA 3 (checked offline with RGA for gfx1201 and
gfx1100). The trigger is what the REUSE clean-up merged:

- One heap handle, or one heap index value, annotated as two resource
  kinds (a descriptor read as a raw buffer and as a structured or
  constant buffer), or a heap handle read in another block.
  own_heap_handles gives each such annotation a handle, and an index
  where that is arithmetic, of its own, made just before it.
- A getDimensions result reused in later blocks: sizes are now reused
  within their block only (LOADS, not REUSE).

The values are the same; only the sharing is undone. Over the tested
archive every pipeline but two builds on RDNA 4 afterwards (the two left
fault with every clean-up pass off, a separate trigger). Validation
counts are unchanged from before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:32:52 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/56/head:github-bot/gh-56'
git switch 'github-bot/gh-56'

Merge

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