Shaders: a folded program takes every branch on a lane mask wave-wide #3440

Closed
Lyrnc wants to merge 2 commits from upstream-pr/3440 into main
Lyrnc commented 2026-11-29 23:22:56 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-29T23:22:56Z.


No issue filed: found while checking the wave64 folding (crate::fold) against a wave64 card with hand-written programs.

What it changes

What was wrong. A folded wave64 program runs one console wave as one host wave, two console lanes per host lane, and keeps the console's scalar code. folded() still took its branches on lane masks per lane, unless the program uses LDS or barriers, sets EXEC to every lane again, or has lane conditions too large to follow. Per lane, a host lane whose two console lanes are both outside EXEC leaves the region, where the console wave runs it once for all its lanes:

  • a scalar written in the region (v_readlane_b32, v_readfirstlane_b32, any scalar instruction) keeps its old value in that lane after the join, where every console lane reads the new one;
  • a loop left on the SCC of a mask operation (v_cmpx, s_andn2_b64, s_cbranch_scc0) stops counting rounds in the lanes that left.

It is wrong only where both console lanes of a host lane (lanes t and t + 32) are out of EXEC while other lanes are in: alternate lanes, one lane of the upper half, sparse masks, or lanes leaving a loop one by one. An EXEC of all lanes or of one half does not show it.

What this does. folded() first builds the structure with every branch on a lane mask taken wave-wide: the EXEC branches, then every branch the structure names as one on a lane mask (Structured::wave_any: VCC, SCC of a mask operation). One host wave is one console wave, so that is the console's control flow. Where structure_wide fails for that set, the forms before this change are taken as they were. VICTORY_WAVE_FOLDED_LANES=1 takes them always. The switch is in the shader cache key (KEYED, second commit), so every_switch_of_the_translator_is_in_the_key still holds. Programs that are not folded do not change.

With folding off by default (5c262d7b, 05d1c564). On current main a program is folded first only with VICTORY_WAVE_FOLDED=1. By default folded() is still reached for programs the exact forms do not take, before deep skips, wave-wide branches and the approximate forms, and once more as a last resort; VICTORY_WAVE_FOLDED=0 leaves it out. This change applies to every program that reaches folded(): by default to those fallback programs, with =1 to every folded program, with =0 to none. How many of the title's programs fold by default on current main was not measured here.

Merging. Rebased onto main 7995b81b. Main's 1b4b6cd4 had already taken KEYED from 45 to 46 names (VICTORY_SCALAR_SPLITS), so the old second commit's [&str; 46] edit was empty there, and the array held 47 names in a 46-element array. The second commit (80e8527f, "Shader cache: KEYED holds 47 names with VICTORY_WAVE_FOLDED_LANES") now makes it [&str; 47]; 47 is the count of names in the array on 7995b81b plus this branch. If #3210 or #3061 (which drop the stale VICTORY_SCALAR_SPLITS) or #3308 (which adds VICTORY_WIDE_SHADOW_TILES) lands first, the length has to be counted again: a one-line conflict.

Credit: no code from other pull requests.

How it was tested

  • GPU and profile: RTX 5080 and the Ryzen 7 9800X3D's integrated Radeon (gfx1036), Windows 11. Shader tests on the cards, not a run of the game; no Series X/S profile, resolution, DLSS, frame generation or ray tracing involved.

  • Oracle: 219 hand-written one-wave GFX10 wave64 programs (one 64-thread group, three sets of 151, 15 and 53), run natively in wave64 on the gfx1036 with hw_oracle. The same programs are translated by emit::emit for a host of 32-lane waves (every form it tries), run on the RTX 5080 and on the Radeon as a 32-lane host, and all 16 outputs of all 64 lanes are compared. The harness is local (emit::fw64_local_tests, not in this branch): VICTORY_ADAPTER=nvidia|radeon LOCAL_FW64_HOSTWAVE=32 LOCAL_FW64_OUT=<file> VICTORY_WAVE_WHY=1 <test exe> --ignored --exact --nocapture --test-threads=1 emit::fw64_local_tests::<local_fw64_wave_wide|local_fw64x_wave_wide|local_nx_cases>, with LOCAL_FW64_FOLD=1 for the forced folds below.

  • Before (829188e9, where folding was still on by default): 156 exact, 51 differ, 12 refused, the same on both cards. 137 of the 219 are folded (118 + 15 + 4).

  • After (cbc69bbf): 169 exact, 38 differ, 12 refused, the same on both cards. All 137 folded programs take the new structure; none falls back. 13 programs went from differing to exact: v_readlane_b32 inside an EXEC branch at lanes 0, 31, 32 and 63 with alternate lanes or lane 40 alone (8), and the loops left on s_cbranch_scc0 after s_andn2_b64 (5: all lanes, lower half, upper half, alternate lanes, sparse). None went the other way. The 38 that still differ differ the same way on 829188e9 (v_writelane_b32 in a branch among them).

  • Folded by force (the harness calling folded() directly; 204 programs, RTX 5080): 155 exact, 34 differ, 15 refused before; 181, 8, 15 after. The 26 that became exact add v_readfirstlane_b32 in a branch, vote loops, a vccz/vccnz vote on such a mask and a scalar instruction in a branch read after the join. None went the other way. This run was on the first build of cbc69bbf, before its last amend; the run above was repeated on the final commit with the same counts.

  • New tests scalars_written_in_a_branch_on_exec_are_the_waves_after_the_join and a_loop_left_on_the_scc_of_a_mask_operation_counts_the_waves_rounds (seven masks over both halves, lane reads at 0, 32 and 63): pass on both cards. With VICTORY_WAVE_FOLDED_LANES=1 (the old forms) both fail on both cards (lane 1, v_readlane in the branch; lane 0, rounds).

  • For shader changes, the wave sizes tested (32 and/or 64 lanes): console wave64 programs on a host of 32-lane waves (RTX 5080, and the Radeon held to 32), checked against the gfx1036 in wave64. Not on a host of 64-lane waves.

  • cargo test passed for the crates it touches: partly. On 80e8527f (main 7995b81b + the two commits), RTX 5080:

    • cargo check -p victory-gpu: passes (the rebased KEYED builds).
    • cargo test -p victory-shader --lib -- folded_tests fold::: 19 passed, 0 failed (454 filtered out), with both new tests.
    • cargo test -p victory-gpu --lib -- every_switch_of_the_translator_is_in_the_key: fails, as it does on main 7995b81b without this branch: VICTORY_SCALAR_SPLITS is not read by the translator any more (the stale name #3210 and #3061 drop). The test's first check, that every switch the translator reads is in the key, passes before that, so VICTORY_WAVE_FOLDED_LANES is keyed. With VICTORY_SCALAR_SPLITS taken out of KEYED by hand ([&str; 46], as #3210 would leave it; not committed), the test gets through every KEYED name, VICTORY_WAVE_FOLDED_LANES included, and stops at the next stale name on main, VICTORY_ORACLE_RUNS in its not-a-translation list (main has no oracle_tests.rs).
    • cargo clippy -p victory-shader --all-targets -- -D warnings and cargo clippy -p victory-gpu --all-targets -- -D warnings: both stop in victory-shader on main's own code (unused imports in emit/lower/analysis.rs:6 and emit/lower.rs:594, while_immutable_condition in emit/lower/analysis.rs:467, too_many_arguments in native.rs:1655). Without -D warnings, victory-gpu gives the same 25 lib and 24 test warnings as main. None of these is on a line this branch touches.
    • The whole victory-shader suite was not run on 80e8527f.
  • Earlier, on cbc69bbf (829188e9 base) plus a two-line mod for the local harness, built with cargo test -j 6 -p victory-shader --lib --no-run, then the test binary:

    • VICTORY_ADAPTER=nvidia|radeon <exe> --nocapture --test-threads=1 emit::folded_tests: 19 passed, 0 failed on each card;
    • VICTORY_WAVE_FOLDED_LANES=1 VICTORY_ADAPTER=nvidia|radeon <exe> --test-threads=1 emit::folded_tests::scalars_written emit::folded_tests::a_loop_left: 0 passed, 2 failed on each card, as meant;
    • <exe> --test-threads=4 structure emit::wave64_tests emit::folded_tests emit::lower fold:: emit::crosslane_tests (RTX 5080): 115 passed, 0 failed, 1 ignored.
  • Not tested: the game, with VICTORY_WAVE_FOLDED=1 or with the default fallback; the card time of folded programs with this change (5c262d7b turned folding off for its card time); the oracle counts on current main (they are on 829188e9; only the cargo runs above are on 7995b81b); Series S; cards other than the RTX 5080 and the gfx1036.

  • In game: pending. An earlier in-game A/B is void: its build reused a stale victory-shader from a shared target dir. It is being redone and the result will be posted here.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related:
    • #2265 (open): the same function, narrower. It widens widens_exec, so a program that restores EXEC from a saved mask takes its EXEC branches wave-wide. With this branch such a program normally takes all its lane-mask branches wave-wide before widens_exec is asked; #2265's test was not run here. The two change adjacent lines in folded() and both append to folded_tests.rs, so they conflict textually.
    • #2261 (open): where folded() sits in emit_strict's order, and a 255-register cap; not what happens inside a folded program. 05d1c564 on main has since changed that order too. Both append to folded_tests.rs.
    • #479 (open; merged into the combine before 829188e9 and reverted, its GPU half back as 1b4b6cd4): its shader half (lower::scalar_splits, VICTORY_SCALAR_SPLITS) takes branches wave-wide for the scalars written in them, the same kind of bug, in the unfolded lowering (widen), not in folded(). That half is not on main. No shared lines with this branch except KEYED.
    • #2853 (open): a folded program reads the joins of its lane masks (read_phis in lower.rs, a loop header's join of the EXEC pair). Another place, also about loops over lane masks in folded programs; not tested together.
    • #3097, #2983 (open): fixes in the fold rewrite itself (fold.rs: EXEC_LO at block leaders, the sign of inline constants in the upper mask half), not the structure. #3097 also appends to folded_tests.rs.
    • #3210, #3061 (open): drop the stale VICTORY_SCALAR_SPLITS from KEYED (main lists it, but the translator no longer reads it since the #479 revert). Whichever lands first decides the length this branch's KEYED needs (see Merging).
    • #3308 (open): adds VICTORY_WIDE_SHADOW_TILES to KEYED on the same line; a textual conflict on the array length only.

AI use

Claude Code (Claude Opus 5.5) found the cause with the oracle programs, wrote the change, the tests and the oracle programs, ran the measurements and wrote this description. No code from other authors.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5556268302 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3440). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-29T23:22:56Z. --- No issue filed: found while checking the wave64 folding (`crate::fold`) against a wave64 card with hand-written programs. ## What it changes **What was wrong.** A folded wave64 program runs one console wave as one host wave, two console lanes per host lane, and keeps the console's scalar code. `folded()` still took its branches on lane masks per lane, unless the program uses LDS or barriers, sets EXEC to every lane again, or has lane conditions too large to follow. Per lane, a host lane whose two console lanes are both outside EXEC leaves the region, where the console wave runs it once for all its lanes: - a scalar written in the region (`v_readlane_b32`, `v_readfirstlane_b32`, any scalar instruction) keeps its old value in that lane after the join, where every console lane reads the new one; - a loop left on the SCC of a mask operation (`v_cmpx`, `s_andn2_b64`, `s_cbranch_scc0`) stops counting rounds in the lanes that left. It is wrong only where both console lanes of a host lane (lanes t and t + 32) are out of EXEC while other lanes are in: alternate lanes, one lane of the upper half, sparse masks, or lanes leaving a loop one by one. An EXEC of all lanes or of one half does not show it. **What this does.** `folded()` first builds the structure with every branch on a lane mask taken wave-wide: the EXEC branches, then every branch the structure names as one on a lane mask (`Structured::wave_any`: VCC, SCC of a mask operation). One host wave is one console wave, so that is the console's control flow. Where `structure_wide` fails for that set, the forms before this change are taken as they were. `VICTORY_WAVE_FOLDED_LANES=1` takes them always. The switch is in the shader cache key (`KEYED`, second commit), so `every_switch_of_the_translator_is_in_the_key` still holds. Programs that are not folded do not change. **With folding off by default (5c262d7b, 05d1c564).** On current main a program is folded first only with `VICTORY_WAVE_FOLDED=1`. By default `folded()` is still reached for programs the exact forms do not take, before deep skips, wave-wide branches and the approximate forms, and once more as a last resort; `VICTORY_WAVE_FOLDED=0` leaves it out. This change applies to every program that reaches `folded()`: by default to those fallback programs, with `=1` to every folded program, with `=0` to none. How many of the title's programs fold by default on current main was not measured here. **Merging.** Rebased onto main 7995b81b. Main's 1b4b6cd4 had already taken `KEYED` from 45 to 46 names (`VICTORY_SCALAR_SPLITS`), so the old second commit's `[&str; 46]` edit was empty there, and the array held 47 names in a 46-element array. The second commit (80e8527f, "Shader cache: KEYED holds 47 names with VICTORY_WAVE_FOLDED_LANES") now makes it `[&str; 47]`; 47 is the count of names in the array on 7995b81b plus this branch. If #3210 or #3061 (which drop the stale `VICTORY_SCALAR_SPLITS`) or #3308 (which adds `VICTORY_WIDE_SHADOW_TILES`) lands first, the length has to be counted again: a one-line conflict. Credit: no code from other pull requests. ## How it was tested - GPU and profile: RTX 5080 and the Ryzen 7 9800X3D's integrated Radeon (gfx1036), Windows 11. Shader tests on the cards, not a run of the game; no Series X/S profile, resolution, DLSS, frame generation or ray tracing involved. - Oracle: 219 hand-written one-wave GFX10 wave64 programs (one 64-thread group, three sets of 151, 15 and 53), run natively in wave64 on the gfx1036 with hw_oracle. The same programs are translated by `emit::emit` for a host of 32-lane waves (every form it tries), run on the RTX 5080 and on the Radeon as a 32-lane host, and all 16 outputs of all 64 lanes are compared. The harness is local (`emit::fw64_local_tests`, not in this branch): `VICTORY_ADAPTER=nvidia|radeon LOCAL_FW64_HOSTWAVE=32 LOCAL_FW64_OUT=<file> VICTORY_WAVE_WHY=1 <test exe> --ignored --exact --nocapture --test-threads=1 emit::fw64_local_tests::<local_fw64_wave_wide|local_fw64x_wave_wide|local_nx_cases>`, with `LOCAL_FW64_FOLD=1` for the forced folds below. - Before (829188e9, where folding was still on by default): 156 exact, 51 differ, 12 refused, the same on both cards. 137 of the 219 are folded (118 + 15 + 4). - After (cbc69bbf): 169 exact, 38 differ, 12 refused, the same on both cards. All 137 folded programs take the new structure; none falls back. 13 programs went from differing to exact: `v_readlane_b32` inside an EXEC branch at lanes 0, 31, 32 and 63 with alternate lanes or lane 40 alone (8), and the loops left on `s_cbranch_scc0` after `s_andn2_b64` (5: all lanes, lower half, upper half, alternate lanes, sparse). None went the other way. The 38 that still differ differ the same way on 829188e9 (`v_writelane_b32` in a branch among them). - Folded by force (the harness calling `folded()` directly; 204 programs, RTX 5080): 155 exact, 34 differ, 15 refused before; 181, 8, 15 after. The 26 that became exact add `v_readfirstlane_b32` in a branch, vote loops, a `vccz`/`vccnz` vote on such a mask and a scalar instruction in a branch read after the join. None went the other way. This run was on the first build of cbc69bbf, before its last amend; the run above was repeated on the final commit with the same counts. - New tests `scalars_written_in_a_branch_on_exec_are_the_waves_after_the_join` and `a_loop_left_on_the_scc_of_a_mask_operation_counts_the_waves_rounds` (seven masks over both halves, lane reads at 0, 32 and 63): pass on both cards. With `VICTORY_WAVE_FOLDED_LANES=1` (the old forms) both fail on both cards (`lane 1, v_readlane in the branch`; `lane 0, rounds`). - For shader changes, the wave sizes tested (32 and/or 64 lanes): console wave64 programs on a host of 32-lane waves (RTX 5080, and the Radeon held to 32), checked against the gfx1036 in wave64. Not on a host of 64-lane waves. - `cargo test` passed for the crates it touches: partly. On 80e8527f (main 7995b81b + the two commits), RTX 5080: - `cargo check -p victory-gpu`: passes (the rebased `KEYED` builds). - `cargo test -p victory-shader --lib -- folded_tests fold::`: 19 passed, 0 failed (454 filtered out), with both new tests. - `cargo test -p victory-gpu --lib -- every_switch_of_the_translator_is_in_the_key`: fails, as it does on main 7995b81b without this branch: `VICTORY_SCALAR_SPLITS is not read by the translator any more` (the stale name #3210 and #3061 drop). The test's first check, that every switch the translator reads is in the key, passes before that, so `VICTORY_WAVE_FOLDED_LANES` is keyed. With `VICTORY_SCALAR_SPLITS` taken out of `KEYED` by hand (`[&str; 46]`, as #3210 would leave it; not committed), the test gets through every `KEYED` name, `VICTORY_WAVE_FOLDED_LANES` included, and stops at the next stale name on main, `VICTORY_ORACLE_RUNS` in its not-a-translation list (main has no `oracle_tests.rs`). - `cargo clippy -p victory-shader --all-targets -- -D warnings` and `cargo clippy -p victory-gpu --all-targets -- -D warnings`: both stop in victory-shader on main's own code (unused imports in `emit/lower/analysis.rs:6` and `emit/lower.rs:594`, `while_immutable_condition` in `emit/lower/analysis.rs:467`, `too_many_arguments` in `native.rs:1655`). Without `-D warnings`, victory-gpu gives the same 25 lib and 24 test warnings as main. None of these is on a line this branch touches. - The whole `victory-shader` suite was not run on 80e8527f. - Earlier, on cbc69bbf (829188e9 base) plus a two-line `mod` for the local harness, built with `cargo test -j 6 -p victory-shader --lib --no-run`, then the test binary: - `VICTORY_ADAPTER=nvidia|radeon <exe> --nocapture --test-threads=1 emit::folded_tests`: 19 passed, 0 failed on each card; - `VICTORY_WAVE_FOLDED_LANES=1 VICTORY_ADAPTER=nvidia|radeon <exe> --test-threads=1 emit::folded_tests::scalars_written emit::folded_tests::a_loop_left`: 0 passed, 2 failed on each card, as meant; - `<exe> --test-threads=4 structure emit::wave64_tests emit::folded_tests emit::lower fold:: emit::crosslane_tests` (RTX 5080): 115 passed, 0 failed, 1 ignored. - Not tested: the game, with `VICTORY_WAVE_FOLDED=1` or with the default fallback; the card time of folded programs with this change (5c262d7b turned folding off for its card time); the oracle counts on current main (they are on 829188e9; only the `cargo` runs above are on 7995b81b); Series S; cards other than the RTX 5080 and the gfx1036. - In game: pending. An earlier in-game A/B is void: its build reused a stale victory-shader from a shared target dir. It is being redone and the result will be posted here. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: - #2265 (open): the same function, narrower. It widens `widens_exec`, so a program that restores EXEC from a saved mask takes its EXEC branches wave-wide. With this branch such a program normally takes all its lane-mask branches wave-wide before `widens_exec` is asked; #2265's test was not run here. The two change adjacent lines in `folded()` and both append to `folded_tests.rs`, so they conflict textually. - #2261 (open): where `folded()` sits in `emit_strict`'s order, and a 255-register cap; not what happens inside a folded program. 05d1c564 on main has since changed that order too. Both append to `folded_tests.rs`. - #479 (open; merged into the combine before 829188e9 and reverted, its GPU half back as 1b4b6cd4): its shader half (`lower::scalar_splits`, `VICTORY_SCALAR_SPLITS`) takes branches wave-wide for the scalars written in them, the same kind of bug, in the unfolded lowering (`widen`), not in `folded()`. That half is not on main. No shared lines with this branch except `KEYED`. - #2853 (open): a folded program reads the joins of its lane masks (`read_phis` in `lower.rs`, a loop header's join of the EXEC pair). Another place, also about loops over lane masks in folded programs; not tested together. - #3097, #2983 (open): fixes in the fold rewrite itself (`fold.rs`: EXEC_LO at block leaders, the sign of inline constants in the upper mask half), not the structure. #3097 also appends to `folded_tests.rs`. - #3210, #3061 (open): drop the stale `VICTORY_SCALAR_SPLITS` from `KEYED` (main lists it, but the translator no longer reads it since the #479 revert). Whichever lands first decides the length this branch's `KEYED` needs (see Merging). - #3308 (open): adds `VICTORY_WIDE_SHADOW_TILES` to `KEYED` on the same line; a textual conflict on the array length only. ## AI use Claude Code (Claude Opus 5.5) found the cause with the oracle programs, wrote the change, the tests and the oracle programs, ran the measurements and wrote this description. No code from other authors. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nick0451 commented 2026-11-30 02:51:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-30T02:51:51Z.


Exact translation check and an in-game look. The build is v2026.11.29.05 (41adb551) with this PR merged onto it (head 80e8527f).

Translation (victory translate --list, VICTORY_HOST_WAVE=32, all of the title's shaders: 26,180 programs, 25,789 with emitted DXIL):

  • 37 programs change output, and none fails to translate. The summary counts are unchanged.
  • The changed programs:
    • cascadeshadows_rendering:CS_ShadowRenderTiled*: the Cascades and Misc variants (CB, Alpha, Hair, HairAlpha, PPPC); most of the 37.
    • tiled_lighting:CS_ClusterLightsWorldSpace and ...IntensityBased.
    • indirect_diffuse_lighting:CS_DeferredFallback_{BVH,Voxels,Fallback} and CS_ResolveVBuffer_Voxels.
    • sr_tracing:CS_ResolveVolumetrics and CS_DeferredFallbacksAlpha_SkyProbe.
    • scattering_transmittance_system:CS_Gather, CS_Gather_Reference and CS_GatherDensityAreaForReadBack.
    • firevbuffer*:CS_EntityFire* (4 programs).
    • vfx_proj_decal_vbuffer:CS_ProjDecalResolve_Vectorized.
    • ptx_prerender:ptfx_CS_PreRender{Sprite,Trail}.

In game. RTX 3090, Series S, frame generation and RT off. Frozen saves of the balcony (noon) and a city street. 2 starts per build per save, alternating, screenshots 45 s and 90 s into the world:

  • All 8 starts reached the world, with no crash and no new warnings.
  • Shadows, lighting and particles look the same. Screenshots between builds differ no more than screenshots between two starts of the same build (balcony: mean grey-level difference 3.8–7.1 between builds against 4.0–7.0 within a build; the city differs more in both because of traffic).
  • So nothing visibly changes or breaks in these scenes, which fits the change being a correctness fix for lane-mask branches that these frames don't happen to show.
  • No frame-rate claim: these runs weren't set up for it.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7267382423 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3440#issuecomment-7267382423). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-30T02:51:51Z. --- Exact translation check and an in-game look. The build is v2026.11.29.05 (`41adb551`) with this PR merged onto it (head `80e8527f`). **Translation** (`victory translate --list`, `VICTORY_HOST_WAVE=32`, all of the title's shaders: 26,180 programs, 25,789 with emitted DXIL): - **37 programs change output, and none fails to translate.** The summary counts are unchanged. - The changed programs: - `cascadeshadows_rendering:CS_ShadowRenderTiled*`: the Cascades and Misc variants (CB, Alpha, Hair, HairAlpha, PPPC); most of the 37. - `tiled_lighting:CS_ClusterLightsWorldSpace` and `...IntensityBased`. - `indirect_diffuse_lighting:CS_DeferredFallback_{BVH,Voxels,Fallback}` and `CS_ResolveVBuffer_Voxels`. - `sr_tracing:CS_ResolveVolumetrics` and `CS_DeferredFallbacksAlpha_SkyProbe`. - `scattering_transmittance_system:CS_Gather`, `CS_Gather_Reference` and `CS_GatherDensityAreaForReadBack`. - `firevbuffer*:CS_EntityFire*` (4 programs). - `vfx_proj_decal_vbuffer:CS_ProjDecalResolve_Vectorized`. - `ptx_prerender:ptfx_CS_PreRender{Sprite,Trail}`. **In game.** RTX 3090, Series S, frame generation and RT off. Frozen saves of the balcony (noon) and a city street. 2 starts per build per save, alternating, screenshots 45 s and 90 s into the world: - All 8 starts reached the world, with no crash and no new warnings. - Shadows, lighting and particles look the same. Screenshots between builds differ no more than screenshots between two starts of the same build (balcony: mean grey-level difference 3.8–7.1 between builds against 4.0–7.0 within a build; the city differs more in both because of traffic). - So nothing visibly changes or breaks in these scenes, which fits the change being a correctness fix for lane-mask branches that these frames don't happen to show. - No frame-rate claim: these runs weren't set up for it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dyshay commented 2026-11-30 03:12:07 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-30T03:12:07Z.


Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with --profile diag --features diagnostics. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7267677480 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3440#issuecomment-7267677480). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-30T03:12:07Z. --- Merged into our fork's integration branch for testing ([dyshay/VIctory-NVIDIA](https://github.com/dyshay/VIctory-NVIDIA/tree/janus-prs), branch `janus-prs`). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with `--profile diag --features diagnostics`. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.
Lyrnc commented 2026-11-30 18:59:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Lyrnc on 2026-11-30T18:59:08Z.


@nick0451, thanks for the full translation check and the side-by-side starts. 37 programs changing and none failing is the expected picture. Only folded programs that branch on a lane mask take another form: the tiled shadow and light-cluster kernels, the deferred fallbacks, the gathers and the particle pre-render. The same scenes looking the same also fits. These are correctness cases the balcony and street frames don't happen to show.

The branch is rebased onto main 84bd61e2 (v2026.11.30.02) and force-pushed (now e3169a07). #3210 has landed, so main no longer lists VICTORY_SCALAR_SPLITS in KEYED, and the array there has 47 names. With VICTORY_WAVE_FOLDED_LANES it has 48. The old second commit ("47 names") came out empty and was replaced by "Shader cache: KEYED holds 48 names with VICTORY_WAVE_FOLDED_LANES". The description's note about #3210 and #3061 is settled. #3308 would still change the length by one. The other conflict was only in folded_tests.rs, where main and this branch both add tests at the end; both sets are kept.

Checks on e3169a07 (Windows 11, rustc 1.98.1, its own target dir):

  • cargo check -p victory-shader -p victory-gpu passes.
  • cargo test -p victory-shader --lib -- folded_tests: 22 passed, both new tests among them.
  • cargo test -p victory-gpu --lib -- shader_cache: 11 passed, 1 failed. every_switch_of_the_translator_is_in_the_key stops at "VICTORY_ORACLE_RUNS is not read by the translator any more", a stale name in main's not-a-translation list, and it fails the same way on main 84bd61e2 without this branch. Before that point, the test's first check (every switch the translator reads is listed) passes, and so does every KEYED name, VICTORY_WAVE_FOLDED_LANES included.

@dyshay, the head changed, so janus-prs needs the new one.

AI use: Claude Code (Claude Opus 5.5) did the rebase, ran the tests and wrote this reply.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7288665579 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3440#issuecomment-7288665579). Originally posted by [Lyrnc](https://github.com/Lyrnc) on 2026-11-30T18:59:08Z. --- @nick0451, thanks for the full translation check and the side-by-side starts. 37 programs changing and none failing is the expected picture. Only folded programs that branch on a lane mask take another form: the tiled shadow and light-cluster kernels, the deferred fallbacks, the gathers and the particle pre-render. The same scenes looking the same also fits. These are correctness cases the balcony and street frames don't happen to show. The branch is rebased onto main 84bd61e2 (v2026.11.30.02) and force-pushed (now e3169a07). #3210 has landed, so main no longer lists `VICTORY_SCALAR_SPLITS` in `KEYED`, and the array there has 47 names. With `VICTORY_WAVE_FOLDED_LANES` it has 48. The old second commit ("47 names") came out empty and was replaced by "Shader cache: KEYED holds 48 names with VICTORY_WAVE_FOLDED_LANES". The description's note about #3210 and #3061 is settled. #3308 would still change the length by one. The other conflict was only in `folded_tests.rs`, where main and this branch both add tests at the end; both sets are kept. Checks on e3169a07 (Windows 11, rustc 1.98.1, its own target dir): - `cargo check -p victory-shader -p victory-gpu` passes. - `cargo test -p victory-shader --lib -- folded_tests`: 22 passed, both new tests among them. - `cargo test -p victory-gpu --lib -- shader_cache`: 11 passed, 1 failed. `every_switch_of_the_translator_is_in_the_key` stops at "VICTORY_ORACLE_RUNS is not read by the translator any more", a stale name in main's not-a-translation list, and it fails the same way on main 84bd61e2 without this branch. Before that point, the test's first check (every switch the translator reads is listed) passes, and so does every `KEYED` name, `VICTORY_WAVE_FOLDED_LANES` included. @dyshay, the head changed, so janus-prs needs the new one. AI use: Claude Code (Claude Opus 5.5) did the rebase, ran the tests and wrote this reply.
trustno1-coder commented 2026-12-01 18:52:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:52:14Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321710665 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3440#issuecomment-7321710665). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:52:14Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!3440
No description provided.