Repository navigation
AMD RX 9060 XT: run one clean-up pass for nine programs its compiler fails on (complements #1213) - #1247
AMD RX 9060 XT: run one clean-up pass for nine programs its compiler fails on (complements #1213)#1247MrToucann wants to merge 2 commits into
Conversation
amdxc64 8.18.10.0514 (Radeon RX 9060 XT, driver 32.0.32029.2010) dereferences null, or ends the process, creating the pipelines of 13 programs as translated. They were found by creating every program's pipeline (2,684 compute; 23,279 others with a stand-in partner stage) in a process of its own. - Four compute programs load from a raw view at an offset computed from that view's own size, with a branch on the loaded value guarding a loop (reduced to 46 instructions with DXC's dxa/dxopt). For them the size is read in the entry block and passed through groupshared memory across a group barrier, which hides where the offset came from. Every thread meets the barrier there. - One compute program and the eight glints pixel programs build once one clean-up pass runs (constant folding, or what a taken branch says about its condition). It runs for them whatever VICTORY_SHADER_OPT says. They are chosen by container digest, so every other program translates as before, and these compute the same values. Everything lives in emit/lower/amd.rs with a one-line hook where each change acts, so the change carries to forks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A752X7rKCzD2ViPbSWcyut
|
#1213 targets the same pattern without a digest list. Here (RX 9070 XT, same driver) it is a buffer's If you can, it would be good to know whether #1213 alone also clears your four size-read programs on the 9060 XT. |
|
Thanks. I tested #1213 on an RX 9060 XT (driver 32.0.32029.2010, amdxc64 8.18.10.0514) with the 13 programs from this PR, each in its own process, with
So #1213 alone clears the size-read programs on the 9060 XT too, and without a digest list. That's better than the groupshared hoist in this PR. One data point from reducing it: giving the query a separate handle on the same index that stays uniform still crashed, so the non-uniform marking seems to be what matters. Two things are still failing with #1213, and it doesn't target them:
I'll trim this PR to just those per-program passes and leave the size-read programs to #1213. |
…ram clean-up passes fxceless#1213 asks a buffer's size through a non-uniform handle of its own. On the RX 9060 XT that clears the size-read programs on its own, without a digest list, so the groupshared hoist and the Module helpers it needed go. What remains is what fxceless#1213 does not target. The constant-folding pass runs for indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays, which ends the process without it. The FACTS pass runs for the eight glints pixel programs. This branch with fxceless#1213: all 13 programs validate and create their pipelines. Alone, the two tree programs still fail, as they do without fxceless#1213. cargo test -p victory-shader: 218 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A752X7rKCzD2ViPbSWcyut
Problem
On an AMD Radeon RX 9060 XT (driver 32.0.32029.2010,
amdxc64.dll8.18.10.0514), AMD's shader compiler fails creating the pipelines of some translated programs. It either reads a null pointer (0xC0000005) or ends the process (0xFFFFFFFF). The DXIL passesdxil.dllvalidation.The programs were found by creating every program's pipeline in a process of its own: 2,684 compute programs, and 23,279 others each with a stand-in partner stage.
Scope: what #1213 doesn't cover
The buffer size query programs are #1213's: a non-uniform handle per query. I tested it on the 9060 XT and it clears all four of them (see the thread). This PR now only covers the programs #1213 doesn't target, which build once one clean-up pass runs:
indirect_diffuse_lighting:CS_ScreenProbes_ActivateRays0xFFFFFFFF), here and on DexNomFOLDPS_*_PBR_MATERIAL_*GLINTS*pixel programsFACTSThe pass runs for these programs whatever
VICTORY_SHADER_OPTsays. On this card the full clean-up has to stay off, since it trips the same compiler elsewhere. Programs are chosen by container digest, so other programs keep their passes as they are, and a pass doesn't change what a program computes.All of it is in
emit/lower/amd.rs, with one-line hooks:lower.rs:mod amd;mod.rs:lower::amd::begin(c.digest);before loweringshader.rs:| super::lower::amd::passes()in the pass setTesting (RX 9060 XT,
VICTORY_SHADER_OPT=0)cargo test -p victory-shader: 218 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01A752X7rKCzD2ViPbSWcyut