Skip to content

Shaders: the tiled cascade shadow programs translate exactly on 32-lane hosts - #1002

Open
brunofgmag wants to merge 1 commit into
fxceless:mainfrom
brunofgmag:fx-shadow-exact
Open

brunofgmag wants to merge 1 commit into
fxceless:mainfrom
brunofgmag:fx-shadow-exact

Conversation

@brunofgmag

Copy link
Copy Markdown

On a host with 32-lane waves (an RTX 4080 here), CS_ShadowRenderTiledCascadesAlphaCBPPPC (f133e35efed2a48a) was refused every frame with "a lane mask exchanged where not every lane runs" at 0x1eb4, so alpha-tested geometry cast no cascade shadows. Three programs of the same family (CS_ShadowRenderTiledCascadesCBPPPC 20b78ee12ecdb57d, CS_ShadowRenderTiledCascadesPPPC ce79e9eba7ae0348 and CS_ShadowRenderTiledMiscAlphaPPPC fa0bd10a35bfef3c) only translated through the approximate local-waves form. In game that drew the sun's light along characters' silhouettes in steps of about 16 pixels.

The ballot they need sits under per-lane regions that the retry forms could not remove. There were three reasons, and this PR fixes each one in ir.rs:

  • without_early_outs and without_skips now also take an s_cbranch_execnz over a far-jump trampoline (s_getpc_b64, s_add_u32, s_addc_u32, s_setpc_b64) to an end block. These programs are too long for a short branch to reach s_endpgm. A trampoline that does any work is still kept.
  • In the deep form of without_skips, a scalar phi whose arguments all resolve to one value counts as a copy of that value. The arguments are followed through copies and through other such phis. A phi that merges a real change is still a change.
  • unspill also pairs two lanes per save and restore site, not only per lane. The pairing is checked with reaching definitions, so a 64-bit exec saved into two VGPR lanes comes back as one mask even when one of those lanes holds another scalar elsewhere.

With the three fixes the ballot reaches the existing exact exchange_halves.

Measured with translate --list and VICTORY_HOST_WAVE=32 over 3,093 programs from one session:

  • 3,092 translated before this change and 3,093 after. No program that translated before is refused now.
  • 3,088 programs produce byte-identical DXIL.
  • The four above changed: f133 is new, and the other three moved from the approximate form to the exact one, with 47 to 153 group barriers each.

In game the steps along silhouettes are gone and frame time did not get worse (168 to 195 ms a frame in three runs, against about 200 to 240 before). No run lost the device.

The new tests in wave64_tests.rs are hand-written GFX10 words. One of them runs on the device and checks a gate where exactly one failing lane is in the upper half, which a per-half answer gets wrong. The victory-shader tests pass except stub_pipeline_is_created, which fails without dxil.dll on this machine as it does on main. Clippy for the workspace still stops at the four warnings that #982 fixes.

Copy link
Copy Markdown

Reproduced the f133e35efed2a48a failure on an RTX 3080 under Windows with the Series S profile. On a d44e4ae-based build, victory warm failed to translate it at GFX10 0x1eb4 with a lane mask exchanged where not every lane runs. An earlier gameplay trace also logged this exact shader as requested and unavailable at the first world frame. This is the pre-patch result. The PR still needs a run on this RTX 3080 to check the visual effect.

@tippythetaidum

Copy link
Copy Markdown

Tested in the title on an RTX 5080 16 GB (32-lane waves), driver 621.14, Windows 11, Series X profile: the stepped sunlight along the character's edge is gone.

Build: diagnostics build of main 3973179 + #24 + #927 + #823 + #606 + #956 + this PR + #907. Default settings apart from #956's two switches and a local diagnostic of mine, which touch texture uploads, not shadows.

Translation: f133e35efed2a48a now translates and is bound from the first world frame. On the same base without this PR it was shader does not translate ... a lane mask exchanged where not every lane runs, every run. 20b78ee12ecdb57d, ce79e9eba7ae0348 and fa0bd10a35bfef3c translate and are bound too. No shader failed to translate in the run.

Picture: the opening cell shot, the character from behind against the sunlit window, compared across three runs.

Stability: no errors and no device loss in the 10-minute run.

One run with the PR, one card.

AI-assisted (Claude Code, Claude Opus 5.5). Counts and descriptions only, nothing from the game attached.

oz-stanislav-zhukov added a commit to oz-stanislav-zhukov/victory-fork that referenced this pull request Nov 25, 2026
…mits on fork-fast)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Danigamer05

Copy link
Copy Markdown

Confirmed on Turing: RTX 2080 SUPER 8 GB (32-lane waves, driver 621.01), Ryzen 7 3700X, Windows 11, Series S profile.

Tree: vitutu1/victory-perf ffed22d + #683, #610, #823 and this PR (cherry-picked cleanly), diagnostics build.

  • Offline (victory translate --list, VICTORY_HOST_MAX_WAVE=32, the whole package): before, f133e35efed2a48a failed with "a lane mask exchanged where not every lane runs" at 0x1eb4. After: it translates, and 3 more compute programs and 1 pixel program that failed before translate too (2,723 → 2,726 of 2,734 compute, 14,211 → 14,212 of 14,259 vertex/pixel; I compared the counts and failure classes, not each program).
  • In game: before, the log dropped f133e35efed2a48a every frame. After, it is no longer in the dropped list (only 02384a60fda6f2d0 and 2da4beb386509b77 remain). Lucia's hair and shirt are lit in every captured frame from the prison-window shot onwards; in the run just before without this PR (same switches) she turned into a dark silhouette once the cell part started. Single runs each, and this kind of darkness varies from run to run, so take it as one data point. Frame time unchanged (3.6-3.9 fps both ways).
  • A related test: skipping all 18 CS_ShadowRenderTiled* programs instead (VICTORY_SKIP_PIPELINES) made people in the yard pure black silhouettes. So an unwritten shadow-map region reads as full shadow here, which fits the dark characters seen while only f133e35efed2a48a was dropped.

Numbers and text only. AI-assisted (Claude Code).

@HAL9000RELOADED

Copy link
Copy Markdown

RX 7900 XTX (RDNA3), Windows 10 + #402, main d510ee4: all 6 new tests pass. The hardware part of a_far_early_out_is_left_out_and_the_gate_counts_the_lanes_of_both_halves ran on the card ("ran on the hardware device…") and matched. With the tests alone on main, 3 of 6 fail: the two far early-out/skip ones and the parked pair one. Run table: #129 (#129 (comment)).

@Zayfway

Zayfway commented Nov 25, 2026

Copy link
Copy Markdown

Tested on a 32-lane card: on its own on main, and merged with #994 (which carries #993 and #854). AI-assisted (Claude Code); every number below is from runs on this machine.

Machine: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, 16 GB RAM with a 32 GB pagefile, Windows 11 26300, Series X profile, diag build. Every run loads the same save at the prison window and is measured from world +120 s to +360 s. Switches: ASYNC_SUBMIT QUEUE2 TEXTURE_NO_WAIT COPY_PLAIN LEVELS_ON_DEMAND INDIRECT_GATHER.

tree frame (median) the sun's light along Lucia's silhouette
main 465b94f 264–274 ms (3.6–3.7 fps) steps of about 16 px along the shoulder, and blocky patches at the bottom of the screen
main + this PR 272 ms (3.6 fps) f133e35efed2a48a now translates and binds (on main it was dropped every frame), but the steps are still there: on the wall behind her, and on a door
main + this PR + #994 338 ms (2.9 fps; GPU 150–167 → 210 ms) no steps on the silhouette: the shoulder edge is smooth, with a soft rim of light. The window's dirty-glass and haze effect, missing on main, is drawn

So on this card, this PR is needed but not sufficient. The steps go away only together with #854/#993's exact 64-lane forms. In that tree the four programs the driver used to refuse with E_INVALIDARG (2cc4c197ee29e291, 369cbe906ea72764, 02384a60fda6f2d0, 2da4beb386509b77) build, and the offline census with VICTORY_HOST_WAVE=32 emits 26,135 of 26,136 programs. The one left is CS_TraceShadowRays_FullAdaptive, which these scenes do not use. Lanes on opaque masks go from 28,029 (main + this PR) to 5,459.

Merge. The merged tree is at Zayfway/victory-fork@integ/rtx3060 (7538ceb), with main + this PR + #994 + #1027. It had three conflicts:

One test of #993 needed a new expectation. a_mask_parked_in_lanes_another_scalar_shares_comes_back_whole_with_shared_slots expected the parked pair to come back as two scalars without the shared slots. With this PR's site_pairs it comes back as one mask in both cases. cargo test -p victory-shader --lib: 275 passed, 2 ignored.

Not tested:

nullexxx pushed a commit to nullexxx/victory-fork that referenced this pull request Nov 25, 2026
…less#1033)

ir::build fills every instruction's register lists twice. `effects()`
collects `Vec<Reg>` (two allocations), and the caller immediately maps
each one into `Vec<(Reg, Value)>` (two more), freeing the first pair. For
lists that are almost always two to four entries, that is four
allocations and two copies per instruction, on every instruction of every
program.

Have `effects()` and its helpers collect the `(Reg, Value)` pairs
directly, with the placeholder the SSA pass fills in. Two allocations per
instruction instead of four; `Inst` and everything downstream are
unchanged.

Measured with the synthetic bench in fxceless#1002 (no game data), ten
interleaved rounds per arm, nanoseconds per instruction, at 256/1k/4k/16k
instructions:

  ir::build   308 -> 269, 375 -> 324, 407 -> 340, 402 -> 353  (0.835-0.878)
  translation 898 -> 872, 898 -> 825, 951 -> 875, 956 -> 912  (0.919-0.971)

gfx10::decode, structure, lower and the rest are unchanged. The emitted
DXIL is byte-identical at all four sizes.

cargo test --workspace --locked: 342 passed, 0 failed, 7 ignored.
Both clippy configurations clean; cargo xtask policy ok.

Co-authored-by: pes7 <pes7@users.noreply.github.com>
PiloteCode pushed a commit to PiloteCode/victory-fork that referenced this pull request Nov 25, 2026
`Instruction::name()` binary-searches the opcode table, and the pipeline
asks about every instruction eight times per translation: `ir::build`,
`structure`, `resource` (which has the most call sites), `io` and
`lower`. The answer cannot change - the encoding and opcode are decoded
from the words and never rewritten - so resolve it once when the
instruction is built and read the field after that.

Measured with the synthetic bench from fxceless#1002 (no game data), sixteen
interleaved rounds per arm, best of each, nanoseconds per instruction, at
256/1k/4k/16k instructions:

  resource     17 -> 9, 15 -> 7, 24 -> 16, 23 -> 15    (0.47-0.67)
  lower       511 -> 479, 428 -> 411, 440 -> 401, 477 -> 428  (0.90-0.96)
  io           27 -> 23, 26 -> 21, 26 -> 22, 30 -> 22   (0.73-0.85)
  whole       926 -> 881, 920 -> 874, 958 -> 921, 1019 -> 939 (0.92-0.96)

`decode` pays the one search it used to be spared (112 -> 115 at 16k,
inside the run-to-run spread); every stage after it reads a field. The
emitted DXIL is byte-identical at all four sizes.

cargo test --workspace --locked: 342 passed, 0 failed, 7 ignored.
Both clippy configurations clean; cargo xtask policy ok.
Peppacodes pushed a commit to Peppacodes/playablegames-peppa that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
(cherry picked from commit 4fd34fdd6634372b9f9a1ac791cdc86be329c0ad)
r4tedx pushed a commit to r4tedx/VIctory that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

[cool/play-2: picked onto cool_fox f4b48ad + Marvisak#66 + Marvisak#142; wave64_tests.rs conflicted only because both sides add tests at its end: resolved by hand, both kept.]

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
@Garu667

Garu667 commented Nov 26, 2026

Copy link
Copy Markdown

Second NVIDIA data point: RTX 3080 10 GB, merged onto 06702fe with no conflict, boat mission, standing ~3 min, same settings both runs.

  • translate --warm all (32-lane host): 25,635 → 25,639 translated, 254 → 250 that do not.
  • f133e35efed2a48a now translates and its host pipeline is made (was refused every run); 20b78ee12ecdb57d, ce79e9eba7ae0348, fa0bd10a35bfef3c, be6ce5d849d51127, 922e1d0ee1e19a85 all take the exact "without skips, scalars followed" form.
  • World fps 9.1 → 9.0 (one launch each, within noise): no cost here either. No device loss.
  • Side note: 926c46bab3b86bd6 (water _Submerged) now translates too but the driver refuses it (64-lane), as it refuses the other water volumetrics.

ka1qux added a commit to ka1qux/BRVIctory-ka1qux that referenced this pull request Nov 26, 2026
…VICTORY_CASCADE_EXACT=0 goes back)

On a host of 32-lane waves a console wave64 compute program that stops
where not every lane runs is translated again with its early-outs left
out, then its skips (`deep`: also the skips whose scalars come back the
same). Three things kept the tiled cascade shadow programs from those
exact forms and left them on the approximate one (each host wave on its
own, which counts the lanes of its half alone: 136 of 1,024 thread
results wrong in the synthetic gate of the new test):

- A program too long for a branch to reach its end has the early-out as
  `s_cbranch_execnz` over a far jump (`s_getpc_b64`, an add, `s_setpc_b64`)
  to a block that only ends the program. That is an early-out too now;
  the far jump that nothing reaches any more is emptied, so that no code
  of the program before is left in the program after. A jump that does
  any work, or work between its target and the end, stays what it is.
- A scalar phi whose arguments all come to one value (the join of inner
  branches that left it alone) is a copy of that value in `deep`.
- The check that a skipped region cannot revive a lane (a restore of EXEC
  from a mask saved outside the region would) only counted masks saved
  by the region itself. A mask the region copies, or joins from masks it
  saved, is as empty: the check follows them through copies and phis. A
  mask with a path from outside the region still fails it.

Offline, as a 32-lane host: 2 of the 4 cascade programs of the saved set
now take the exact form; the other two still have the wave-wide OR
idiom's `s_or_saveexec_b64 -1` in the region (not changed here). On a
64-lane host nothing changes.

Adapted from avatarmanz/VIctory-7900XTX#82 (sawetco), after
fxceless/victory-fork#1002 (Bruno Magalhaes); the closure of the check is
new. This tree's `without_skips` and `walks_with_empty_exec` differ from
that fork's (a region must keep EXEC empty), so the far form goes through
the same checks as the near one. Its pair-parking tests are not ported
(this tree's `unspill` does not pair by lifetime); the one that applies is.

Co-authored-by: sawetco <44127741+sawetco@users.noreply.github.com>
Co-authored-by: Bruno Magalhaes <19572425+brunofgmag@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Victorywillbeours222

Victorywillbeours222 commented Nov 26, 2026 •

Copy link
Copy Markdown

Tested on an RTX 5080 16 GB (32-lane waves), Ryzen 7 5800X, 32 GB RAM, Windows 11. Diagnostics build of main ceb9e1f + #917 + #188 + this PR, Series S profile, 10 minutes hands-off (scripted Enter only). Shader cache warmed with VICTORY_HOST_WAVE=32.

  • Warm-up: 25,639 programs translated and 250 refused, against 25,635 and 254 without this PR.
  • f133e35efed2a48a: translates, gets a host pipeline and is bound from the first world frame. In the run before, without this PR, it was refused every frame ("a lane mask exchanged where not every lane runs").
  • Stability: 0 errors, no device loss.
  • Frame rate: world median 7.8 fps, against 7.5 in the run before. That run kept the cascade programs out of the deep-skips form instead (a per-program workaround), so no cost shows.
  • Picture: no steps along silhouettes in the captured frames. In an earlier played run with neither this PR nor the workaround, light fell on the cell wall in coarse steps and hair looked stringy.

That's one machine and one run per side, so take it as a data point.

AI-assisted (Claude Code). Counts and observations only, no game data.

@Swagi-REDACTED

Copy link
Copy Markdown

Additional RTX 3060 validation for A newer retail game:

Commands: victory translate <private four-program sample directory> --validate --list --jobs 1, then the same command with --pipelines. This is validation and pipeline creation only; no shader dispatch, visual improvement, gameplay completion, or cold-cache timing claim. A combined visual run is in progress. No sample data is attached.

Combined workspace: cargo test --locked --workspace -- --test-threads=4 --nocapture: 632 passed, 0 failed, 13 ignored. Eight explicit adapter/compiler skip messages were reported; those paths are not counted as coverage. Diagnostics application build and asset policy passed. Combining #1112 with current main exceeded the per-file source limit; the sampler-choice routine was moved unchanged into a child module to pass policy.

AI use: Codex, GPT-6 (exact serving variant not exposed), performed integration and the local tests above. Original PR authors retained. These measurements are from this machine.

@Garu667

Garu667 commented Nov 26, 2026

Copy link
Copy Markdown

Visual confirmation in the prologue cell (RTX 3080, 58de9bf vs 58de9bf + this PR, same save, standing at the window ~1.5 min each): without the PR the sun's light along the character's shoulder and hair comes out in ~16 px steps; with it the edge is smooth and the shoulder and neck are lit as they should be. 7.7 vs 7.6 fps, no device loss.

oz-stanislav-zhukov added a commit to oz-stanislav-zhukov/victory-fork that referenced this pull request Nov 26, 2026
… + avm fxceless#109 to fork-nv)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oz-stanislav-zhukov pushed a commit to oz-stanislav-zhukov/victory-fork that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless@eaeb8f1

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
(cherry picked from commit 4fd34fd)
fxceless added a commit that referenced this pull request Nov 26, 2026
…e), 4 KiB dirty tracking, gather segments, the black-face texture fixes, shadow and translator fixes from pull requests

Measured in in-run on/off splits on an RTX 4070 (diagnostics builds, the
same switches for every run):
- VICTORY_CARD_HASH_WIDE=1|alt: the card's hashes of copies' pieces by a group
  of 64 threads a piece, alternating per submission: card -10 ms a frame
  (86.5 vs 96.5), world frames -5 ms.
- VICTORY_GATHER_SEGMENTS=1|alt (after flipflop877 c69bff1): one clamp pass
  per segment once a list stops gathering: ~30 records a pass, neutral to
  slightly faster at equal draws.
- VICTORY_DIRTY_4K=1|alt: refreshes copy only the written 4 KiB pages of a
  stale write-watched page: -45 % of those bytes; faster in loading, no world
  gain.
Fixes:
- Textures under a DirectStorage write or a landed plain read are made due
  again (VICTORY_PAGE_WRITES default 1|2|8): textures uploaded before their
  data landed kept zeros (black faces); VICTORY_HEAP_RECHECK_EVERY=<frames>
  keeps looking at uploaded textures after the schedule (after RyanCase94).
- Pull requests #646 (builder dispatches count threads), #1002 (alpha-tested
  geometry casts cascade shadows), #1314, #1324, #589, #702, #1112 (mesh
  triangle corners masked 9 bits, cube-map levels, two-sampler branches,
  split 64-lane masks); upstream #3198 (textures without card room retried).
- VICTORY_WAVE_WIDE_ONLY=<hashes>: listed refused programs may take the
  wave-wide form (after #823's a416e39; the water's colour, with dark patches
  still under investigation).
- VICTORY_MERGE_RUNS_ALT, VICTORY_CLAMP_LEAN, VICTORY_CLAMP_WINDOW,
  VICTORY_OCCLUSION: measured, no gain; off.
The shader translator changed: delete both shader caches before the first run.
edsuuu pushed a commit to edsuuu/VI-BR-PORT that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
(cherry picked from commit 4fd34fdd6634372b9f9a1ac791cdc86be329c0ad)
burber added a commit to burber/victory-fork that referenced this pull request Nov 26, 2026
- VICTORY_PAGE_WRITES default 1|2|8 (after fxceless/victory-fork e4245f3): placed
  textures uploaded before a read into their pages landed are made due again
  (the black faces of the opening cutscene); 'guards' is the old default.
- From fxceless/victory-fork PR fxceless#1002 (GPL-3.0-or-later): without_early_outs and
  without_skips take an s_cbranch_execnz over a far-jump trampoline to the end,
  and a scalar phi of one value counts as a copy of it. The four tiled cascade
  shadow programs (f133e35efed2a48a, 20b78ee12ecdb57d, ce79e9eba7ae0348,
  fa0bd10a35bfef3c) translate in the exact 'without skips, scalars followed'
  form where they took the approximate local waves (light along silhouettes
  in 16-pixel steps). Our own spill-lane pairing is kept. Offline: 4 of 2,123
  translations change, none lost; 281 shader tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
… measuring

Staged the same evening, compiled and passing the tests, none measured:
the original's fxceless#1002 (exact cascade shadows on 32 lanes), fxceless#1324 and
fxceless#1333 (descriptor heaps), three more ray-only skips with a count of such
programs, fxceless#1341 (VICTORY_ALT_FLIP) and VICTORY_RAM_TRIM.

Why nothing of it has a figure: the process holds about 16.5 GB private
in the first room (the layer's own account of one session), the lab's
runner waits for 20 GiB free, and six readings between 18:47 and 19:11
local time gave 16.1 to 18.0 GiB free. The switches that make the layer
hold less (VICTORY_WINDOW_KB, VICTORY_WINDOW_TAILS, VICTORY_INPLACE,
all in main and off) go first.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
K4ii1 pushed a commit to K4ii1/victory-fork that referenced this pull request Nov 26, 2026
Apply fork PR fxceless#1002 (eaeb8f1), whose IR hunks match upstream e4245f3. Retain guarded far exits, unchanged scalar phis and reaching-definition spill-pair recovery with the original regression tests.
brothernog added a commit to brothernog/rota that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

Ported from edsuuu/VI-BR-PORT a06da66 (by edsuuu).
HAL9000RELOADED added a commit to HAL9000RELOADED/victory-fork that referenced this pull request Nov 26, 2026
KingDariusStim pushed a commit to KingDariusStim/victory-rtx that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
(cherry picked from commit 4fd34fdd6634372b9f9a1ac791cdc86be329c0ad)
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
…CT, on by default

The three changes of the previous commit (pairs of parked lanes by site, an
`s_cbranch_execnz` over a far jump to the end taken as an early-out, a scalar
phi of one value taken as a copy in the deep form of `without_skips`) change
the translation of the tiled cascade shadow programs on 32-lane hosts. They
stay on; `VICTORY_SHADER_CASCADE_EXACT=0` turns all three off, which gives
back the translation from before exactly, so the shadows can be compared with
one build. The name is a `VICTORY_*` string in this crate, so `build.rs` lists
it and its value joins the shader cache key.

Our shared-slots test expects the pair by site only with the switch on. The
PR's tests in wave64_tests.rs expect the forms on and fail with it off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
… part 2)

9613092 alone does not build (its second deep-skips form call lacks the
label 93db653 adds), so the fifth merge goes on to e4245f3, the commit
it was meant to bring; nothing after it (fxceless#1320, fxceless#1321, fxceless#1353, fxceless#1336,
fxceless#1324 of 13:05 are left for later).

- 93db653: build fix for 9613092 (VICTORY_WAVE_WHY form label).
- e4245f3: VICTORY_CARD_HASH_WIDE=alt (1 was already there; default
  still a thread a piece), VICTORY_GATHER_SEGMENTS and
  VICTORY_GATHER_DISPATCHES (off), VICTORY_DIRTY_4K (off),
  VICTORY_MERGE_RUNS_ALT (unset), VICTORY_HEAP_RECHECK_EVERY (0),
  VICTORY_WAVE_WIDE_ONLY (empty); VICTORY_PAGE_WRITES default now
  guards+slots+plain reads' textures (1|2|8; "guards" is the old one);
  host callbacks check due textures first; textures without card room
  asked again (upstream VIctory #3198); a released view heap forgets its
  title-memory run (fxceless#589); shader fixes: mesh corners masked 9 bits,
  two immediate samplers behind a uniform branch, sampleLevel log2 and
  _cl clamp, split wave64 mask moves (fxceless#1112, fxceless#702).

Conflicts, our structure kept: HostList hunks moved to host/host_list.rs;
image hunks to emit/image_buffer.rs; copy_stale takes both COLD_SKIP
marks and DIRTY_4K pieces; Journal keeps cold_skip::Written plus the 4K
map; translate_listed wraps translate_counted; MERGE_RUNS_ALT before our
card_steps split. Duplicates kept once (ours): fxceless#1324 (HEAP_IDENTITY),
fxceless#1002 (SHADER_CASCADE_EXACT), and fxceless#646: upstream's DispatchX thread
counts (USER_DISPATCH_THREADS, same code 0x106) dropped for our port of
fxceless#1292 (USER_THREAD_LIMIT, which also covers the paired 64-lane form).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KomanderDG88 added a commit to KomanderDG88/VIniVIdiVIci that referenced this pull request Nov 26, 2026
…ure fixes), cascade shadows, render-target snapshots, and switches for rays, memory and input

Twenty-two commits, tested as fe2ede8 (cargo check of the workspace with
diagnostics clean; victory-gpu --lib 356 passed, 0 failed) and built by
Codex as fe2ede8-diagnostics.

On by default, each with a way back:
- the original's fifth merge up to e4245f3 with 93db653: VICTORY_PAGE_WRITES
  now also sends back to pending the textures written by slots and by
  plain reads (1|2|8; =guards is the default of before), textures without
  room on the card are asked for again (VIctory #3198), a released view
  heap forgets its run of title memory (fxceless#589), shader fixes (fxceless#1112, fxceless#702,
  mesh corners, samplers behind a uniform branch, sampleLevel);
- fxceless#1002: exact cascade shadows on cards of 32 lanes
  (VICTORY_SHADER_CASCADE_EXACT=0 goes back);
- fxceless#1371: render targets replayed from a copy taken at SetRenderTargets
  (VICTORY_RT_SNAPSHOT=0 goes back).

Off by default: VICTORY_RT_SKIN_SKIP, VICTORY_RT_RESOLVE_SKIP,
VICTORY_ACTIVATE_RAYS_SKIP, VICTORY_HAIR_VB_SKIP (with a census of such
programs), VICTORY_ALT_FLIP (fxceless#1341), VICTORY_RAM_TRIM, VICTORY_WINDOW_REUSE
(fxceless#1362), VICTORY_COLD_SKIP (fxceless#1358), the worker chain of fxceless#1290,
VICTORY_KEYS_FILE, VICTORY_NULL_SAMPLES, and the merge's CARD_HASH_WIDE=alt,
GATHER_SEGMENTS, GATHER_DISPATCHES, DIRTY_4K, MERGE_RUNS_ALT,
HEAP_RECHECK_EVERY and WAVE_WIDE_ONLY. The profiler test walks only modules
that never unload.

Left out: diagnostics/translate-water-5dc3-6f22-2026-11-26.txt, a
translation diagnostic of the original's run that lists offsets and
instructions of two of the title's shaders.

Measured by Codex on fe2ede8, the ten switches of Status, screenshots
every second, one pair of sessions of 480 s, the same binary: in the
opening's cafeteria two faces were drawn with their features with the new
default, and one of them came out without features and the background
washed out with VICTORY_PAGE_WRITES=guards, at different moments and
poses; in the reverse pair a face came out almost all black with the new
default (the guards session was stopped by the memory guard at 391 s), so
these fixes are not the whole answer to black faces. Not measured for
frame rate yet. Neither session crashed; frames of a second
or more between 150 and 450 s: 49 (longest 5.7 s) with guards, 52 (6.8 s)
with the default. A first session with a cold shader cache was ended at
388 s by the title itself after a frame of 21.5 s spent waiting for the
runtime's remapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zsy-miao pushed a commit to zsy-miao/scarlett-commons that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
XFlawless1 pushed a commit to XFlawless1/VIctory that referenced this pull request Nov 26, 2026
Adapt the far early-out and deep scalar-copy parts of fxceless/victory-fork#1002. This tree already tracks parked scalar pairs by lifetime. Retain that implementation and bring across the synthetic regressions, including the hardware gate.

Adapted from fxceless/victory-fork@eaeb8f1

Co-authored-by: Bruno Magalhães <19572425+brunofgmag@users.noreply.github.com>
@oeirughrepuiohg

Copy link
Copy Markdown

Test report (Linux/Proton, RTX 4070 Ti): this PR fixes the stair-stepped shoulder/neck rim in the opening prison-cell scene.

Setup: the PR's commit cherry-picked onto a local branch (fork main ca8829ff plus local changes that are identical in both arms), nothing else changed. Arms interleaved, identical settings: Series S path, 1280x720 internal resolution stretched to 1920x1080, no upscaling or frame generation, RTX 4070 Ti 12 GB, Proton/vkd3d-proton on Linux. Launches that overlapped a host build were excluded. End-of-route frames were scored blind.

PR only, against the same base without it:

Smooth shoulder/neck rim Stair-stepped rim, disconnected light islands
With this PR 4 / 4 0 / 4
Without 0 / 3 3 / 3
  • Mechanism matches the PR: the alpha cascade shadow pixel shader (f133e35e) fails translation without it and translates and binds with it.
  • Positive side effect: the projected head shadow on the left cell wall appeared in 1 of 2 launches with the PR and 0 of 2 without. It is intermittent, but we only saw it with the PR.
  • Cost: none measurable (11.10-11.13 vs 10.88-11.24 fps average on our timed route, two launches each).
  • No new artifact elsewhere in the frame (hair, window grate, walls, posters).

Supporting context, a different build: the PR combined with a separate local change of ours (a reserved texture budget for one material input, not part of this PR). Smooth rim in 6/6 launches vs 0/6 on the base without either change; wall head shadow 2/6 vs 0/6; timing within noise. This shows the shoulder result holds when stacked with other work, but it is not a clean test of the PR alone; the table above is.

A pale-blue block at the collar remains in all arms and is unrelated to this PR.


Measured and written with AI assistance (Claude Code with Claude Opus 5.5 and Claude Mythos 5.2; Codex with gpt-6.2-sol for the build and the blind scoring).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants