AMD RX 9070 XT (RDNA4): two compute shaders crash the AMD shader compiler (amdxc64.dll+0x861b9f) after the main menu #120
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#120
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Arvi23 on GitHub · 2026-11-24 21:38 UTC · original
AMD RX 9070 XT (RDNA4): two compute shaders crash the AMD shader compiler (
amdxc64.dll+0x861b9f) right after the main menuWhat happens
The game gets through boot and the menus (about 500 frames), then dies about 30 s in, as
story000.rpfopens:0xc0000005atamdxc64.dll+0x861b9f(read 0x8) while a pipeline is being built. Same offset in 2 of 2 runs.The two shaders (the hash your logs use)
Building each compute shader on its own outside the game (
VICTORY_TRANSLATE_ONLY=<hash> victory translate --pipelines --jobs 1, one process each), from the shaders that were still being built when the game crashed in both runs:--validateffe310e, pipelinea73284b60aa303eda1266cc7391ae0d61512b6b81c4072ed,39f0e9aeb156a61c,d4343b9a6e4f2717,d6e3a104264dd4c6So the fork's output for these two is valid DXIL, and the AMD driver crashes compiling it. Upstream's version of the same two does not crash, but it does not finish either.
Setup
victory.exe. With that it boots and reaches the menus.4e17478+ upstream PR #175, release build, Rust 1.98.1, Series X profile.Not tested
AI use: Claude Code (Claude Opus 5.5) narrowed the crash down to the two shaders, ran the isolation and wrote this report. The game runs and builds were on the machine above.
@EdouardSence on GitHub · 2026-11-24 21:41 UTC · original
A data point from the same GPU on Linux: on RADV, both shaders build and run.
RX 9070 XT (RDNA4), Mesa 26.2.6 RADV, Wine 11.22 with vkd3d-proton master and DXVK's
dxgi, fork at4e17478(no upstream PR merged), release and diag builds, Series X files, title 1.0.2.1.In all 5 of my runs that got that far (2 release, 3 diag),
a73284b60aa303edanda1266cc7391ae0d6reachedshader translatedand thenhost pipeline shaders=[compute …]around frame 1,100-1,500, with no failure or refusal logged after them. The game carried on into the world. The one device loss I had (see #6) came later and was a scalar load from address 0, not a compile.RADV never goes through
amdxc64.dll: vkd3d-proton turns the DXIL into SPIR-V (dxil-spirv) and Mesa compiles that with ACO. So the fork's DXIL for these two is fine for at least one other compiler, which points at the Windows AMD compiler, as you suspected, rather than at the translation. It doesn't say whether the output is correct, only that the pipelines get built.Possibly useful for narrowing it down: in the diag runs, VIctory's own translation of
a73284b60aa303edalone took 1-18 s fromfirst bindtoshader translated(71,008-byte program, 4 user-data tables, 7 samplers), so it is a big program even before the driver sees it.No game data: hashes and log lines only.
AI-assisted (Claude Code): log search and this comment by the model, from runs on my machine with my own copy of the title.
@Arvi23 on GitHub · 2026-11-24 22:13 UTC · original
Cause found, with a fix: clean-up pass 4 (
REUSE) shares resource handles across the whole program, and the AMD Windows driver crashes compiling that. With the patch below, both shaders build, and the game plays on this RX 9070 XT (prologue, ~2 fps, dark shadows as on NVIDIA).How it was narrowed down (each line:
VICTORY_TRANSLATE_ONLY=<hash> victory translate --pipelines --jobs 1, one process per run; exit 0 = built, 139 = the driver crashed):VICTORY_SHADER_OPT=0(no clean-up passes):a73284b60aa303edbuilds.a73284b60aa303ed: 1, 2, 8, 16, 32 build; 4 alone crashes.a1266cc7391ae0d6with 4 alone: crashes too.merge()withREUSEmerges everyPureinstruction along the dominator tree, andeffect()makesreadnonecallsPure, socreateHandleFromHeap/annotateHandlemade once early are reused across most of a 14 000-instruction program. DXC's GVN doing the same (handle phis) is a known way to get pipelines refused on NVIDIA. Here AMD's compiler faults instead.This also fits @EdouardSence's RADV result above: Linux's driver takes these shaders; the crash is the AMD Windows driver's.
Fix: handles are reused within their own block only (like the
LOADSreads); everything else inREUSEis unchanged. Patch against4e17478(opt.rshasn't changed since, so it applies to2119b0e):Tested (RX 9070 XT, driver 26.11.2, Windows 10 21H2 with upstream PR #175 + Agility SDK 1.620.2, release):
--validate: 2 of 2 validate.cargo test -p victory-shader -- bitcode::opt: 11 passed, 0 failed.Not tested: NVIDIA (whether handles reused only within a block cost anything there), other AMD generations, the instruction-count gain of the pass with this change (it should lose very little: only handle calls change).
AI use: Claude Code (Claude Opus 5.5) bisected the passes, wrote the patch and this comment. The runs are on the machine above.
@thefafu on GitHub · 2026-11-24 22:27 UTC · original · edited 2026-11-24 23:12 UTC
Same crash on an RX 9060 XT. This confirms @Arvi23's finding above from a second card, measured separately: it is clean-up pass 4 (
VICTORY_SHADER_OPTbit 4). With that pass off the title runs here without any skip list. (Edited to add the speed-switch runs at the end.)Setup: RX 9060 XT 16 GB (RDNA4), driver 32.0.32029.2010, Ryzen 7 7800X3D, 32 GB RAM, Windows 11 26300. Fork at
4e17478, unmodified,--profile diag --features diagnostics, Rust 1.98.1, Series X profile, own 1.0.2.1 copy.Offline, one process per shader (
VICTORY_TRANSLATE_ONLY=<hash> victory translate <pack> --pipelines --list --jobs 1), on072f5fe96efd27e1(from #3's list),a1266cc7391ae0d6anda73284b60aa303ed:VICTORY_SHADER_OPTamdxc64.dll+0x861b9f01,2,8,16,3245931,47,55,61,62No exceptions in 39 runs: the driver's compiler crashes exactly when bit 4 is on. A control shader (
970c4fbb3b017c0e) and 12 otherCS_RaytracingResolvevariants that were being built at the crash build fine with every pass on.In the game:
0xc0000005atamdxc64.dll+0x861b9fafter 4 min, 25 s into the first world framesVICTORY_SHADER_OPT=59, cold cacheamdxc64.dll+0x3391b32(read0xffffffffffffffff), also under pipeline creationVICTORY_SHADER_OPT=59 VICTORY_TEXTURE_GUARD=0Run 4 in the world: 1.0-2.7 fps while pipelines were being made (about 8 min). With none left to make, 4.1-4.6 fps in a light scene (about 2,570 draws/frame) and 2.7-2.9 fps in a heavy one (5,800-7,500 draws/frame). 24.9 GB private.
Over runs 3 and 4, 14 of #3's 41 shaders were asked for and all 14 got host pipelines; the other 27 never came up.
fc5e66f8f873d3bb,39f0e9aeb156a61candeeed82b877b44b5falso got host pipelines and ran with no hang or fault, so on this cardVICTORY_SKIP_PIPELINESwas not needed at all.The run-3 crash did not come back: the 7 compute shaders and 1 pixel shader that had been translated but not made at that moment each build fine on their own with
VICTORY_SHADER_OPT=59, and no later run hit it. Seen once; not isolated.A side effect worth knowing: after one such crash, every later launch crashed about 20 s in, before the menus.
early-pipelines.txt(1,571 entries here) lists the pipeline that killed the run, since a pipeline is noted as used before it is made, and the next start builds it at once. From reading the code (not tested in a run):VICTORY_SKIP_PIPELINESis only checked on the draw path, so the early start would build a skipped shader too. Deleting that file, or running withVICTORY_SHADER_OPT=59, gets past it.Smaller things:
VICTORY_TEXTURE_GUARD=0from run 4 on they played smoothly.Speed switches (runs 5-7 all have run 4's two switches as well; the opening cutscene was skipped in every run from 4 on). "Settled" is the median over 5 s samples with 4,500-7,500 draws/frame and few draws dropped:
VICTORY_RELAY=2VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=10240x887A0006"after 9 submissions sent ahead (VICTORY_LATE_WAIT=1) of 67 lists", no pipeline being made, no DREDVICTORY_D3D12_DRED=1VICTORY_RELAY=2is the clear win here: 2.2 times the frame rate of run 4, no device removal in 11 min (unlike #60's RX 7800 XT) and none of #89's missing skin or overlapping subtitles.LATE_WAITgroup removed the device in one run of two, the same shape as #60. The run that survived had DRED on, so I can't tell chance from timing.a wait for a memory value was not met at a present(3 times) anda queue still held a submission at a present: its fence was not reached(once), and only run 7 showed the flickering black bars. That looks like frames presented before work sent ahead had landed.Picture (described, no captures): cutscenes and gameplay are lit and textured where the sun reaches. In runs 4 and 5 surfaces out of direct sun were dark and nearly colourless (clothes that are orange at a window were grey in a dark room), which fits the missing bounce light the README describes; in run 7 the first gameplay room's interior was drawn and had colour in shadow, where run 4 had not drawn it (the README lists that room as intermittent, so I can't put it down to the switches). In every run: eyes glow white, some characters are missing their upper body, dark surfaces and distant characters have a speckled bright pattern, and there are bright blocky patches near the frame edge. One interior in run 5 was washed out and over-bright with characters glowing white.
Not tested: other drivers, a release build, the
LATE_WAITgroup's switches one at a time.AI-assisted (Claude Code Fable 5.2): it read the logs and wrote the test loops and this comment; the runs were on the machine above. No game data here.
@Arvi23 on GitHub · 2026-11-24 23:14 UTC · original
Update: the patch above fixes 66 of the 70 crashing programs from #145; the last 2 pass-4 crashes are an AMD compiler bug on one ordinary integer merge.
Each of the 68 pass-4 crashers from @hashdev512's list on #145 (all but
c1eee35dbc50a9efandf16876929fa64f9f, which crash with every pass off), one process per program,victory translate --pipelines --jobs 1, fork2119b0e+ #58 + upstream PR #175 + the patch above, every clean-up pass on:amdxc64.dll+0x861b9f)a567b9ef845fb680,878933b499cfa14dThe 2 left:
VICTORY_SHADER_OPT=59).REUSElimited to one block for everything. So it is not handle sharing.binsplit into int / float: int crashes both, float builds both; cast, cmp, select, extract, call, gep, load each build).a567b9ef845fb680(a local counter, not for a PR): the first 39 merges build, the 40th crashes. That merge is an ordinarylshr i32 %17, 14reusing an identical earlier one (merge 39 is the same kind of shift, of another value). Nothing about it is wrong, so this looks like an AMD Windows driver bug that this program's shape trips. RADV builds them (@EdouardSence above).So: the handle patch is worth taking for the 66 (most of the world's programs on AMD). For the 2, a narrow workaround (pass 4 off for those programs, or for integer merges in them) is all I can offer without the full module. The prologue doesn't use them: it plays on this RX 9070 XT with the patch.
AI use: Claude Code (Claude Opus 5.5) ran the per-program sweep and the bisection, and wrote this.
@thefafu on GitHub · 2026-11-24 23:21 UTC · original
@Arvi23 the same four on a second RDNA4 card, unpatched fork at
4e17478, one process per program (VICTORY_TRANSLATE_ONLY=<hash> victory translate <pack> --pipelines --list --jobs 1), RX 9060 XT 16 GB, driver 32.0.32029.2010, Windows 11 26300, diag build:VICTORY_SHADER_OPT=59VICTORY_SHADER_OPT=0a567b9ef845fb680878933b499cfa14dc1eee35dbc50a9eff16876929fa64f9fAll 8 crashes are
0xc0000005atamdxc64.dll+0x861b9f(driver file version 32.0.32029.2010, from the Windows application log), the same offset as the pass-4 crashes. So your split holds on this card and driver too: two need pass 4, two crash with every pass off, and the two that need no pass still land on the same instruction in the driver.None of the four was asked for in any of my seven game runs (boot through the prologue and some way past it), which matches your note that the prologue does not use them.
Not tested: your patch. These runs are the fork as it is.
AI-assisted (Claude Code): it wrote the loop and read the results; the runs were on the machine above. No game data here.
@Arvi23 on GitHub · 2026-11-25 01:10 UTC · original
Update: with the patch above, three runs on this RX 9070 XT reach the prologue with no compiler crash. With #51 and #203 on top, nothing is dropped for translation or refused by the driver.
Setup: RX 9070 XT, driver 32.0.32029.2010, Ryzen 7 5800X3D, 32 GB, Windows 10 IoT Enterprise LTSC 21H2 (19044), release builds, Series X profile, no
VICTORY_*switches, every clean-up pass on.Windows 10 needs the Agility SDK runtime (#420; without it every root signature is refused,
flags c01/c00, and the title crashes about 2 s in). All runs below have it.31714de+ Agility SDK + this patch + #58a803c87+ #420 + this patch + #58 + #51 + #203 + #411PS_PuddleDetectpixel programs ("a descriptor read only as data":2fd01fca16993001,6b6db9f1a526daeb,abc6a80d46edc294,8660e9822ebe4b62,c8df7216c69cecbd,7d0f14ce44746d7e),b22a16a178976e1bandceb5eb68cd99cb07. The refused mesh pipeline isf5e50eb2108c425b+ce3f0432a08f1d35, which #51 fixes.cargo test --workspaceon run 3's tree: 509 passed, 0 failed. #420's second commit gives the shader tests the Agility runtime, so the 23 card tests stop failing with "no SM 6.6 device" on Windows 10, and #411 fixes the loader's unwind test there.Next to this patch there are #195 (no
REUSEfor any compute program) and #317 (annotateHandlekept within its block, reporting 1,000 of 1,000CS_RaytracingResolveprograms built on an RX 9070). This patch also keepscreateHandle*block-local. I haven't compared the three on the 68 pass-4 programs from #145.Not tested: NVIDIA, other AMD generations, the 2 programs that need pass 4 off (
a567b9ef845fb680,878933b499cfa14d) and the 2 that crash with every pass off (c1eee35dbc50a9ef,f16876929fa64f9f), none of which came up in these runs.No game data: hashes, counts and timings only.
AI use: Claude Code (Claude Opus 5.5) assembled the tree, read the logs and wrote this; the runs are on the machine above.
github-bot referenced this issue2026-11-26 04:01:57 +00:00
@HAL9000RELOADED on GitHub · 2026-11-25 21:17 UTC · original
RDNA3 data for the programs named here: on a Radeon RX 7900 XTX with Adrenalin 32.0.32015.7029 (the driver build of #422), Windows 10, fxceless
maind510ee4+ #402, every pass on,victory translate --validate --pipelinesvalidated and created all 24 of them, and the rest of the title's 25,636 pipelines, without a crash inamdxc64.dll. Details and the table for all five reports are in #422 (#422).