Skip to content

NVIDIA (wave32) host fixes: CBV clamp, loose-LDS fallback, scalar ops - #799

Open
Massive-Adrian wants to merge 1 commit into
fxceless:mainfrom
Massive-Adrian:fix/nvidia-wave32
Open

Massive-Adrian wants to merge 1 commit into
fxceless:mainfrom
Massive-Adrian:fix/nvidia-wave32

Conversation

@Massive-Adrian

Copy link
Copy Markdown

Found while running on an RTX 3080 (32-lane waves, no wave64).

  • CBV clamp to 64 KiB. Title constant views larger than D3D12's limit 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 were refused outright by a 32-lane host, which dropped every dispatch. Approximate; last resort.
  • Translator: 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 (as Mesa's tg_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)

a26859f a26859f + this PR
device removed 12 (0x887A0001) 0
draws/frame (median) 13 (never reaches the world) 4170
fps in the world — 2.2–2.3
pipelines refused 8 3

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

…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
oceansde012 pushed a commit to oceansde012/victory-gta6 that referenced this pull request Nov 25, 2026
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
oceansde012 pushed a commit to oceansde012/victory-gta6 that referenced this pull request Nov 25, 2026
@HLVM04

HLVM04 commented Nov 25, 2026

Copy link
Copy Markdown

Tested on an RTX 5070 Ti (wave32 only), NVIDIA 616.64, with this PR merged onto 9376fd6 + #798 + #783. Series S profile, scripted Enter input, about 4.5 minutes into the first gameplay scene. One run per setting.

refused compute pipelines shaders that don't translate median ms a frame device removed
without this PR (9376fd6 + #798) 7 2 169 0
with this PR 2 1 183 0
with this PR, VICTORY_WAVE_LDS_LOOSE=0 7 1 169 0
  • The translator part (scalar ops and the rest) takes one more shader through: 2 → 1 untranslated. It shows no visible side effects here.
  • The loose-LDS fallback builds 5 of the 7 refused pipelines here: 02384a60fda6f2d0, 2cc4c197ee29e291, 2da4beb386509b77, 369cbe906ea72764 and 6b82bc7d22016cb5.
  • With it on, there is a visible regression in the window scene. Everything seen through the window (the fence and the yard behind it) is smeared and wavy, as if an upsampled or temporal result were warped.
  • With VICTORY_WAVE_LDS_LOOSE=0, the same scene is sharp again, and the smear is not present without this PR either.
  • So at least one of those five comes out wrong in its approximate form. On this card it may be better as opt-in, like VICTORY_SCC_LOCAL_ANY, until it is known which one is wrong.
  • I haven't bisected the five yet; I'll follow up if I do.

@HLVM04

HLVM04 commented Nov 25, 2026

Copy link
Copy Markdown

Correction to my comment above: the "smear" is most likely right, not a regression.

I bisected the five pipelines with VICTORY_SKIP_PIPELINES. The effect comes from 2da4beb386509b77 alone; the other four (02384a60fda6f2d0, 2cc4c197ee29e291, 369cbe906ea72764, 6b82bc7d22016cb5) change nothing visible in this scene.

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.

@MamaLeVrai

Copy link
Copy Markdown

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 09b95ca into main 9376fd6 in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins never used, depth_written never read, in victory-gpu); with --all-features it fails with the same number of errors as main (4). This PR adds none and removes none. cargo test --workspace --locked: second run 540 passed, 0 failed, 10 ignored (main alone: 540 passed, 0 failed, 10 ignored). In the first full run one test failed, crash::tests::memory_at_names_what_an_access_hit in victory-loader (crash.rs:716, expected text "reserved, never committed"); the second full run passed (540). It is not in a file this PR changes as far as I can see, and I could not reproduce it: 12 runs of cargo test -p victory-loader --lib on this PR's tree and 15 on main alone all passed. A guess, unchecked: it reads the state of memory at an address while other tests of the full run allocate and free memory. The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

@grosterr

Copy link
Copy Markdown

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 28b74a9 (on 9376fd6), plus this PR's head 09b95ca merged in (no conflict). Shader cache warmed offline with VICTORY_HOST_WAVE=32 VICTORY_VIEW_LIMIT=999999 (and the switch below, since it is part of the cache key). Same save, same prologue room, ~8 minutes in the world per run; VICTORY_LEVELS_ON_DEMAND=1 in both.

run VICTORY_WAVE_LDS_LOOSE frame (median, after the first 4 min) GPU copy-back picture
C1 unset (fallback on) 345 ms 190 ms 201 ms posterized: bands and blotches instead of smooth gradients on walls, floor, table, skin and clothes, worst in dark tones
C1b 0 (fallback off) 297 ms 131 ms 188 ms smooth, the best picture of this scene so far

An earlier run on a26859f (no #770 stack, no #799, same switch and room) also had smooth gradients, with GPU ~105 ms. Both runs were stable: no device loss, no errors. With the fallback off, the host refuses 7 compute programs, as without this PR.

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.

@SantannaCarlos

Copy link
Copy Markdown
Contributor

Tested on an RTX 4070 (32-lane waves): f133e35efed2a48a now translates and runs, and costs nothing measurable. Most of this PR's extra GPU time comes from 369cbe906ea72764 (GpuParticleUpdate:CS_Visibility), about 30 ms of GPU time a frame.

Setup:

  • Windows 11, RTX 4070 12 GB, 32 GB RAM.
  • Diagnostics builds of 9376fd6 + GPU: indirect dispatches past 65,535 groups in x run the rest in a second execution #834, without and with this PR's head 09b95ca (no conflict in the merge).
  • Each tree has its own warmed shader cache.
  • 9- to 10-minute runs from the same cell save, default mode, each run in a fresh process.
  • Frame figures are the median of the last 25 frame lines, after the pipeline library is warm.

Offline (VICTORY_HOST_WAVE=32 victory translate --validate --pipelines, only f133e35efed2a48a):

  • On 9376fd6 it still stops at "a constant lane mask in a half-wave".
  • With this PR, the approximate any-mask form of local waves goes through: validated, pipeline created.
  • That is the "2 → 1 untranslated" in the description. f133e35efed2a48a is cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCBPPPC, the only program the prologue uses that does not translate on main.
  • One thing to look at: 6b82bc7d22016cb5 (vfx_triangleClip:CS_CollectTriangles_Meshlets) translated by this PR fails the DXIL validator with "Total Thread Group Shared Memory storage is 32900, exceeded 32768". In the title the driver still builds it.
  • For comparison, Shaders: wave64 programs in a paired form on 32-lane GPUs, mesh programs over 32 KiB linked with their pixel program, and more (230 more programs pass) #854's paired form translates all six programs this PR brings (f133e35e, 02384a60, 2cc4c197, 2da4beb3, 369cbe90, 6b82bc7d) in the exact form, and all six validate, 6b82bc7d22016cb5 included (same offline check, head 0751197).

In the title:

Tree GPU ms/frame ms/frame Refused
9376fd6 + #834 (3 runs) 90–101 229–242 9 (incl. f133e35e, untranslated)
+ this PR 140 293 4
+ this PR, the five others skipped (VICTORY_SKIP_PIPELINES), f133e35efed2a48a only (3 runs) 85–105 223–251 4
+ this PR without 2da4beb386509b77 142 281 4
+ this PR without 2cc4c197ee29e291 134 272 4
+ this PR without 02384a60fda6f2d0 144 280 4
+ this PR without 369cbe906ea72764 111 263 4
+ this PR without 6b82bc7d22016cb5 144 285 4

Runs of the same tree differ by up to ~15 ms of GPU time (90 to 101 for 9376fd6 + #834; 85 to 105 for f133e35efed2a48a only). Skipping 369cbe906ea72764 is the only single skip that moves the GPU time by more than that: about 30 ms. The other four together account for the rest, up to ~20 ms, which is within reach of the noise. #500 describes 369cbe906ea72764 as a 1x1x1 dispatch next to the structure builder's stages, so 30 ms for it looks like a loop that runs much longer in this form than on the console. That is a guess; I did not time the dispatch itself. It fits grosterr's +45 % on the RTX 3060 above: here most of the extra time is this one program. I did not compare gradients for the banding grosterr reports.

The four still refused are 5dc3b25986622949 and 6f225b641c5b0708 (water_shading:CS_TransmissionVolumetrics_Tiled*), ce3f0432a08f1d35 (PS_WindshieldWiperMask) and the mesh f5e50eb2108c425b. Nothing new is refused.

What changes on screen:

@SantannaCarlos

Copy link
Copy Markdown
Contributor

Correction to my guess above: with #854's exact paired form, 369cbe906ea72764 costs the same here (GPU 145 → 109 ms a frame when it is skipped), so the ~30 ms is that program's own cost on this card, not this PR's approximation. Numbers in #854.

@EgoraWyn

Copy link
Copy Markdown

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 E_INVALIDARG went from six to two. The two that survive here are the same pair already reported above on a 4070, and f133e35efed2a48a translates and runs, as reported there too — so this is a 6 GB confirmation of what the thread already has, not a new count.

What may be new is where the two survivors fail. In our tree they fail in scc_some: with VICTORY_SCC_LOCAL_ANY unset the local-wave retry gives up, the 64-lane form is returned, and the driver rejects it. So the refusal of exactly those two follows from that gate rather than from the loose-LDS path. We have not switched the variable on, so we make no claim about the artifacts the PR body mentions.

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 lds_meetings in a separate module, so one hunk of this PR was re-applied by hand rather than merged.

Written with Claude Code (model claude-opus-5).

akus-elinius pushed a commit to akus-elinius/victory-fork that referenced this pull request Nov 25, 2026
KyleS98 added a commit to KyleS98/VIctory-Neo that referenced this pull request Nov 25, 2026
…_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>
@m335671

m335671 commented Nov 25, 2026

Copy link
Copy Markdown

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: main d510ee4 + #1093 + #1096 + this PR (09b95ca), diagnostics build, from the checkpoint to the first room, then idle. VICTORY_WAVE_LDS_LOOSE=0, with VICTORY_INDIRECT_WINDOW=1 VICTORY_LEVELS_ON_DEMAND=1 VICTORY_JOIN_PARTS=1 VICTORY_BACK_OWN_VIEW=1 VICTORY_COPY_PLAIN=1 VICTORY_INDIRECT_GATHER=1 VICTORY_CARD_REHASH_RUNS=1 VICTORY_TEXTURE_NO_WAIT=1 VICTORY_AMBIENT=0.6. Means once settled.

fps ms/frame on the GPU the window
without this PR 6.51–6.61 151–154 61–63 sharp
this PR, loose fallback on (default; earlier run on 3973179, no ambient, no gather) 5.61 178 93 rippled, frosted
this PR, VICTORY_WAVE_LDS_LOOSE=0 6.28 160 65 sharp
  • With the fallback off, f133e35efed2a48a (CS_ShadowRenderTiledCascadesAlphaCBPPPC) is translated, created and bound in the title, and the shadows on the player's shoulder look better to us. It's the only one of the 25 that doesn't need the fallback, and it's also one that the title uses in this room.
  • The seven programs still refused are the five the loose fallback would take and the two water_shading ones. No device removal.
  • So the frosted glass comes from the fallback (most likely CS_AlphTransmissionPrefilterMip), not from the rest of the PR.

A suggestion, if it helps: the non-fallback part (the translator ops, tg_size, the CBV clamp, and so this shadow program) may be worth taking on its own, with the loose LDS form off by default until someone compares the glass with a 64-lane card.

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.

@Dathinel

Copy link
Copy Markdown
Contributor

Test report from a 4 GB 32-lane card, with this PR merged onto current main.

Machine / tree. RTX 3050 Laptop 4 GB (32-lane waves), Ryzen 7 7435HS, --console series-s. main a183ea2 + #1081 + #798 + #1002 + #592 + #156 + this PR. Diagnostics build, run 253 switch set + VICTORY_TEXTURE_BUDGET_MB=1536. One run of 425 s: menus, opening cutscene, about three minutes in the first gameplay scene (the room with the window).

The merge. It conflicts with main now, in three files. How I resolved them, in case it saves someone time (branch: Dathinel/victory-fork rtx3050-4gb-loose-lds, merge commit 4a11834):

cargo check clean for both crates; the three lds unit tests of victory-shader pass. I did not run the whole test suite.

Compute pipelines refused by the host in the run (debug-layer reason in earlier runs: wave lane count 64 on a 32-lane device):

before (every run of this scene here, 12+ runs) with this PR
refused 02384a60fda6f2d0 2da4beb386509b77 369cbe906ea72764 5dc3b25986622949 6b82bc7d22016cb5 6f225b641c5b0708 5dc3b25986622949 6f225b641c5b0708
host pipeline made — 02384a60fda6f2d0 2da4beb386509b77 369cbe906ea72764 6b82bc7d22016cb5

So 4 of the 6 are built here. That matches the #953 comment from the RTX 5070 Ti (which built those four plus 2cc4c197ee29e291, already made here by other means).

Picture. The window in that room now shows the textured glass that the #953 comment ties to 2da4beb386509b77; before, the user of this machine saw a checkerboard pattern and frame-to-frame changes in what is seen through that window. In a burst of 8 screen captures 200 ms apart (each a new frame at this frame rate), two consecutive captures differ in the character's hair and almost nowhere inside the window. I have no burst from before this PR to put a number against, so the "before" is the user's observation, not a measurement. No screenshots attached, by this repository's rule.

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. VICTORY_WAVE_LDS_LOOSE=0 on the same tree as a control; VICTORY_SCC_LOCAL_ANY=1; whether the other three programs' output is right (only that their pipelines are made); anything outside this one scene; the Series X profile.

AI-assisted (Claude Code); merged, built, run and read on the machine above.

@Dathinel

Copy link
Copy Markdown
Contributor

A control and a caution to add to my report above, same machine and tree (4a11834 + a full-screen switch), two more runs of the same scene.

Control, VICTORY_WAVE_LDS_LOOSE=0 (320 s): the six compute pipelines are refused again, as before the PR. So the four that are built are this PR's loose form and nothing else in the tree.

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 VICTORY_WAVE_LDS_LOOSE=0 the same scene has normal exposure and a clear view through the window. I have not yet found which of the four programs does it (02384a60fda6f2d0, 2da4beb386509b77, 369cbe906ea72764, 6b82bc7d22016cb5); I will bisect with VICTORY_SKIP_PIPELINES and report here. Until then I would not call the loose form safe as a default on this card, even though it removes the refusals.

AI-assisted (Claude Code).

@Dathinel

Copy link
Copy Markdown
Contributor

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 main ad54207 + the same PRs + this one; same machine, full screen, 330 s each, loose form on, with VICTORY_SKIP_PIPELINES:

skipped built of the four exposure in the window scene
02384a60fda6f2d0, 2da4beb386509b77 369cbe906ea72764, 6b82bc7d22016cb5 normal, no wash-out
369cbe906ea72764, 6b82bc7d22016cb5 02384a60fda6f2d0, 2da4beb386509b77 normal, no wash-out

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 main between my runs changed it. I have not yet repeated the run with all four built on this newer tree, nor run one configuration twice to see how much this scene varies from run to run; those are the next two runs. Until then, read my caution as "seen in two runs of one tree with all four built", not as a property of this PR.

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).

@HLVM04

HLVM04 commented Nov 26, 2026 •

Copy link
Copy Markdown

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 (VICTORY_DUMP_TARGETS=1;VICTORY_CAPTURE_FRAMES=3000). Frames are counted by presented()+1, and only targets first used in a listed frame are saved, so list 2-3 consecutive frame numbers to get a whole frame. Even then we needed several runs per side; for example 4 of 6 lit vs 2 of 6 lit for one change was not significant.

With VICTORY_VIEW_GUARD=0 faces go black, so on our card the dark skin is stale memory rather than a shader failure, which would fit it not following any one switch here.

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 VICTORY_SKIP_PIPELINES).

@Dathinel

Copy link
Copy Markdown
Contributor

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 VICTORY_DUMP_TARGETS=1 + VICTORY_CAPTURE_FRAMES and several runs a side before saying anything more about this PR's picture, including the wash-out, which I saw in two runs with all four programs built and in neither half of the bisection. What stands from the 4 GB card is only the count: with the loose form 4 of the 6 refused compute pipelines are made (5dc3b25986622949 and 6f225b641c5b0708 stay refused), and with VICTORY_WAVE_LDS_LOOSE=0 all six are refused again.

AI-assisted (Claude Code).

oceansde012 pushed a commit to oceansde012/cool_fox that referenced this pull request Nov 26, 2026
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
Garu667 added a commit to Garu667/victory-fork that referenced this pull request Nov 26, 2026
…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>
Garu667 added a commit to Garu667/victory-fork that referenced this pull request Nov 26, 2026
…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>
Garu667 added a commit to Garu667/victory-fork that referenced this pull request Nov 26, 2026
…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>
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.

8 participants