Shaders: lane reads and writes where lanes branch differently run in the console flow #320
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!320
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-320"
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?
@r4tedx on GitHub · 2026-11-24 02:16 UTC · original
r4tedx:shader/console-flow-lane-reads→main· +3565 −1440 · 25 files · 46 commits · openCurrent head
0fa6af4, integrated withmainatffe310e. The lane-read tests use structured resource tracking. The translator retains both the mask information used by console flow and the reach conditions used by the descriptor tracker. Local Windows verification:cargo test --workspace --locked(359 passed, 6 ignored) and all-target, all-feature Clippy with warnings denied. No title run for this update. AI-assisted (Codex).Fixes #225. Stacked on #233 (which is stacked on #223); the last three commits are new here (
36e05dc,c223206,fd8b8fe; before the rebases ontomain(now8e79c80) on 2026-11-24 they were6ec772f,4c197a0,a5ba4a4, the ids testers' reports use; replayed unchanged, except that a new upstream test gets the field this PR adds tolower::Parts; CI's two clippy commands are clean at this head; the lane-read loop test now takes its devices from the SM 6.6 hardware-adapter list and skips when there is none, a fix first made at the top of the stack and folded in here).What
On the console
v_readlaneandv_writelaneignore EXEC, and a wave runs a loop while any of its lanes does. The per-lane form runs branches and loops per lane, so a lane that left a loop or skipped a branch is not there to be read or written, and never sees the scalars set inside. Two measured cases onmain:v_writelaneto lane 40 inside a branch only lanes below 20 take: lane 40 is never written (Radeon).A compute program with
v_readlaneorv_writelaneand at least one branch that is not uniform now runs in the console flow from #233 on every host: every lane of a wave runs every block, EXEC guards the vector instructions, and branches are the console'ss_cbranch_*, taken wave-wide.Parts::per_lane_only), so nothing that translated before is refused.ds_(b)permute.SGPR spills (
v_writelaneto stash an SGPR,v_readlanerestoring it) stay on main's per-lane form, since each restore is proven to be its SGPR: with the console's wave size on a host that runs it (asmain), and with no wave size on a 32..32 host, where each restore is lowered as its SGPR. Spill-only wave64 programs therefore now translate on 32-lane hosts instead of being dropped, and spill + DPP programs run split rather than in the console flow. Test:sgpr_spills_across_a_divergent_branch_stay_per_lane.docs/wave64-on-wave32.mdshows as deleted in this diff: #233 folded that plan intodocs/architecture.md, and the merge carries that up.Small generalisations of #233's helpers:
console_lanemasks with the console wave size (waves of 32 too),console_ballotreturns the host wave's ballot when nothing is split, andv_readfirstlanereads no high EXEC word in waves of 32.The second commit closes a gap in the console flow itself, found through the test report on #233: the loop form compilers emit keeps finished lanes in an exit mask that starts as a constant 0, and the console flow's mask joins took only masks derived from EXEC or a VALU result, so such a loop stopped with
a lane-mask join of an untracked mask.Structured::othersnow gives the lane's bit of constant and scalar-built masks for those joins. The per-lane form is unchanged.How this relates to other open PRs
#269 makes scalars leave divergent loops and branches as the wave left them, with maxima over the host wave. In the console flow scalars are the wave's own by construction: with a local switch sending #269's four test programs through it, all four are exact on both adapters here, where #269's two scalar tests give per-half values on hosts that form 32-lane waves (details). This PR does not select the console flow for those programs.
In compiled shaders, the usual source of
v_writelane/v_readlaneoutside whole-wave sections is SGPR spill slots: a scalar parked in a lane of a VGPR and read back later, whatever EXEC holds. #54 and #189 resolve spills at constant lanes in SSA, so the lane accesses disappear and the control flow stays per lane. Where that applies it is cheaper than this PR, and the two compose: with spills resolved first, fewer programs would ask for the console flow. This PR covers what is left: lanes computed at run time, and reads of another lane's own data.Not verified
No game files and no console hardware were used: the expected values follow the ISA's EXEC and lane-access semantics. I did not measure how many of the title's programs take this path, or its cost on them. A tester's whole-title translate found 21 more compute pipelines than #233, 20 of them in the validation class above. The console flow guards instructions where the per-lane form branches around them, so a divergent program does more work per lane.
The fallback to the per-lane form has no test of its own; I found no hand-assembled program that the console flow refuses and the per-lane form takes.
Vertex, pixel and mesh programs are unchanged.
Tested
Windows 11, an NVIDIA RTX 5070 (32..32) and an AMD Radeon iGPU (RDNA2, 32..64) in one machine, hand-assembled GFX10, every lane checked:
emit/lane_read_loop_tests.rs(the #225 repro, no longer ignored): exact on both adapters in waves of 32 and of 64 (on the RTX 5070 the wave64 program runs in two halves).split_tests::lane_writes_reach_lanes_outside_the_branch: exact on both. With the new condition switched off it fails on the Radeon (lane 40 keeps 1).split_tests::loops_run_while_any_lane_of_the_console_wave_doesnow checks 64-lane hosts too.split_tests::loops_with_an_exit_mask_grown_from_zero(the compilers' loop form, a lane read in each iteration, the exit mask counted afterwards): refused on the RTX 5070 before the second commit, exact on both adapters now.cargo test --workspace: 281 passed, 0 failed, 4 ignored ata5ba4a4(two testers report the same count; 280 was the head before it).cargo clippy --workspace --all-targets: nothing new.cargo xtask policy: ok.AI-assisted; no game assets were used.
🤖 Generated with Claude Code
A console wave64 program that reads masks whole or lanes of the other half now runs on a host without 64-lane waves when its group is one console wave (64 threads or fewer, no LDS). It runs as the console does ("console flow"): - `structure::structure_console` never resolves mask joins from what the lanes arriving know (every lane arrives); `Structured::execs` gives each vector instruction's EXEC bit. - Vector instructions are guarded by EXEC. Branches are the console's s_cbranch_*: EXEC, VCC and mask-operation SCC tests are the console wave's, from both halves' ballots exchanged through group-shared memory between group barriers, which every thread reaches since both halves branch alike. - Masks read whole are the exchanged ballots. v_readlane and v_readfirstlane read the owning half; v_writelane, v_mbcnt and mask bit tests use the console lane. The per-lane form is tried first; a program that needs the console flow is lowered again from the console structure. GPU tests on an RTX 5070 are exact against the console: s_bcnt1 over both halves (64, 48 and 32 threads), v_readlane 40, an exchange inside a branch only the lower half takes, and a loop the halves leave at different iterations with a lane read in each. The last one shows that the per-lane form, which hosts with 64-lane waves get, is wrong for it (on a Radeon iGPU): noted in docs/wave64-on-wave32.md, not changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>1a8a3ed) 3c961b5ea0b623fd3) bf13a276c5940d32f) into the host wave sizes branch 02b955ffc902b955f) into the console flow e5ffedbb8b1e247b1) into the lane reads branch 49f31ec4ff7147671) eb12838eef@SpaghettiMaster545 on GitHub · 2026-11-24 02:34 UTC · original · edited 2026-11-24 02:36 UTC
Update: the head is now
fabe8bc, which adds only test validation insplit_tests.rs; the translator is the same as in5cc9a7e, so the title measurement below applies to it too.Test report with the title itself on a 32-lane host, which the earlier reports did not cover. This PR's head
5cc9a7e(with #223 and #233 under it) againstmaind2a4bae.Tested
cargo test --workspace --no-fail-faston5cc9a7e(debug): 280 passed, 0 failed, 4 ignored.build unknown (b99f876b…)as in #5), diag build (--profile diag --features diagnostics) of each commit, each with its own emptyVICTORY_CACHE_DIR, the sameVICTORY_KEYS(Enter every 3 s from 8 s to 47 s: through the first-boot screens into story mode, which opens at 24 s in both runs), until the host GPU failure:maind2a4bae5cc9a7emain, 26 translate and run with this PR, 90 now stop in translation with a reason (console wave64 lanes on a host without 64-lane waves: 67,a wave64 group sharing LDS without barriers on a host without 64-lane waves: 38, counted over all programs), and 3 were not reached in this run. The 97 programs that translate only onmainare 90 of those driver-refused ones, plus 7 not reached onmain. So nothing that ran onmainstops running here, and 26 compute programs run that did not.Not tested
VICTORY_ADAPTER, a release build of the PR.AI use
@r4tedx on GitHub · 2026-11-24 02:56 UTC · original
Thank you for running the title, and for the per-program comparison: "nothing that ran on
mainstops, 26 run that did not" is exactly what I could not check.Two things changed since
5cc9a7ethat touch your numbers:a5ba4a4, rebased onto a fix in #233 (3098672): a program with DPP ords_swizzleand av_readfirstlaneis no longer split in halves, because the upper half read lane 32 where the console reads the wave's first lane (found with a hand-assembled case, wrong on an RTX 5070 before). Such programs now take the console flow if their group is at most 64 threads without LDS, and stop with the reason otherwise. So some of the 26 may move; if you rerun, the new count would tell how common that is.Next, from your counts and that one: the programs that stop with
a wave64 group sharing LDS without barriers(38 in your run) are all groups of one console wave, which the console flow can take with a group barrier before each LDS access. I am working on that as a follow-up on top of this PR, together with more specific reasons for the other 67, so a rerun shows what stops them.The unchanged device removal is what I would expect: nothing in this stack touches #71.
No game data used on my side. AI-assisted.
@SpaghettiMaster545 on GitHub · 2026-11-24 03:03 UTC · original
Rerun on
a5ba4a4, the same way as before (diag build onmaind2a4bae, its own empty cache, the sameVICTORY_KEYS, RTX 5070 Ti, driver 621.24):main(the samemainrun as in my first report): of the 119 compute programs the driver refused there, 26 translate and run, 90 stop in translation, and 3 were not reached. 0 programs that ran onmainstop. This is the same split as on5cc9a7e.5cc9a7e, program by program: 0 lost and 0 gained. So thev_readfirstlanechange in3098672moved none of the 26 that this run reaches: they either have no DPP /ds_swizzlebeside av_readfirstlane, or they now take the console flow and still run.console wave64 lanes on a host without 64-lane waves53,a wave64 group sharing LDS without barriers on a host without 64-lane waves37. The 37 are the ones your LDS follow-up would take; I can rerun that when it is up.5cc9a7e. The difference is in programs only one of the two runs reached (the runs end at the hang, at 92 s and 115 s), not in programs that changed outcome.cargo testnot rerun ona5ba4a4: the new commits since my run change the split's selection and its tests, and the title result above is what they affect.(Claude Code, Claude Opus 5.5: ran the build and the title, compared the two logs program by program.)
@MisaXz on GitHub · 2026-11-24 02:25 UTC · original · edited 2026-11-24 03:16 UTC
Test report for
5cc9a7eon a second machine with a 32-lane and a 64-lane adapter (following up on the #233 thread).Tested
5cc9a7e(based2a4bae):cargo test --workspace --no-fail-fast: 280 passed, 0 failed, 4 ignored.cargo test -p victory-shader --lib -- split_tests lane_read_loop --nocapture --test-threads=1: every case printsexacton both adapters, the RTX 5080 withsplit trueand the Radeon withsplit false. That includes:lane_reads_in_a_loop_lanes_leave_at_different_iterations(the #225 repro): wave32 and wave64 exact on bothloops_with_an_exit_mask_grown_from_zero(the new test for the untracked-mask join): exact on bothlane_writes_reach_lanes_outside_the_branch,loops_run_while_any_lane_of_the_console_wave_does,masks_read_whole_count_both_halves(64, 48 and 32 threads),lane_reads_cross_halves,dpp_row_masks_name_console_rows,in_half_lane_reads_match_the_console_on_every_adapter(32, 64, 128 threads), the 3-D groupsNot tested
Re-run on the new head
a5ba4a4(same machine, both adapters):cargo test --workspace --no-fail-fast: 281 passed, 0 failed, 4 ignored.cargo test -p victory-shader --lib -- split_tests lane_read_loop --nocapture --test-threads=1: 12 passed, every case printsexacton the RTX 5080 (split) and on the AMD Radeon(TM) Graphics iGPU (native).AI use
@r4tedx on GitHub · 2026-11-24 03:25 UTC · original
The follow-up I mentioned is up as #439 (head
88cb024, on top of #320): programs of one console wave per group that share LDS now take the console flow on 32-lane hosts, with a group barrier before each LDS access, and what still stops says why (a group of more than 64 threads,ds_permute across the halves,a whole-wave section).If you rerun, the numbers that would tell the most are the count per reason on
88cb024and, for the whole-title run, whether the validator accepts every emitted compute module. I could only check hand-assembled programs: they validate and are exact on an RTX 5070 and a Radeon iGPU, and I say in the PR that the LDS tests there do not prove the barrier is needed.No game data used on my side. AI-assisted.
@miniongk on GitHub · 2026-11-24 03:33 UTC · original
Tested
a5ba4a4on an RTX 5080, driver 621.24, Windows 11 26300, with a local Xbox Series 1.0.2.1 copy.cargo test --workspace: 281 passed, 0 failed, 4 ignored. The single lane-read/divergent-loop synthetic case also passed on its own in 0.53 s.On the real title path, this removed the host-pipeline refusals seen on
mainand the divergent cross-lane translation failures seen with #189. The run still ended inDXGI_ERROR_DEVICE_HUNG; DRED implicated mesh dispatch and indirect-execution commands. So this is a useful shader improvement, but does not by itself resolve #97 here.Only aggregate counts and error classes shared, no game data or raw game logs. AI-assisted (Kimi Code).
@r4tedx on GitHub · 2026-11-24 03:40 UTC · original
@miniongk thank you for the run on the title. Two counts would make it usable as evidence, if you still have the logs:
mainrefused in that run and how many this head refuses (host pipeline refusedlines), anda cross-lane read in divergent control flowand how many of those translate here.Also, if you can run
victory translate --validateover the same files: a whole-title run found 20 modules this head emits that the validator refuses, which is why this PR is a draft, and a title run does not show them. #439's head9745f35prints what each refused module declares and calls.Counts and messages only, please. AI-assisted.
@EduAzevedo on GitHub · 2026-11-24 03:58 UTC · original
Corpus-wide numbers for what was seen on one shader above:
077ec8b, retail shaders (v1.0.2.1), offlinevictory translate --listagainstmaind2a4bae, all 26,148 programs.a descriptor neither loaded nor built: 298 → 3.a descriptor read from the first lane of a phi, so only one more program translates on this branch alone.mainstops translating.So nearly all of what this PR unlocks goes through that phi case, which matches the #320 combination results above.
AI-assisted.
@r4tedx on GitHub · 2026-11-24 04:00 UTC · original
@EduAzevedo thank you. I think this was meant for #307:
077ec8bis that PR's head, and the two things it refers to ("seen on one shader above", "the #320 combination results above") are comments on its thread, not this one. It is worth reposting there so @AntoninMichelq sees it, since "294 of the 298 now stop ata descriptor read from the first lane of a phi" tells them what to do next. Nothing in this PR touches descriptor tracing.For whoever merges #307 and this PR together, since that combination was tested: I checked the merge of
077ec8bwith this head. There is one textual conflict, inemit/lower.rs: both add av_readfirstlane_b32arm at the same place, #307 for a waterfall loop's recorded reads and this PR for the console flow. Keep both, #307's first, as that tester did: its guard is the more specific one, and a waterfall read should stay the lane's own dword in the console flow too. #307's test helper also needs the fields #233 adds tolower::Parts(target,console_cf, andper_lane_onlywith this PR). I will do that on my side if #307 lands first.From reading the merge only; I did not build or run the combination. No game data used. AI-assisted.
@EduAzevedo on GitHub · 2026-11-24 04:03 UTC · original
Im sorry, getting a little crazy here 😂
@r4tedx on GitHub · 2026-11-24 05:55 UTC · original
Housekeeping, so the thread and the description agree:
image_sampleclass thatmainhas too and #180 fixes, as the note at the top of the description says.mainemits 23 modules of that class, not 22 (22 is #233's count, per the tester's table); three commits are new here, not two; the test count ata5ba4a4is 281, as @MisaXz and @miniongk reported, not 280.mainwith nothing regressing.Head unchanged (
a5ba4a4). AI-assisted (Claude Code).63bcca4) into the host wave sizes branch 91aa05674191aa056) into the console flow 1c74ab433b1c74ab4) into the lane reads branch db8570686f@AKA0GHOST on GitHub · 2026-11-24 07:52 UTC · original
Tested this PR on an RTX 5070 (Blackwell, 32..32, driver 621.14), and extended the console flow to LDS. Diff below in case it is useful.
Why: on Grand Theft Auto VI the screen-size lighting compute passes (160x90 / 320x180 dispatches) are dropped on NVIDIA, which leaves every full-screen HDR/lighting target at 0. Six of them still fail with this PR. All six are 8x8x1 = 64 threads, one console wave. What keeps them out of the console flow: 3 use only LDS (128 dwords, no
s_barrier), 1 uses LDS + whole-wave sections, 2 use sections (+v_permlanex16).Change: allow LDS in the console flow for one-wave groups, with a group barrier after each LDS access. In the console flow both halves run the same instruction stream and every thread reaches every block, so a barrier after op n gives the console's in-wave lockstep order for LDS. It can't hang, for the same reason the exchanges can't.
Test (
split_tests.rs, hand-assembled): lane t writes3tto LDS dword t, then reads dword63 − twith no barrier, then addsv_readlane(v0, 40)to force the console flow. It expects3(63 − t) + 40. Exact on the RTX 5070, and all 11 split tests pass.In game: the 3 LDS-only passes (
0e366d15868e17bd,5e7cd6d3557a6c35,a14c1da4be7b9837) now emit, validate and run. A 480x270 RGBA16F target now holds a lit sky/horizon, and several 256x256 RGBA16F targets fill. The full-screen lighting targets are still 0. The remaining blockers are whole-wave sections in the console flow (the halves would exchange partial results throughexchange()) andv_permlanex16(#98).Not done: the full test suite with this change; only the split tests ran.
AI-assisted (Claude Code); no game files attached.
@AKA0GHOST on GitHub · 2026-11-24 07:58 UTC · original
Follow-up to my comment above: I missed that #439, stacked on this PR, already does the LDS part (a barrier before each access, same effect as the one after in my diff). It also covers whole-wave sections across the halves, which my diff doesn't. Please disregard the diff here.
Checked #439 + #20 on the same RTX 5070 with the same seven lighting shaders from Grand Theft Auto VI: six now emit, validate and get pipelines (
0e366d15868e17bd,2f03a2df10503cef,5e7cd6d3557a6c35,a14c1da4be7b9837,bfad8c6743ac5977,3d002bca51069e01). Onlya929109552ce1e84still stops (v_permlanex16, #98). I'll put in-game results on #439.AI-assisted (Claude Code); no game files attached.
@r4tedx on GitHub · 2026-11-24 08:35 UTC · original
@AKA0GHOST thank you, and no harm done with the diff: arriving at the same barrier independently is a useful check on the idea. Your finding is the more valuable part: that the screen-size lighting passes are among the programs dropped on NVIDIA, and that six of the seven emit, validate and get pipelines with #439 (+ #20) on an RTX 5070. That is the first report tying this stack to specific passes whose output is missing. In-game results on #439 would be very welcome, with one caution from other runs: the world needs the PR set from #71 (and
VICTORY_SHADER_LOOP_LIMIT=32on some cards) to stay up long enough to look.The seventh (
a929109552ce1e84,v_permlanex16) is outside whole-wave sections, I take it; inside a section the stack follows it, outside it nothing here lowers it, and #98 is the PR for that.Rebased onto
main2e4e280, force-pushed with lease: head is4a38a75, wasa5ba4a4. Upstream merged 32 PRs and two of their new tests needed the argument #223 adds (fixed there). The three commits of this PR are replayed unchanged and each builds on its own; the description gives their old ids.AI-assisted (Claude Code).
@slint6614-dev on GitHub · 2026-11-24 08:44 UTC · original
Measured on the full retail shader pack (26,503 containers) with
victory translate --validate --pipelines(pipelines created on an AMD RX 9070, Adrenalin, Windows 11; dxil.dll from SDK 10.0.26100), against main1f858b0. Counts are emitted / validated / pipelines.These were run on the RX 9070 (64-lane host), so the console-flow paths for 32-lane hosts are not what is measured here.
@r4tedx on GitHub · 2026-11-24 11:02 UTC · original
@slint6614-dev, the RX 9070 results give us a wave64 comparison for the RTX measurements. On #320, 22 more compute programs emit and two more validate. The increase of 20 stage-validation failures matches the class tracked in #201. The RTX opcode census on #233 found
samplein every failing module. Confirming that diagnosis for the AMD set would require matching the modules or inspecting their emitted ops. #180 covers the implicit-derivative compute lowering.AI-assisted (Codex).
@AKA0GHOST on GitHub · 2026-11-24 15:55 UTC · original
@r4tedx thanks. On the seventh (
a929109552ce1e84, 8x8x1, no LDS): its threev_permlanex16_b32are all inside whole-wave sections. Each follows ans_or_saveexec_b64 s[4:5], -1, and EXEC is restored froms[4:5]after it (DPP row ops alongside). Still, #439 at the head I built (055aef9, + #20 + main56d5032) stops it withemit: v_permlanex16_b32. So it seems the section simulation doesn't cover this shape; I didn't dig into why.The in-game results on #439 are still pending. My runs so far hung before reaching a world frame in the capture window, so I'll post once I have one, with the #71 PR set as you suggest.
AI-assisted (Claude Code); no game files attached.
@r4tedx on GitHub · 2026-11-24 15:57 UTC · original
@AKA0GHOST, thank you, that is the detail I was missing. Checked here offline (local title data, CPU only):
a929109552ce1e84stops at the same instruction (offset0xd00) withemit: v_permlanex16_b32onmainffe310e, and on #439bf0f951for a 32-lane host and for a 32-64 host alike. So it is not something this stack takes away or the wave split causes: the instruction has no lowering of its own anywhere yet, and the whole-wave section recogniser (emit::wave) followsv_permlanex16only in the shapes it knows. Your description (each one afters_or_saveexec_b64 s[4:5], -1, EXEC restored froms[4:5], DPP row operations alongside) says this is a section shape the simulation does not follow, which fits the reason it falls through to.Two ways to take it, both after this PR and #439 (they stay as they are for review): teach the section simulation this shape, or lower
v_permlanex16_b32on its own as an in-half read (each lane takes a lane of the other row of 16 in its 32-lane half), which also covers the instruction outside sections. @MichaelSmithAI's port of #404 on #439 does the second for the all-active form, with a test in both the split and the console flow; I will look at that first.For the in-game runs: a hang before a world frame on a 32-lane card is most often the wave64 mesh programs (#71, #778), not compute, so the #71 set is the right one to add.
AI-assisted (Claude Code).
@LooperSalty on GitHub · 2026-11-24 16:37 UTC · original
From a tester working with Claude (AI-assisted); measured on my own machine (i7-13700KF, RTX 4070 Super). No game data involved.
Data point for the divergent-flow cross-lane work: we also handle the wave prefix (
v_mbcntallocation, ballot-count plus prefix) in a divergent flow on a 32-lane host, each 32-lane half of the console's 64-lane wave computed independently (half-wave sum, election, atomic, readfirstlane, prefix), under an opt-inapproxmode. A test builds the allocation per half and checks the halves get disjoint ranges (it fails if the halves are merged).Measured: the four InstanceCulling_CS_{Prop,Tree}_* programs get past the prefix; with a stride table for bindless heaps (#704) they emit, validate with dxil.dll and create their PSO on the RTX 4070 Super. Without that table they stop at "unknown stride".
It sits on top of the Wave64-on-Wave32 stack (#189/#439/#320 and our own cross-lane option), which is not on main, so I am not publishing a branch; I can post the diff of the prefix part here if it helps.
@465d6a0eac on GitHub · 2026-11-24 17:02 UTC · original · edited 2026-11-24 17:20 UTC
Thank you for this, @r4tedx! Many pull requests here are still waiting to be merged, so I've ported this one to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/34. It went in together with #439, which builds on it. You're credited as the author there. This pull request stays the original.
Test results
cargo clippy(both variants) andcargo test --workspacepass (407 passed, 0 failed).victory translateover the 26,148 shader programs in my own copy of the game with--host-lanes 32-32, before → after #320/#439: compute programs emitted 1,221 → 1,422 of 2,582; "a select on an untracked mask" 284 → 0, "a lane mask holding lanes elsewhere read as data" 266 → 3, "console wave64 lanes on a host without 64-lane waves" 162 → 0.@Marvisak on GitHub · 2026-11-25 00:27 UTC · original · edited 2026-11-26 07:21 UTC
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. The clippy error named in the last triage is fixed: head
960b3e1passesemit::Target::ANYinplaced_uav_tests.rs(merged up from #223), and CIcheckpasses. Nothing else changed since85362ac.The verdict stays because this PR's own part (the console flow for compute programs with
v_readlane/v_writelaneand a divergent branch, with the per-lane fallback, and SGPR spills kept per-lane sinced5f8f2c) can only land on top of #223 and #233. #233 is waiting on a maintainer's choice between this stack and #2176/#2925. The evidence is the right kind: lane readbacks on 32-lane hardware (16 of 16 on an RTX 3070 ateb12838) and title translate counts with no program lost. Once #233 is decided, this needs a maintainer read in stack order.CI: passing.
Generated by Claude Code
@r4tedx on GitHub · 2026-11-25 07:08 UTC · original
Updated for the needs-rebase triage:
main(940d32f) is merged in through #233, headeb12838(merge commits, no rebase). It carries #233's three fixes (see there). Conflicts were inlower.rs,mod.rs,structure.rsand the test files:emitkeeps the per-lane fallback when the console flow cannot lower a program that asked for it only for correctness; this PR'sStructured::othersbecomesmain's identicalStructured::other.One behaviour to know about: compute programs that spill SGPRs through
v_writelane/v_readlaneand have a divergent branch now take the console flow on every host by this PR's rule, althoughmain's spill handling already makes the per-lane form exact for them; the per-lane fallback stays. On a host that runs the program's wave size that adds no barriers (one host wave is the console wave).Checks: both CI clippy commands clean;
victory-shader270 passed, 0 failed, 3 ignored, on an AMD Radeon iGPU only. Not run on a 32-lane card today (see #233).AI-assisted (Claude Code).
@r4tedx on GitHub · 2026-11-25 10:55 UTC · original
Pushed
d5f8f2cefor the triage note on SGPR spills: spillv_readlane/v_writelanekeep main's per-lane form, with the console's wave size where the host runs it and none on a 32..32 host (each restore lowered as its SGPR). New testsgpr_spills_across_a_divergent_branch_stay_per_lanechecks the wave size on both targets (64 onTarget::ANY, none on 32..32) and that the first pass without the console flow gives the same DXIL; it fails with thelower.rschange reverted. Description updated.Verified locally: clippy
-D warningsclean (default and--all-features);victory-shader --libon WARP, one test thread: 269 passed, 2 failed, 3 ignored, the 2 being the known hardware-only checksgathers_at_a_level_match_the_hardwareandpermutes_read_the_lane_named_and_zero_from_lanes_left_out. No hardware adapter and no title data used.AI-assisted
@r4tedx on GitHub · 2026-11-26 05:07 UTC · original
Merged current
main(63bcca4) in, with no rebase or force-push. Head nowdb85706, and it merges cleanly withmain. The PRs above (#439) are merged from this head in turn. Details, conflict notes and the per-level checks are on #439 (policy ok, clippy clean, the WARP shader suite has onlymain's own 4 failures).Synthetic tests only; no title data used.
AI-assisted
@r4tedx on GitHub · 2026-11-26 05:14 UTC · original
Correction to my last comment: CI's clippy failed on the previous head. Main's view-mark draw test (
crates/victory-gpu/src/draw.rs) buildsemit::Options { view_marks: true }by hand, and this stack adds atargetfield toOptions. My local clippy run left out the test targets, so I missed it. New head85362acehas the fix merged up from #233: the test fills the remaining fields with..Options::default(). Nothing else changed.Verified on #223
0f6dec04and #4398a320556:cargo clippy --workspace --all-targets --locked -- -D warningsis clean, andcargo xtask policypasses. No title data was used.AI-assisted
@r4tedx on GitHub · 2026-11-26 05:18 UTC · original
Second follow-up: CI's diagnostics clippy (
--all-features) found one more call from main that this stack'sTargetargument breaks. Incrates/victory-gpu/src/pipeline/placed_uav_tests.rs:77,emit::emitwas called with six arguments. New head960b3e19has the fix merged up from #233: the call passesemit::Target::ANY, the same default the other callers use.Verified on #223
fbfd3c67and #43913be4c2c: both CI clippy commands are clean,cargo clippy --workspace --all-targets --locked -- -D warningsand the same command with--all-features. I didn't run the CIcargo test --workspacestep on this PC, so CI will be the first to run it on this head. No title data was used.AI-assisted
@r4tedx on GitHub · 2026-11-26 05:23 UTC · original
This triage reviewed
85362ace. Theplaced_uav_tests.rs:77call it names is fixed on the current head960b3e19: the call passesemit::Target::ANY, and it came up from #223fbfd3c67. CI now passes on all four heads of the stack: #223fbfd3c67, #23387d1f423, #320960b3e19and #43913be4c2c. Merge order is unchanged: #223, then #233, #320, #439.AI-assisted
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.