fix(shader): structural wave-wide lowering for cascade-shadow rasters (VICTORY_WAVE_WIDE_AUTO) #281
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/281"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Mikey970 on 2026-11-27T20:40:29Z.
Problem
On 32-lane hosts,
VICTORY_WAVE_WIDEis off globally because widening shaders that place translator barriers inside loops (e.g.ptfx_CS_lightAtlas_Sprite/_Trail) causes device loss. As a result, the 18cascadeshadows_rendering:CS_ShadowRenderTiled*raster variants fall back towithout skips, scalars followed, where a cross-half exchange runs after per-lane branching with no barrier—producing an 8-px sun-shadow staircase and lit-through tiles on walls and hair.Fix
ir::without_skipsintoskips_left_outand addsir::deep_skip_holdsto detect when earlier forms stop at a cross-half exchange kept from every lane only by a deep-onlys_cbranch_execzskip (an inner skip sharing its join with an outer skip).lower::watch_loop_barriers/reset_loop_barriers/note_barrierto reject any wave-wide lowering that places a translator group barrier inside a CFG cycle (keepingptfx_CS_lightAtlas_*safe).VICTORY_WAVE_WIDE_AUTO(on by default whenVICTORY_WAVE_WIDEis unset;=0restores old order): tries wave-wide beforewithout skips, scalars followedwhendeep_skip_holdsmatches and no translator barrier lands in a loop.VICTORY_WAVE_WIDEto accept a comma-separated list of container digest hex prefixes (>= 8 digits) for targeted testing without affecting0/1, and adds diagnosticVICTORY_WAVE_BALLOT_SYNC=1(off by default).VICTORY_WAVE_WIDE_AUTOandVICTORY_WAVE_BALLOT_SYNCinshader_cache.rs.Testing
emit::wave64_tests::a_count_behind_a_skip_that_ends_with_an_outer_one_takes_the_wave_wide_form(validates DXIL and covers deep-skip selection, own-join skip, and loop-barrier rejection) andemit::barycentric_tests::wide_digest_list_matches_prefixes_and_leaves_flags_alone(both passed).cargo check -p victory-gpupasses.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T19:22:32Z.
Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.
Pull request closed