Repository navigation
NVIDIA (wave32) host fixes: CBV clamp, loose-LDS fallback, scalar ops - #799
Massive-Adrian wants to merge 1 commit into
Conversation
…t views
- Clamp constant buffer views to 64 KiB (D3D12's limit): larger title
views made invalid views that removed NVIDIA's device (0x887A0001).
- Loose-LDS fallback (VICTORY_WAVE_LDS_LOOSE=0 turns it off): console
wave64 programs that read and write LDS inside one lane-branch region
are no longer refused by a 32-lane host (approximate, last resort).
- Translator: s_pack_{ll,lh,hh}_b32_b16, s_bfm_b32 and the 32-bit literal
of s_mov_b64 as constant sources, the thread-group info SGPR (as Mesa's
tg_size), and f64 wave sums kept per host wave in local mode.
- VICTORY_SCC_LOCAL_ANY=1 (opt-in): SCC of a mask operation taken from the
host wave's own answer in local-any mode.
Tested on an RTX 3080: victory-shader and victory-gpu unit tests pass.
Claude-Session: https://claude.ai/code/session_01HULsNt1E1LEXFjQkDyX27G
Upstream: fxceless#799 (head 09b95ca; kept the base's VICTORY_WAVE_DUMP listing under the new condition) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLuVRkAEvF29hMbrBJw8os
…ss#802-fxceless#806 fxceless#808) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLuVRkAEvF29hMbrBJw8os
|
Tested on an RTX 5070 Ti (wave32 only), NVIDIA 616.64, with this PR merged onto
|
|
Correction to my comment above: the "smear" is most likely right, not a regression. I bisected the five pipelines with A PIX capture of that frame at full resolution shows an even ripple pattern with the wire mesh inside it: textured wired glass in the window. Before this PR the pass was refused on wave32, so the glass was never drawn and the window looked clear. What may still be off is the edge. Where the character's hair overlaps the window, its bright rim is distorted as if it were behind the glass. That could be the approximate LDS ordering, or something unrelated; I can't tell which yet. So on this card the loose-LDS fallback is a net gain here. Sorry for the noise. |
|
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head AI-assisted (Claude Code); no game data. |
|
Test report on an RTX 3060 12 GB (Ampere, 32-lane waves only), NVIDIA driver 621.40 (32.0.16.2140), Ryzen 7 5700X, 32 GB, Windows 11 Pro 26300, Rust 1.98.1, release build. AI-assisted testing (Claude Code); the runs and the observations are mine. Tree: #770's stack at
An earlier run on So on this card the approximate loose-LDS fallback costs about +45 % GPU time and visibly changes the picture. The CBV clamp and the scalar-op parts look fine here. Would it make sense to keep the fallback off by default (or limit it to the programs it is known to be right for) until it is exact? I can rerun with any switch or pipeline skip list if that helps. #854's paired form looks like the exact alternative; I plan to measure it on this card next. |
|
Tested on an RTX 4070 (32-lane waves): Setup:
Offline (
In the title:
Runs of the same tree differ by up to ~15 ms of GPU time (90 to 101 for The four still refused are What changes on screen:
|
|
Test report from an RTX 3060 Laptop 6 GB (Series S profile, title build 1.0.2.1, Windows 11). Applied on our tree. Compute pipelines the driver refused with What may be new is where the two survivors fail. In our tree they fail in Caveats, so the numbers are not read for more than they are: one run, the shader cache was cold, so no frame-rate claim of any kind; and our tree keeps Written with Claude Code (model claude-opus-5). |
…fxceless#799) PR: fxceless#799 Head: 09b95ca Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_LOOSE=<hashes>|1; none by default) The approximate loose-LDS form of fxceless/victory-fork#799, gated to a list of container hashes. Tried on the transmission prefilter alone (2da4beb386509b77, refused by a 32-lane host): it translated for 32 lanes, but eyes glowed white in the opening cutscene and the noisy face stayed, so nothing is named by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A follow-up from the same RTX 4070 (32-lane): with the loose fallback off, this PR still brings up the cascaded-shadow program, and the window glass stays sharp. Tree:
A suggestion, if it helps: the non-fallback part (the translator ops, AI use: the runs were done on my machine. Claude Code (Claude Opus 5.5) built and ran them, compared the outputs and wrote this comment. |
|
Test report from a 4 GB 32-lane card, with this PR merged onto current Machine / tree. RTX 3050 Laptop 4 GB (32-lane waves), Ryzen 7 7435HS, The merge. It conflicts with
Compute pipelines refused by the host in the run (debug-layer reason in earlier runs: wave lane count 64 on a 32-lane device):
So 4 of the 6 are built here. That matches the #953 comment from the RTX 5070 Ti (which built those four plus Picture. The window in that room now shows the textured glass that the #953 comment ties to Frame. Median 169.9 ms over the 34 frame-log lines with more than 2,500 draws (about 4,430 draws); earlier runs of the same scene on nearby trees: 150 to 206 ms. Not a controlled comparison. No device loss. Not tested. AI-assisted (Claude Code); merged, built, run and read on the machine above. |
|
A control and a caution to add to my report above, same machine and tree ( Control, Change between consecutive frames (mean absolute difference between screen captures 200 ms apart, 0 to 255, bursts of 8 in the window scene): about 1.2 to 1.9 with the loose form on (one run, windowed), 2.8 to 5.8 with it off (one run, full screen). The two runs differ in window mode, so take the ratio loosely; the direction agrees with what the user of this machine saw (less flicker in what is seen through the window with the PR). Caution: the picture washes out with the loose form on. In both runs with it on, what is seen through the window is much brighter and paler than with it off, and in the second run the whole world frame went almost white about a minute into the scene (captures at 280 s; the frame log still shows about 4,350 draws a frame, no error line, no device loss). With AI-assisted (Claude Code). |
|
Bisection of the wash-out I reported above: not conclusive yet, and I should say so rather than leave the caution standing as it was. Tree now
So neither half washes the picture out by itself. Either it takes one program from each half, or it does not happen on every run, or the 25 commits of One more thing these runs showed that is not about this PR: whether the player character is lit or a dark silhouette in that scene differed between my runs of today in a way I cannot tie to any switch, which is why I want the run-to-run check before saying more. AI-assisted (Claude Code). |
|
On the lit-vs-dark player character: we see the same run-to-run variance on an RTX 5070 Ti (Series S, our stack with this PR's loose-LDS form on). Over many runs her neck was lit in roughly half of them whatever we changed, so single A/B runs can't settle it. What made our runs comparable: we stopped judging by screenshots and score each run by her neck in the G-buffer albedo dump at a fixed frame ( With Correction (2026-11-26): the 1280x720 target we called "albedo" above (format 28, where skin shows blue) is not the base colour. It looks like a material/skin mask: in one run the neck was blue there while the real base colour, render target 0 (1280x720, format 27, the first of the 6 G-buffer targets), was dark at the neck. So the lit/black tallies above were scored on the wrong target and may be off. RT0 is the one to judge (skin tone at the neck; a large plaster wall is also light grey in good runs and dark in bad ones). The hero's skin is drawn by pixel shader b36c288fccc767b0 (found by skipping shaders with |
|
Thank you, that settles what I could not: the lit-or-dark character here is the same run-to-run variance, not something my runs can attribute to a switch, and I withdraw any reading of them that way. I will score a fixed frame with AI-assisted (Claude Code). |
Port of fxceless/victory-fork#799 (as in victory-gta6 cc970bc) onto this fork: a console wave64 program whose LDS is read and written in one lane-branch region is emitted approximately instead of refused, which dropped every dispatch of it on a 32-lane card (VICTORY_WAVE_LDS_LOOSE=0 turns it off); s_bfm_b32 with literals, s_pack_*_b16, the thread-group info SGPR. The CBV clamp is already here (constant_bytes); a duplicate s_mov_b64 literal arm is left out. Candidate for dark blocks on hair. cargo test -p victory-shader: 203 passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FLuVRmnqMrf4QgSu5WgPyH
…eless#799 by Massive-Adrian, rebased onto 93db653) Console wave64 programs that read and write LDS inside one lane-branch region were refused outright by a 32-lane host. As a last resort they are now ordered between the two host waves only where the region is entered and left (emit/loose_lds.rs; VICTORY_WAVE_LDS_LOOSE=0 turns it off; approximate). Also from fxceless#799: s_pack_{ll,lh,hh}_b32_b16, s_bfm_b32 and the s_mov_b64 32-bit literal as constant sources, the thread-group info SGPR, f64 wave sums per host wave in local mode, VICTORY_SCC_LOCAL_ANY=1 (opt-in). Rebase: fxceless#799's CBV clamp is left out (main has its own, PR fxceless#911); main's wave-wide 'last' form is kept and the loose fallback comes after it; the fallback's helper lives in its own file so lower.rs stays under the asset policy's 512 KiB. Co-authored-by: Massive-Adrian <361010412+Massive-Adrian@users.noreply.github.com> lower.rs was already over the asset policy's 512 KiB on main (528,801 bytes), so the lane analyses (lane_uniform, lane_regions, lds_meetings, lane_constant_masks) move unchanged into a child module, emit/lanes.rs: lower.rs is 519,928 bytes with this change, and `cargo xtask policy` passes again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eless#799 by Massive-Adrian, rebased onto 93db653) Console wave64 programs that read and write LDS inside one lane-branch region were refused outright by a 32-lane host. As a last resort they are now ordered between the two host waves only where the region is entered and left (emit/loose_lds.rs; VICTORY_WAVE_LDS_LOOSE=0 turns it off; approximate). Also from fxceless#799: s_pack_{ll,lh,hh}_b32_b16, s_bfm_b32 and the s_mov_b64 32-bit literal as constant sources, the thread-group info SGPR, f64 wave sums per host wave in local mode, VICTORY_SCC_LOCAL_ANY=1 (opt-in). Rebase: fxceless#799's CBV clamp is left out (main has its own, PR fxceless#911); main's wave-wide 'last' form is kept and the loose fallback comes after it; the fallback's helper lives in its own file so lower.rs stays under the asset policy's 512 KiB. lower.rs was already over the asset policy's 512 KiB on main (528,801 bytes), so the lane analyses (lane_uniform, lane_regions, lds_meetings, lane_constant_masks) move unchanged into a child module, emit/lanes.rs: lower.rs is 519,928 bytes with this change, and `cargo xtask policy` passes again. Co-authored-by: Massive-Adrian <361010412+Massive-Adrian@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eless#799 by Massive-Adrian, rebased onto 93db653) Console wave64 programs that read and write LDS inside one lane-branch region were refused outright by a 32-lane host. As a last resort they are now ordered between the two host waves only where the region is entered and left (emit/loose_lds.rs; VICTORY_WAVE_LDS_LOOSE=0 turns it off; approximate). Also from fxceless#799: s_pack_{ll,lh,hh}_b32_b16, s_bfm_b32 and the s_mov_b64 32-bit literal as constant sources, the thread-group info SGPR, f64 wave sums per host wave in local mode, VICTORY_SCC_LOCAL_ANY=1 (opt-in). Rebase: fxceless#799's CBV clamp is left out (main has its own, PR fxceless#911); main's wave-wide 'last' form is kept and the loose fallback comes after it; the fallback's helper lives in its own file so lower.rs stays under the asset policy's 512 KiB. Co-authored-by: Massive-Adrian <361010412+Massive-Adrian@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found while running on an RTX 3080 (32-lane waves, no wave64).
VICTORY_WAVE_LDS_LOOSE=0turns it off): console wave64 programs that read and write LDS inside one lane-branch region were refused outright by a 32-lane host, which dropped every dispatch. Approximate; last resort.s_pack_{ll,lh,hh}_b32_b16;s_bfm_b32and thes_mov_b6432-bit literal as constant sources; the thread-group info SGPR (as Mesa'stg_size); f64 wave sums kept per host wave in local mode.VICTORY_SCC_LOCAL_ANY=1(opt-in, off by default): lets two more wave64 programs run, but showed artifacts in our runs.Testing (RTX 3080, 8-minute runs, same shader cache warm-up)
Without these fixes a26859f removes the device (a >64 KiB CBV) and never reaches the world. victory-shader and victory-gpu unit tests pass; clippy adds no warnings.
https://claude.ai/code/session_01HULsNt1E1LEXFjQkDyX27G