Repository navigation
Conversation
|
Verified Not covered: the spill-table path on a real GPU and title shaders (no game data). |
|
Ran the spill-table path on a GPU, since that was the part not covered: NVIDIA RTX 5070 (driver 621.24), Windows 11, the SDK's
The second row is a case beside the one r4tedx reported: within a single rewritten load, the One question for the gating in Not covered: the title (no game data here). |
|
In game on AMD RDNA4 (RX 9060 XT, Windows 11), world / opening cutscene, one run: Weighted by dropped dispatches of those 34 (about 2,200 per traced frame here, 6 frames):
So the one program still on the SGPR rule is the second-largest dropper after AI-assisted (Claude Code, Claude Opus 5.5); no game data. |
|
I checked the GroupId question from @marquezinii's review on
The fix gives spill inputs their own SSA identities and uses the same namespace for a root descriptor's high half. The source commit includes small IR and resource-tracing regressions. The shader suite reports 73 passed. Coverage is the synthetic runtime spill-lowering path. Incremental commit on |
|
Independent check of head Read against the RDNA2 ISA (30-November-2020)
Things I looked for and did not find
Limits, conservative (still refused, as on
Run on hardware. NVIDIA RTX 3070, driver 616.56, Windows 11, Rust 1.98.1,
Not checked: the title (no game files here), AMD hardware, the 16-or-more user SGPR case above. AI-assisted (Claude Code). |
|
@Brazlucas a late answer to your ping on #302: yes, this fixes the entry-value defect I reported there, and thank you for taking it on. What I ran, on an RTX 5070 and WARP, with
So the two PRs only pay off together for a program like that, which matches jeremygold02's and nullmarsh's title results on #294. Two open points, neither new, both reproduced or read here:
For the tester tree ( Hand-assembled programs only; the title was not used in these tests. AI-assisted. |
|
Hi! I've been investigating the spill-table handling in #302 and #489, including the proposed During testing, I found an additional issue in For example, masks such as Fix: Preserve spill-pointer provenance only when the mask retains all eight significant bits of the address's high dword. Verification:
Fix commit: Development branch: The branch includes #302, #489, and @fuzeofficlal's Since PR creation is currently restricted to collaborators, would you prefer to cherry-pick this fix or have me prepare a dedicated PR when contributions reopen? Thanks for your work on VIctory! Best, |
|
On @NexForever's mask point: it is right, and my note above missed it. I checked which instructions write the tracked registers, not which mask values keep the tag. Read at Which bits those are depends on the address width, which is the console's convention and nothing I can cite; the title's own masks (the values counted on #302) are the evidence for the set to accept. I have not built or run AI-assisted (Claude Code). |
With 16 user SGPRs the hardware puts the thread-group ids in s16 and up, where the spill rule reads root arguments, so a program reading both got the root argument for the group id (reported on #489). Such programs are now left to fail as they do without the rule. victory translate now builds with the same rule, so its counts match the runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stacked on #302 (its commit
815178dis the first one here); only the second commit is new.What
#302 rewrites each spill-table load into
s_mov_b32 sK, s(16+k). That reads what s(16+k) holds at that point, not on entry. A program that has already written SGPRs 16 and up, for example as the destination of an earlier table load, then reads the wrong root argument, with no refusal. @r4tedx reported this on #302 with a synthetic repro.This commit makes the program first copy the user SGPRs its table loads stand for into a block of SGPRs it never reads or writes, and the rewritten loads read that block. If no free block exists below VCC, or a branch can return to the program's entry, nothing is rewritten, so the program fails as it does without #302 instead of binding the wrong argument.
It happens in the title's shaders
I ran the world (opening cutscene) with a local build that saves every container failing at run time. I then translated the 34 programs that fail with
an address in an SGPR that is no root parameteroffline: before #302, with #302, and with #302 plus this commit. Same stack as in my comment on #302, Windows 11, RTX 3080, v1.0.2.1.3b90165a77d95cdf(largest drop in my world run)an address in an SGPR that is no root parametera root UAV or typed root view6f6a359d1166bb27an address from a phian address from a root parameter that is no address3b90165a77d95cdfis the case r4tedx described: a 16-dword table load intos[8:23]overwrites what stands for table dwords 0..7 before a second load reads the root UAV address from table dword 2.Over the 34 programs:
an address not from a root parametera root UAV or typed root view(emit)an address from a root parameter that is no addressan address in an SGPR that is no root parameteran address from a phia select on an untracked mask(emit)None of the 34 translate fully yet. The largest remaining group stops at root UAVs in emit, which #294 works on.
Tests
spill_table_loads_read_entry_values: a table load intos[12:19], then a load of table dwords 0..1. It checks that s16 and s17 are read on entry and that the second load's value traces back to s16's entry value. It fails on Shaders: read root arguments the console spills to memory #302 alone (s16 read on entry) and passes here.spill_table_loads_read_user_sgprsnow also counts the entry copies.cargo test -p victory-shader --lib: 72 passed.cargo clippy -p victory-shader --all-targetsandcargo fmt --check: clean.cargo xtask policy: ok.Not verified
victory translatestill builds without the spill rule (noted on Shaders: read root arguments the console spills to memory #302). For the offline numbers I applied the samespilledcondition inapps/victory/src/translate.rslocally; that change is not part of this PR.No game data attached.
🤖 Generated with Claude Code