AMD (RDNA4, RX 9060 XT): null read inside amdxc64.dll while world PSOs compile; VICTORY_SHADER_OPT=0 avoids it #881

Open
opened 2026-11-26 03:53:03 +00:00 by github-bot · 0 comments
Owner

@⁠Chuantao717 on GitHub · 2026-11-25 11:38 UTC · original

AMD (RDNA4, RX 9060 XT): null read inside amdxc64.dll while world PSOs compile; VICTORY_SHADER_OPT=0 avoids it

First: this fork got the game's world and its opening cutscene rendering on my AMD card, which upstream VIctory could not (upstream loses the device right after the account/PLAYER screen here). The running frame shows the prologue interior cutscene at ~1 fps, so the render work itself clearly works on RDNA4.

Environment

  • Windows 11 x64, build 26300.9457
  • Ryzen 7 5700X, 32 GB
  • AMD Radeon RX 9060 XT (RDNA4, vendor 0x1002 device 0x7590), driver 32.0.32029.2010
  • Built from main with cargo build --release -p victory (rust 1.98.1-msvc), 0 missing imports on the title executable and its 4 sidecar DLLs
  • Series X profile, victory.toml pointing at the game folder

Crash 1 — default switches, ~4.5 min in, during the opening cutscene

VIctory: unhandled exception 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8: nothing mapped there)
  rax 0x1b45c5ad570 rbx 0x1b395190870 rcx 0x0 rdx 0x1b8c6be4008 ...
  #0..#28  amdxc64.dll
  #29..#36 D3D12Core.dll / d3d12.dll

It is a null read inside AMD's own DXIL compiler, reached from D3D12Core while a pipeline is being created. Frame log just before it: ~2 s/frame, ~4500-5400 draws/frame.

Crash 2 — VICTORY_SHADER_OPT=0

With the new shader clean-up passes disabled the run survives far longer (14 minutes vs 4.5) and plays through to the opening credits and the in-car / apartment cutscene shots. It then stops on a guest int3 rather than the driver:

VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x5149aec
  #0 G+0x5149aec  #1 G+0xa5db22  #2 G+0x5453ac7  #3 G+0x23d0f9a

(RVA 0x5149aec, image base 0x140000000.) That looks like a title assert after the cutscene hands over, i.e. the known first-room problem, not a driver fault.

Why I think the amdxc64 crash is worth reporting to AMD

The same adapter/driver crashes with the same signature in an unrelated translation layer on this machine (PercyScarlett, a different clean-room project: amdxc64.dll+0x1aab91c, null read, also during the first world PSO compilation). Two independent DXIL producers, one driver component, same symptom on RDNA4.

If VICTORY_SHADER_OPT=0 is really what avoids it, the trigger is plausibly a DXIL pattern produced by the new clean-up passes (dead-code elimination / constant folding / value reuse / branch facts) that amdxc64 mishandles. Two things that would help a lot:

  1. A way to dump the exact DXIL that was being handed to D3D12CreatePipelineState when this happens (VICTORY_EMIT_DUMP / VICTORY_SHADER_SAVE?), so the offending module can be reduced and attached to an AMD bug report.
  2. Consider defaulting VICTORY_SHADER_OPT off on AMD adapters, or retrying a pipeline once with the passes off when pipeline creation faults, so RDNA users keep moving.

Speed data on this card (for the record)

run switches cutscene frame time
run 2 VICTORY_SHADER_OPT=0 1990-5291 ms/frame
run 3 VICTORY_SHADER_OPT=0 VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024 630-1813 ms/frame (prepare 200-780 ms)

So the newer switches are worth roughly 2-4x here, but the card is still the limit and prepare still dominates. No device loss and no driver hang in any of these runs — that is already much better than upstream on this machine.

With the switches combined the run lasted ~19 minutes and ended on a second, different guest assert rather than the driver:

VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x63966f

That is RVA 0x63966f (image base 0x140000000), some minutes after the in-car / apartment cutscene shots, so the cutscene-to-gameplay handover looks like the next wall on this configuration.

Crash context from the game's own crash dumper (new)

Both guest int3 runs leave victory-*.crash.log in the T: temp folder. The two dumps agree:

field run 2 (RVA 0x5149aec) run 3 (RVA 0x63966f)
game time 0h:9m:1s, frame 1861 0h:8m:51s, frame 1770
SRL fbk_stry000_FBK_STRY000_INTRO same
SRL state Prestream Prestream
INSTANCE_LIST 45000/45000 (full) 45000/45000 (full)
BUILDING 22280/22500 21312/22500
OBJECT 18984/27500 18291/27500
streaming requests 2644 3021
TileHeap 3428 MB / 6236 MB 4357 MB / 6236 MB
camera <-290, 1783, 11> <672, 6311, 5>

So both asserts fire while the intro scene is still Prestream, at the moment the cutscene hands over to the world,
with the instance-list pool at its ceiling and building/object pools near theirs.

Static analysis of the two int3 sites

Neither is a compiler-inserted __debugbreak in the middle of a function. Both are cold "unreachable" blocks:

  • 0x5149aec lives in function 0x5149980-0x5149b04, a lock-free fixed-size allocator: free-list head at +0x20
    (lock cmpxchg loop, 17-bit index mask 0x1ffff), backing table at +0x0, and four branches that jump to the
    int3: head == 0x1fffe (twice) and backing pointer == NULL (twice).
  • At the crash rax's low half was 0x0001fffe, i.e. the sentinel branch was taken: the allocator had no free
    entry (or an invalid state) and the title treats that as unreachable.
  • 0x63966f is the same shape at the end of 0x6395d0-0x639674.

Together: an allocation out of the fixed-size pool hits an "impossible" state and the title breaks. That fits the
INSTANCE_LIST at 45000/45000 in both dumps — the pool that runs out is plausibly the instance list itself while the
intro scene streams in, i.e. the fork is asking for (or failing to release) more instances than the console would.

Happy to run any diagnostic build, dump shaders, or test a patch on this exact RDNA4/driver combination.

**@⁠Chuantao717** on GitHub · 2026-11-25 11:38 UTC · [original](https://github.com/fxceless/victory-fork/issues/881) # AMD (RDNA4, RX 9060 XT): null read inside amdxc64.dll while world PSOs compile; VICTORY_SHADER_OPT=0 avoids it First: this fork got the game's world and its opening cutscene rendering on my AMD card, which upstream VIctory could not (upstream loses the device right after the account/PLAYER screen here). The running frame shows the prologue interior cutscene at ~1 fps, so the render work itself clearly works on RDNA4. ## Environment - Windows 11 x64, build 26300.9457 - Ryzen 7 5700X, 32 GB - **AMD Radeon RX 9060 XT (RDNA4, vendor 0x1002 device 0x7590), driver 32.0.32029.2010** - Built from `main` with `cargo build --release -p victory` (rust 1.98.1-msvc), 0 missing imports on the title executable and its 4 sidecar DLLs - Series X profile, `victory.toml` pointing at the game folder ## Crash 1 — default switches, ~4.5 min in, during the opening cutscene ``` VIctory: unhandled exception 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8: nothing mapped there) rax 0x1b45c5ad570 rbx 0x1b395190870 rcx 0x0 rdx 0x1b8c6be4008 ... #0..#28 amdxc64.dll #29..#36 D3D12Core.dll / d3d12.dll ``` It is a null read inside **AMD's own DXIL compiler**, reached from `D3D12Core` while a pipeline is being created. Frame log just before it: ~2 s/frame, ~4500-5400 draws/frame. ## Crash 2 — `VICTORY_SHADER_OPT=0` With the new shader clean-up passes disabled the run survives far longer (14 minutes vs 4.5) and plays through to the opening credits and the in-car / apartment cutscene shots. It then stops on a **guest** `int3` rather than the driver: ``` VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x5149aec #0 G+0x5149aec #1 G+0xa5db22 #2 G+0x5453ac7 #3 G+0x23d0f9a ``` (RVA 0x5149aec, image base 0x140000000.) That looks like a title assert after the cutscene hands over, i.e. the known first-room problem, not a driver fault. ## Why I think the amdxc64 crash is worth reporting to AMD The same adapter/driver crashes with the *same signature* in an unrelated translation layer on this machine (PercyScarlett, a different clean-room project: `amdxc64.dll+0x1aab91c`, null read, also during the first world PSO compilation). Two independent DXIL producers, one driver component, same symptom on RDNA4. If `VICTORY_SHADER_OPT=0` is really what avoids it, the trigger is plausibly a DXIL pattern produced by the new clean-up passes (dead-code elimination / constant folding / value reuse / branch facts) that `amdxc64` mishandles. Two things that would help a lot: 1. A way to dump the exact DXIL that was being handed to `D3D12CreatePipelineState` when this happens (`VICTORY_EMIT_DUMP` / `VICTORY_SHADER_SAVE`?), so the offending module can be reduced and attached to an AMD bug report. 2. Consider defaulting `VICTORY_SHADER_OPT` off on AMD adapters, or retrying a pipeline once with the passes off when pipeline creation faults, so RDNA users keep moving. ## Speed data on this card (for the record) | run | switches | cutscene frame time | |---|---|---| | run 2 | `VICTORY_SHADER_OPT=0` | 1990-5291 ms/frame | | run 3 | `VICTORY_SHADER_OPT=0 VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024` | **630-1813 ms/frame** (prepare 200-780 ms) | So the newer switches are worth roughly 2-4x here, but the card is still the limit and prepare still dominates. No device loss and no driver hang in any of these runs — that is already much better than upstream on this machine. With the switches combined the run lasted ~19 minutes and ended on a second, different guest assert rather than the driver: ``` VIctory: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x63966f ``` That is RVA 0x63966f (image base 0x140000000), some minutes after the in-car / apartment cutscene shots, so the cutscene-to-gameplay handover looks like the next wall on this configuration. ## Crash context from the game's own crash dumper (new) Both guest `int3` runs leave `victory-*.crash.log` in the T: temp folder. The two dumps agree: | field | run 2 (RVA 0x5149aec) | run 3 (RVA 0x63966f) | |---|---|---| | game time | 0h:9m:1s, frame 1861 | 0h:8m:51s, frame 1770 | | SRL | `fbk_stry000_FBK_STRY000_INTRO` | same | | **SRL state** | **Prestream** | **Prestream** | | **INSTANCE_LIST** | **45000/45000 (full)** | **45000/45000 (full)** | | BUILDING | 22280/22500 | 21312/22500 | | OBJECT | 18984/27500 | 18291/27500 | | streaming requests | 2644 | 3021 | | TileHeap | 3428 MB / 6236 MB | 4357 MB / 6236 MB | | camera | <-290, 1783, 11> | <672, 6311, 5> | So both asserts fire **while the intro scene is still Prestream**, at the moment the cutscene hands over to the world, with the instance-list pool at its ceiling and building/object pools near theirs. ## Static analysis of the two `int3` sites Neither is a compiler-inserted `__debugbreak` in the middle of a function. Both are cold "unreachable" blocks: - `0x5149aec` lives in function `0x5149980-0x5149b04`, a lock-free fixed-size allocator: free-list head at `+0x20` (`lock cmpxchg` loop, 17-bit index mask `0x1ffff`), backing table at `+0x0`, and four branches that jump to the `int3`: head == `0x1fffe` (twice) and backing pointer == NULL (twice). - At the crash `rax`'s low half was `0x0001fffe`, i.e. the **sentinel branch was taken**: the allocator had no free entry (or an invalid state) and the title treats that as unreachable. - `0x63966f` is the same shape at the end of `0x6395d0-0x639674`. Together: an allocation out of the fixed-size pool hits an "impossible" state and the title breaks. That fits the INSTANCE_LIST at 45000/45000 in both dumps — the pool that runs out is plausibly the instance list itself while the intro scene streams in, i.e. the fork is asking for (or failing to release) more instances than the console would. Happy to run any diagnostic build, dump shaders, or test a patch on this exact RDNA4/driver combination.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:53:03 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#881
No description provided.