Shaders: wave64 compute on 32-lane hosts, in halves and in the console flow (rebase of #233) #1927
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1929"
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?
Imported from Marvisak/VIctory. Originally posted by slatefield on 2026-11-25T01:07:37Z.
Closed: r4tedx updated #233 itself onto
main940d32f(head7147671), taking thehost_shadertarget point from this rebase and keeping one PR open so the testers' reports stay in one place, which is the right shape. The validation done here that was useful stays in #233's thread: upipibi's RTX 3070 run of thesplit_tests(13 pass; the two whole-mask-read cases are still refused on 32-lane hosts, which is a real limitation of the split form), and the wall of review about the console flow's group barriers inside branches and loops.Nothing else is open from this rebase. The branch
slatefield:up-233-rebasestays on the fork for reference.Imported from Marvisak/VIctory. Originally posted by slatefield on 2026-11-25T01:08:56Z.
Branch updated for
main's new commit42363ab("hardware-only shader checks skip on a machine without a GPU"), which touched the sameHost::newadapter selection. One merge commit on top, nothing else changed: main's refusal of a software default adapter stays, and the branch'sVICTORY_ADAPTERname selection goes in front of it, so an explicitly named adapter is still taken and the refusal only applies to the default path. Windows-target clippy with--all-targets --all-featuresclean, Linuxvictory-shader --lib146 passed, 2 ignored.The other three rebases (#1922, #1923, #1924) already merge cleanly onto
42363ab.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T02:18:25Z.
Automated triage for the maintainers.
This pull request does not merge cleanly into
main. Conflicting files:apps/victory/src/translate.rs,crates/victory-gpu/src/shader_cache.rs,crates/victory-shader/src/emit/bvh_tests.rs,crates/victory-shader/src/emit/host.rs,crates/victory-shader/src/emit/lower.rs,crates/victory-shader/src/emit/memory_tests.rsand 6 more.It will be reviewed once it is rebased onto the current
main.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by 0xkn0wh3r3 on 2026-11-25T05:26:12Z.
A question before merge, about the console flow's group barriers on NVIDIA.
The console flow places group barriers (
exchange,lower.rs9724-9756 in this PR) inside the program's own branches and loops, throughconsole_branch/any_lane(9503, 9578, 9647) andmask_dword(1847). That is safe as long as both host waves always take the same edges, which the design gets from exchanged ballots and SCC bits. Butscc_bit(9617) accepts any scalarVal::Bitas uniform, and a scalar memory load runs once per host wave, so a value that changes during the dispatch (a flag or counter another group writes) could send the two halves different ways, with one half waiting at a barrier the other never reaches.For reference: a fork with a similar "two host waves" form that put barriers in branches and loops (Zettrox/ztrx, commit
e9765a7) lost the device on an RTX 4070 in 4 of 4 runs when the title dispatchedptfx_CS_lightAtlas_Spriteandptfx_CS_lightAtlas_Trail, and turned that form off by default. I have not checked whether those two programs take this PR's console flow.Could the 10
split_testsGPU tests (listed as not checked) be run on an NVIDIA card, and a title run go through those two particle programs, before this is merged?Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T05:44:57Z.
The NVIDIA run asked for above. Ran on Windows 11 with an RTX 3070 (Ampere, 32-lane waves, driver 616.56), debug build, at
b9b6dab,cargo test -p victory-shader --locked: 256 passed, 5 failed, 3 ignored.main(the twostride_testsheap-buffer reads andgathers_at_a_level_match_the_hardware).split_tests. On this 32-lane host the translator refuses both programs instead of splitting them:first_lane_reads_are_the_console_waves:DPP and v_readfirstlane: GFX10 code at 0x34: a lane mask read whole in a wave64 program split in halves is not supported(split_tests.rs:216)masks_read_whole_count_both_halves:s_bcnt1 of lanes below 40: GFX10 code at 0x30: a lane mask read whole in a wave64 program split in halves is not supported(split_tests.rs:216)split_tests/ wave-size tests pass, among themlane_reads_cross_halves,exchanges_inside_a_branch_one_half_skips,loops_run_while_any_lane_of_the_console_wave_does,three_dimensional_groups_keep_the_consoles_lanesandeach_adapter_gets_what_it_runs.So on a host without 64-lane waves, the whole-mask reads (a
v_readfirstlaneafter DPP,s_bcnt1of the exec mask) still hit that refusal. A 64-lane host never splits, so it wouldn't show this. Not run: a title.AI-assisted (Claude Code). Synthetic tests only.
Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T07:09:11Z.
@slatefield, thank you for doing this; it saved real time. #233 itself is now updated with
main940d32fmerged in: head7147671onshader/wave64-console-flow(with #223's plumbing at02b955funder it). I used this PR as the reference for the conflicts and adopted yourhost_shadertarget point for the warm cache path (it now asks the run's own host range, the same function the runtime uses). The one place I departed is the order of the split-form refusal and the console ballot inmask_dword; the details and the three fixes on top are in the note on #233.Since the stack is updated by merge commits rather than rebases (testers quote its hashes), the trees differ in history but should be close in content:
git diff b9b6dab 7147671 -- crates/shows what is mine. Keeping one PR open for #233 would keep testers' reports in one place, so I would suggest closing this one if the diff looks right to you, but that is your call.AI-assisted (Claude Code).
upstream-sync referenced this pull request2026-11-25 09:06:10 +00:00
upstream-sync referenced this pull request2026-11-25 11:05:18 +00:00
Pull request closed