Shaders: no REUSE pass for compute programs (AMD compiler crash, #145) #195
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/fxceless--victory-fork!195
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-195"
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?
@icecreammule277-dot on GitHub · 2026-11-24 22:25 UTC · original
icecreammule277-dot:reuse-compute→main· +10 −1 · 1 files · 1 commits · openFixes most of #145 (and the same crash reported in #3 and #120):
amdxc64.dll+0x861b9f(read 0x8) inCreateComputePipelineStateon an RX 9070 XT.Change
Shader::finishno longer runs the REUSE clean-up pass (bitcode::opt::REUSE) on compute programs.VICTORY_REUSE_ALL=1keeps it, for comparing.How it was found
The containers of the compute programs a run refused were saved and each was replayed offline with
victory translate <container> --pipelines, one process per program (a compiler crash then only ends that process):VICTORY_SHADER_OPTThis agrees with the sweep in #145 (68 of 70 crashers build with
VICTORY_SHADER_OPT=11).A first version that dropped REUSE only for compute programs with seven or more immediate samplers (the ray-traced lighting resolves) still crashed in game, on
842de0c32bc8dcc5, which has three; hence every compute program.Result in game
RX 9070 XT, Adrenalin 32.0.32029.2010, Windows 11: with this change and no compute pipeline refused or skipped for the crash, the compute pipelines build and the opening cutscene draws a lit 3D scene; before, the lighting resolves had to be refused and the world stayed black.
Not fixed
c1eee35dbc50a9efandf16876929fa64f9fcrash with anyVICTORY_SHADER_OPT, including 0 (#145), so they have another cause; they still needVICTORY_SKIP_PIPELINES.Notes
cargo test -p victory-shader --libpasses.🤖 Generated with Claude Code
@ericomeehan on GitHub · 2026-11-24 23:21 UTC · original
The offline replay table (REUSE alone 9/9 crashes, every other pass 183/183 builds) makes the case very clearly, and the
shortcut:comment says exactly why.One small thing:
VICTORY_REUSE_ALLchanges the translation, but it isn't in the shader-cache key's list of switches incrates/victory-gpu/src/shader_cache.rs(next toVICTORY_WAVE_WIDE,VICTORY_F16_NEARESTand the others). So a run with it set can be served translations cached without it, and the other way round. Adding the name to that list would fix it. Also, since the check isvar_os(...).is_none(),VICTORY_REUSE_ALL=0turns REUSE back on too; comparing with"1"would match how the other switches read.Separately, the pass is now skipped for compute on every vendor. If REUSE's effect on NVIDIA turns out to matter, gating on AMD's vendor id could be a follow-up.
Written with an AI assistant (Claude).
@MamaLeVrai on GitHub · 2026-11-25 10:59 UTC · original
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
90d2defintomainf85101bin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warningsfails with exactly the errorsmainitself has on this machine (placed_filler_twins,depth_written, a sort; PR #841 fixes them); with--all-featuresit fails with the same number of errors asmain(4). This PR adds none and removes none.cargo test --workspace --locked: both runs had one failure and no other. The failure isindirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields, which fails onmainitself most runs here (PR #849 fixes its assertion; see issue #850). So I cannot tell you whether the rest passes in a full run; the crate's other 158 tests passed in both. The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
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.