Shaders: fix the AMD RDNA 4 compiler crash: a buffer's size through a non-uniform handle of its own (DexNom PR 62) #559
No reviewers
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/trustno1-coder--VIctory-NVIDIA!559
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-559"
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?
@BackseatDrivers-Unbound on GitHub · 2026-11-28 00:54 UTC · original
BackseatDrivers-Unbound:rdna4-size-handle→main· +40 −1 · 2 files · 1 commits · openThe shader fix from #504, as you asked: nothing else in this PR (2 files, +40/-1).
What it fixes. On AMD RDNA 4, the driver's shader compiler crashes the whole game (
amdxc64.dll+0x861b9f) on 10 of the title's compute shaders: tree/particle cullingf16876929fa64f9f,878933b499cfa14d,a567b9ef845fb680,c1eee35dbc50a9ef, and ray-tracing resolvea4df980a1c65fdbe,d0130073bb6f7a7d,7b956e1f6d56609f,0ae69044bfd15035,d2c52fcd936985b4,1e4947eada3d9ee3. Probably also #239 (RX 9060 XT).How. In
descriptor_data, the buffer size query now gets a heap handle of its own (the loads' raw twin index included), marked non-uniform and not counted innonuniform_handles, instead of sharing the uniform handle the loads use (crates/victory-shader/src/emit/lower/amd.rs, called fromlower.rs). The approach is IxMxAMAR's (fxceless/victory-fork#1213); Toucann turned it into DexNom/VIctory PR 62; this is the size-query part of that, ported unchanged.Tested on an RX 9070 XT (driver 32.0.32029.2010) on top of
64d4931b:cargo test -p victory-shader -- --test-threads=1: passes (one test,size_tests::the_record_count_of_a_structured_buffer_read_by_index, crashes the test process on29d8dbf7too, before this change, so it was skipped);64d4931bfive sessions with ray tracing off; on29d8dbf7(same fix) ray tracing off and on.Not tested on NVIDIA cards. It only changes how the size query's handle is made; DexNom's evaluation of PR 62 found its other outputs byte-identical and the changed shaders computing the same values.
No version to bump: the shader cache keys on the BLAKE3 of victory-shader's sources, so older cached translations aren't served.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.