No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2711
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2711"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@moe-miau on GitHub · 2026-11-25 18:37 UTC · original
moe-miau:port/wave32-halves→main· +610 −18 · 20 files · 8 commits · openStacked on #2176 (n-romanovich) and #2118 (0xkn0wh3r3). Their commits are in this branch (#2176 at
fb99078, #2118 ataf8b9ad), on currentmain(f3578e3). The change to review is the last two commits,d13565eand681076d. I'll rebase once they're merged. If either author would rather take this into their own PR, I'll close this one.Problem
On NVIDIA (32-lane waves only),
mainrefuses every compute pipeline that asks forWaveSize(64): 166 of them on an RTX 4070 SUPER in the first 6 minutes. That includes exposure, lighting and culling passes, so the world that #2464 brings back is heavily overexposed and blocky.#2176 runs a wave64 program as two 32-lane host waves, with each host wave standing for one half. That clears every refusal here. It still leaves 118 programs untranslated, though, because they do three things it refuses on purpose:
a 64-bit wave mask read as data on a 32-lane hosta cross-half operation on a 32-lane hosta cross-half wave scan on a 32-lane hostChange
emit/lower.rs): those three cases now translate, with the meaning #2176 already gives a host wave: its ballot's high dword is 0, andhost_lanekeeps lanes within the half. That is exact for programs whose waves only work within themselves (compaction, reductions, prefix sums followed by one atomic per wave). It is approximate where the console exchanged across the halves. Zettrox/ztrx's default wave-local fallback makes the same trade, and that fork runs the prologue on NVIDIA.pipeline/builder.rs): the BVH builder's programs do exchange across the halves. With them translated this way, the builder hung the GPU within 2 minutes (0x887A0006; the hung submission held14394a32and28918b71). On a host that runs 64-lane programs as halves, the builder now stays held back (opens), and the log says why. That is wheremainleaves it today, because its programs are refused there.wave64_cross_half_readlane_is_refused_on_wave32_hostbecomeswave64_readlane_reads_its_own_half_on_wave32_host. The builder test also covers the new condition.host_wave32()is false there.Tested
RTX 4070 SUPER, driver 32.0.16.1742, Windows 11 26300. Title 1.0.2.1, Series X profile, diag build, scripted Enter presses. The base stack is
main67e8ae1+ #1906 + #2098 + #2626 + #2628 + #2464.A 15-minute run of the same stack had no device removal, 0 refused and 8 untranslated. It got past the opening credits into the prologue's cell (no letterbox, steady 4,900 draws a frame at about 1.2 fps), with green artifacts and banding still to fix.
cargo test -p victory-gpu --locked: 196 passed. The 2 failures are the NVIDIA heap-cap tests that also fail onmainhere (#2628 fixes them).cargo test -p victory-shader --lib: 267 passed, 3 failed (a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,gathers_at_a_level_match_the_hardware), the same asmainwith NVIDIA.heap_direct_texture_reads_mark_their_heap_indexis skipped because it crashes the test process onmainhere too.cargo clippy --workspace --all-targets --locked -- -D warnings, also with--all-features: clean.cargo xtask policy: ok.AI-assisted (Claude Code). Runs done on my machine.
🤖 Generated with Claude Code
@kotekompotek on GitHub · 2026-11-25 18:56 UTC · original
The approximation is honest and the safety rail is the important part. Read through the whole stack:
One structural note for maintainers: this ships an approximation whose wrong cases are cross-half exchanges in programs other than the builder. The description is upfront that these can be wrong-but-running rather than refused - the builder's known-bad user is fenced, but the residual risk is subtle numerical differences in unclassified wave64 programs. Whether that trade beats 166 refused pipelines is a maintainer call; the mechanics here look sound either way.
@moe-miau on GitHub · 2026-11-25 19:02 UTC · original
@DrDarkDK Thanks, you're right. Fixed in
cfcadf6. The ballot check now asks about the same lane thatread_lanereads, throughballot_bit(hi, host_wave), which returns the word and bit ofhi & (host_wave - 1). On a 32-lane host,hi = 33checks bit 1 of word 0, the lane the read takes, so the packed high half survives where that lane ran and takes the identity where it didn't. 64-lane hosts are unchanged (ballot_bit(33, 64) == (1, 1)).On the test:
a_half_scans_ballot_bit_is_the_lane_it_readscovers the lane mapping on both host widths. A full GPU regression would need a hand-built GFX10v_add_f16half-scan sequence with a wave64 header, and the shader tests have no builder for that pattern yet, so I kept the test at the mapping. If you'd rather have the end-to-end version, I'll add it.victory-shader --lib: 268 passed, with the same 3 NVIDIA failures asmain. Clippy is clean in both configurations.@Venom2054 on GitHub · 2026-11-25 19:27 UTC · original
I ran a synthetic counting test twice on an RTX 5070 Ti at
cfcadf6, withhost_wave32enabled. One 256-thread group represents four console waves. In wave w, lanes below 33 + w vote. Each wave leader publishes its count to group-shared memory. All threads cross a group barrier and read the counts.Consuming the ballot under the wave-leader guard gave the same 128 total. All four shaders passed DXIL validation and executed. All 256 returned words matched the CPU expectation for the shared-memory control, and all 256 differed in each ballot case. The BVH setting was unchanged. This gives a concrete case where a classifier that consumes a numerical ballot undercounts work. The packed half-scan change and its effect on an in-game frame were outside this test.
@moe-miau on GitHub · 2026-11-25 19:33 UTC · original
@Venom2054 Thanks, that's a clean measurement of the approximate case. It is what this PR trades for running at all: each 32-lane host wave stands for one half of the console's wave, so a ballot only sees its own half's lanes, and a per-wave count capped at 32 is the expected result. In your test, a wave of 33–36 voting lanes undercounts by the lanes in the other half. When only the lower half's leader publishes, those lanes are lost from the total (138 → 128).
That's the residual risk the description and kotekompotek's note point at: wrong-but-running instead of refused, for programs that combine work across the two halves. The BVH builder is the known case that hangs, and it is held back. Counting classifiers like this one can undercount instead.
Two ways to narrow it, both beyond this PR:
lds_meetingsdirection. It needs a classifier, plus GPU tests like yours as regressions.If maintainers prefer the second, I can make that change here. I'd keep your test case as the reference for the first.
AI-assisted (Claude Code).
@fuzeofficlal on GitHub · 2026-11-25 19:51 UTC · original
Independent Windows 11 + NVIDIA GeForce RTX 5090 (32-lane host) + WARP +
dxil.dllverification and code review ofcfcadf6(clean zero-conflictgit merge-treewith13f91ca):Verification (
rustc 1.98.1MSVC, Windows SDK10.0.26100.0dxil.dll)cargo xtask policy: 185 files ok.cargo clippy --locked -p victory-shader -p victory-gpu -p victory --all-targets -- -D warnings(plus--features hostand--features diagnostics): 0 warnings.victory-shader(RTX 5090 32-lane hardware +dxil.dll):wave64_readlane_reads_its_own_half_on_wave32_host: 1 passed.a_half_scans_ballot_bit_is_the_lane_it_reads: 1 passed.emit::tests(18 passed),emit::lower::tests(28 passed),emit::diff_tests(5 passed),emit::synthetic_tests(6 passed, 1 pre-existing RTX 5090 baseline failure ingathers_at_a_level_match_the_hardware).victory-gpu:VICTORY_D3D12_WARP=1,--features diagnostics): 201 passed, 0 failed, 1 ignored.pipeline::19 passed, 0 failed (includingbuilder_dispatches_wait_for_every_builder_pipeline);shader_cache::3 passed, 0 failed (including updatedthe_key_covers_translator_encoding_and_settings).Review Notes
PSV0WaveSize(32, 32),thread_idmasking onwave_size,host_lanemasking tohost_wave - 1,ballot_bit(hi, host_wave)fix forv_add_f16half-scan,shader_cache::key"host wave32"isolation) and per-framebuilder::runs()gating on bothdispatchandexecute_indirectlook solid.pipeline.rs::create_streampasses&[]ascodetohand_out, so!code.is_empty() && builder::created_by_builder(code)would skip builder detection if a compute pipeline were ever created throughCreatePipelineStaterather thancreate_compute/create_compute_x.builder::runs()checksvictory_shader::emit::host_wave32()(initialized on firstshader_cache::build()) rather thancrate::host::host_wave32()directly; callingcrate::host::host_wave32()makes the initial frame's diagnostic reason consistent before the first shader translates.@tippythetaidum on GitHub · 2026-11-25 20:13 UTC · original
Some data for the residual-risk question, from victory-fork, which runs the same title on 32-lane NVIDIA cards a different way. It names four programs where the cross-half behaviour shows on screen. The program hashes are the title's, so they can be checked against this PR's list of approximated programs.
In victory-fork (fxceless/victory-fork#823), these four compute programs needed an exact cross-half form to run on a 32-lane host, and were refused without it:
5dc3b25986622949water_shading:CS_TransmissionVolumetrics_Tiled6f225b641c5b0708water_shading:CS_TransmissionVolumetrics_Tiled_LocalLights369cbe906ea72764GpuParticleUpdate:CS_Visibility2cc4c197ee29e291sr_tracing:CS_Tiling_Generate_OpaqueThree more needed it across several console waves of a group and stayed refused there:
2da4beb386509b77(alpha transmission prefilter), and02384a60fda6f2d0and6b82bc7d22016cb5(vfx triangle clip).What they did to the picture on an RTX 5080 (600 s runs through the prologue, compared shot by shot with console footage of the same scenes):
2cc4c197ee29e291is the one close-up lighting depends on. With it exact, characters near the camera get their shading and the shadows on their clothes. With it not run (everything else the same), close characters look flat and unlit while distant ones look right. It's a classifier that builds tile lists from wave-wide counts, so it's the kind of program that would undercount, as in @Venom2054's measurement, if it is approximated here.One more data point for the builder: in victory-fork, turning the exact form on for every program at once lost the card (its runs 121-124). That's why the fork allows it per program. It's the same direction as the builder hold here.
AI-assisted (Claude Code, Claude Opus 5.5): runs and log reading on my machine; descriptions and counts only.
@Venom2054 on GitHub · 2026-11-25 20:38 UTC · original
I checked the opaque tiling shader in the fourth row against this PR at
cfcadf62. It does take the approximate half-wave path. I translated the same 8 × 8 × 1 compute program twice with the PR's translator, changing onlyhost_wave32. The emitted DXIL declaresWaveSize=64with the option off andWaveSize=32with it on. Both variants contain 13 staticwaveActiveBallotcall sites.In our earlier RTX 5070 Ti prison-window capture on a separate integration, this program had a host pipeline and a recorded dispatch of 160 × 90 × 1 groups. That identifies a pass we can compare. The synthetic ballot undercount reported above was measured on a different program. The tile-list contents and effect on character lighting for this specific shader are still unmeasured on the 5070 Ti.
@Venom2054 on GitHub · 2026-11-25 21:09 UTC · original
I tested the execution-versus-omission comparison for the opaque classifier (2cc4c197ee29e291) at the prison window on an RTX 5070 Ti. Both runs used the same local executable, save, seeded caches and ambient-light override. The local translator already exchanges values across the two halves of the wave. I toggled only its bound 160 × 90 × 1 Dispatch. This was a separate integration from the approximate path in this PR.
The 1280 × 720 R32_UINT output went from 0/921,600 nonzero texels with the shader skipped to 921,600/921,600 with it running. Seven downstream indirect dispatches matched the classifier counter buffers. With it skipped all had X=0. With it running, four had X=9,970, one 19,940, one 39,880 and one stayed zero. Y and Z stayed 1 throughout. Both hair-lighting draws issued 720 vertices in each run.
Across 16 window-frame pairs matched by camera and shoulder outline with no frame reused, the courtyard wall was about 68/255 brighter with the shader running (median paired change in display luma). Lucia’s crown changed by −1.9/255, the left shirt patch by +4.5 and the right by +1.8. The ponytail was visible in both. The left shirt patch was brighter in all 16 pairs, but its change was within observed single-run variation. The classifier schedules substantial work and the courtyard changes visibly. The close-up remained dark with this ambient override. The right interior also differed between the two runs, so I can’t separate a lighting change there from a streaming difference.
@Marvisak on GitHub · 2026-11-25 22:16 UTC · original · edited 2026-11-26 05:27 UTC
Automated triage for the maintainers.
Thanks for the follow-up. Reviewed the new commit
f896d26. It does what the last triage asked: inemit/lower.rsthe three refusals (cross-half wave scan, 64-bit wave mask read as data, cross-half lane operation) are back unlessParts::wave32_approxis set.host::wave32_approxturns that on only withVICTORY_WAVE32_APPROX=1on a 32-lane host, andshader_cache::keyincludes it. CI: passing.What is still open:
pipeline/builder.rsrunspassescrate::host::host_wave32()toopens, so the builder is held back on every 32-lane host, even in the default mode. The default mode no longer approximates anything: a builder program that crosses halves is refused, so #2118's all-or-none rule already holds the builder back. A builder whose programs are wave-local now translates exactly, but it would still be blocked. Keying the hold towave32_approx()(and updating the log reason) would match the new default.Verdict: needs work. CI: passing.
Generated by Claude Code
@moe-miau on GitHub · 2026-11-26 04:30 UTC · original
Done as suggested in
f896d26: #2176's three refusals are the default again, and the approximate halves are opt-in withVICTORY_WAVE32_APPROX=1(emit::Options::wave32_approx, in the shader cache key).wave64_cross_half_readlane_is_refused_unless_approximate_on_wave32_hostchecks both ways. I don't have Venom2054's synthetic ballot program to add as a test; if @Venom2054 can share its words, I'll add it asserting the refusal by default. The builder hold (opens) is unchanged. Tests: shaderwave64/ballot8 passed;victory-gpu --lib229 passed, 2 failed (the heap-cap pair #2628 fixes); clippy and policy clean.@Venom2054 on GitHub · 2026-11-26 06:18 UTC · original
Here are the 41 little-endian GFX10 dwords from the synthetic
UniformBallotcase I ran onf896d26. The fixture generates these words directly.Fixture setup:
HwStage::Cs,wave64=true,vgprs=32,threads=[256,1,1],rsrc2=0x8002. One root table at slot 0 (user_data=0,sgprs=1, base register and table offset 0), one raw output UAV at table offset 0 (dwords=4,stride=0). Dispatch one group. In guest wavew, lanes below33+wvote. Each wave leader writes its count to LDS. After a group barrier, each output element holds256 * sum_of_counts + its_wave_count.On the RTX 5070 Ti, with
host_wave32=trueand the defaultwave32_approx=false, this case is refused at0x40witha 64-bit wave mask read as data on a 32-lane host is not supported. That is the regression assertion I would use. Withwave32_approx=true, it validates and runs. The four leaders all read back 32800 (32 votes per wave, total 128). The reference is 33, 34, 35 and 36 (total 138). The control that writes those four counts directly into LDS matched all 256 output words in both modes.@DrDarkDK on GitHub · 2026-11-25 18:40 UTC · original · requested changes
In
Shape::Half, the ballot check and the lane read use different numbering on a 32-lane host. For example, withhi = 33, the ballot check reads word 1, which is always zero.read_lane(x, 33)maps to host lane 1, but the select uses the identity even when that lane participates. That drops the packed high 16 bits in both halves.Could the ballot check use the same host-local lane as the read? A regression with nonzero high bits in local lane 1 would check that they survive when that lane participates and that the identity is still used when it doesn’t.
AI-assisted with Codex.
@DrDarkDK on GitHub · 2026-11-25 19:06 UTC · original · approved these changes
Thanks,
cfcadf6addresses my finding. The ballot now checks the same host-local lane thatread_laneuses, and the mapping test covers lane 33 on both host widths. The focused test is enough to resolve my review.AI-assisted with Codex.
@Venom2054 on GitHub · 2026-11-26 13:33 UTC · original
Follow-up on the alpha transmission prefilter (
2da4beb386509b77) mentioned above. I tested the per-instruction lane-guard change from CGBJ’s preserved source in a local VIctory build on an RTX 5070 Ti. The original Wave64 DXIL passed validation, but D3D12 refused the pipeline. The exact Wave32 translation passed validation, created the pipeline and recorded two 40 × 23 × 1 dispatches in a captured prologue frame. Only this shader cache entry changed between the two runs.At two points in the same camera view, the wire mesh and courtyard tower looked softer through the glass. In a separate fixed view of the reading NPC, I toggled only this dispatch (skipped from launch, executed, then skipped again). The book stayed dark and her forearm kept its color in all three phases. The glass stayed brighter after the final toggle. These results cover the exact translation on this GPU. The approximate path in this PR still needs its own test. Codex assisted with the tests and measurements.
@frenziedcoder on GitHub · 2026-11-26 15:59 UTC · original
RTX 5080 (Blackwell), driver 621.40, title run of
f896d26withVICTORY_WAVE32_APPROX=1in the NVIDIA stack: no device removal in 600 s, the run reaches the first interactive moment (an on-screen control prompt), and the approximate path builds exactly the pipelines the earlier localwave32_approxpatch did.Tree:
main63bcca4+ #1906 (a554b15), #2098 (543d868), #2626 (c8cc83e), #2628 (e2cdafe), #2464 (b9dc4b0) and this PR (f896d26, which brings #2176 and #2118). No local changes. One conflict, with #2628 inemit::Optionsandshader_cache::key, resolved by keeping both sides:Optionscarriesportable_views,host_wave32andwave32_approx, and the key hashes the view-heap limit, the wave32 flag and the approximation flag. Workspace tests build;shader_cache(4) andwave(15) tests pass. Diag build,VICTORY_D3D12_DRED=1, scriptedEnter, 600 s, sandboxed.translate --cache --pipelineswithVICTORY_WAVE32_APPROX=1: 420 programs refused; pipelines skipped because the compute / pixel / mesh shader does not translate: 219 / 1 / 0; 0 new pipelines to make, 26,940 already in the library. The library was built yesterday by a tree carrying @moe-miau's local version of this change (thewave32_approxdiff from #2176's thread plus the BVH-builder hold-back), so this PR's approximate path compiles to the same pipelines.In the title, against that earlier local-patch tree (one run each):
main842b0cbtree)How far a run gets also depends on the scripted presses and timing, so I'd read the last row as "this PR gets there without trouble" rather than as a difference between the two.
Not tested:
VICTORY_WAVE32_APPROXunset (the default) in the title; more than one run; this PR without the rest of the stack.AI use: Claude Code (Claude Opus 5.5) merged the tree, resolved the conflict, ran the title on my machine (sandboxed at Low integrity, game folder read-only), read the logs and frame captures, and wrote this report.
@JurajSimicevic on GitHub · 2026-11-26 16:17 UTC · original
The green cast on the NVIDIA stack comes from one program the approximate halves translate: the tile classifier. Skipping only that program removes the green: 51% green-dominant pixels in the lighting output drop to 0%.
This answers @frenziedcoder's report on #2925 (#2925), where the source was not pinned. @moe-miau, you claimed the green in the cell this morning (#1633); I only saw that after my own claim. If you are already on a fix, it's yours. Otherwise I can take it.
Setup: RTX 5080, driver 617.42, Windows 11 26200.
main63bcca4+ #2098, #2626, #2628, #2464, this PR atf896d26, and #2925 atfd180a6. The conflicts inemit::Optionsandshader_cache::keywere resolved by keeping all settings.VICTORY_D3D12_DRED=1, warm caches.VICTORY_DUMP_TARGETSat world frame +150. The measure is the share of pixels where green exceeds both red and blue by more than 24/255, in the HDR target the main deferred lighting pass writes, dumped right after its submission. One run per row.VICTORY_WAVE32_APPROXVICTORY_SKIP_PIPELINES)a cross-half operation on a 32-lane host, so this PR's approximate path is what runs it.Suggestion: this classifier needs its cross-half exchange to be exact. Until then it is better refused, even with the approximation on: it is the only program in this scene whose approximate translation visibly breaks the picture. An exact path may already exist. On #320, r4tedx lists this classifier among the lighting programs that #439's console flow translates, validates and makes pipelines for on an RTX 5070. neonbyte1's stack with #439 under the halves on #2925 doesn't mention a green cast. So keeping this program on #439's path, instead of the approximate halves, might be enough. I haven't run that.
Not tested: more than one run per row; other scenes; this PR without #2925 (the green may be latent there, because the interior only gets lit with #2925).
Local diagnostics only (target dumps, frame captures). No game data: pixel statistics and counts.
AI-assisted.
@davesousa on GitHub · 2026-11-26 16:22 UTC · original
Default mode (
VICTORY_WAVE32_APPROXunset) in the title, on Ampere: RTX 3070 Ti 8 GB (32-lane waves), driver 621.40, Windows 11 26200, TDR delay 8 s.63bcca4+ #2319 + #2178 + #2634 + #2703 + #2118, with and without this PR atf896d26. The only conflict was the shader cache key with #2178 (kept all three flags).diagbuild, warm caches, two 10-minute runs per arm with scripted walking from 150 s, one of each with DRED.Of the 177: 78 one-wave LDS, 56 64-bit mask as data, 31 cross-half (all compute), and 9 pixel or mesh programs with a 64-bit mask as data. So in the default mode most of the driver's refusals become translation refusals, and 13-20% of the dropped compute work comes back.
On the open triage point about
opens: in every default-mode run the builder logsheld back: 64-lane programs run as 32-lane halves here ... pipelines=53 made=44 refused=9. With no driver refusals in these runs, its 9 refused programs are ones the translator refuses, so #2118's all-or-none rule alone already keeps it off here. On this card, keying the hold towave32_approx()would leave the default mode's behaviour unchanged.Whole pack (
translate --cache --pipelines,wave32=true): pipelines the driver refuses 397 -> 1; skipped because a shader does not translate, compute / pixel / mesh: 24 / 1 / 0 -> 391 / 328 / 67. That matches the RTX 5080 figures on #2176, so the pixel and mesh scope point there holds on Ampere too.Not tested:
VICTORY_WAVE32_APPROX=1on this card. In three of the four runs the largest loss is draws and dispatches dropped for lack of dynamic descriptor slots (#747; median 66 to 681 a frame, depending on the scene), which this PR does not touch.AI-assisted (Claude Code); the runs are on my machine.
@JurajSimicevic on GitHub · 2026-11-26 17:13 UTC · original
Correction to my comment above: the approximation is not what turns the cell green. With #439 translating the tile classifier, the green is still there.
Setup: same machine, scene and measure as above.
main63bcca4+ #2098, #2626, #2628, #2464, #2118 and #439 ate2d3cfd, without #2176, this PR or #2925. The conflicts with #2628 (emit::Options,shader_cache,lower) were resolved by keeping both the view limit and the host target.Result:
So the green follows the tile classifier running, under either translation, not the approximation. Two explanations fit:
The README's lit prologue on an RX 6700 XT, where both run natively, suggests the title's own lighting is fine. My "better refused" suggestion above doesn't hold as stated: refusing the classifier hides the symptom by switching that lighting off, it doesn't fix it. I'll try to tell the two explanations apart from the classifier's tile outputs.
Local diagnostics only. No game data: pixel statistics and counts.
AI-assisted.
@Venom2054 on GitHub · 2026-11-26 17:17 UTC · original
I measured the two native R32 outputs of
CS_MaterialTilesInitial(bad01f53f53248e5) on an RTX 5070 Ti with a local Series S renderer fork. Two fresh launches used the same save and warmed pipeline library. Only the classifier cache entry changed, to the console-flow translation from #439 (e2d3cfd). Both versions executed the classifier in the 1280 × 720 prison-window view.In the smaller 80 × 45 tile mask, both versions had 3,395 nonzero words out of 3,600. Values greater than
0x00fffffffell from 264 to 102. In the 160 × 90 mask, nonzero words went from 12,431 to 12,336 out of 14,400. The captures were six seconds apart relative to world start, so animation can account for some differences. These counts show what changed in the masks. We do not have native reference values for them.On this stack, the deferred-lighting target already had zero green-dominant pixels in the control at the 24/255 threshold. It still had zero with #439 (six control PNG readbacks and two candidate readbacks). Wall, frame and photograph patches stayed within one 8-bit luma level in the matched final view. That gives a comparison case where the classifier runs and both masks are populated without reproducing the green seen on the 5080 stack.
Codex assisted with the tests and measurements.
@reboot0000-cmd on GitHub · 2026-11-26 17:27 UTC · original
For anyone judging this from the offline translation run: on that command the PR changes nothing, and that is the tool, not the PR. Plus whole-archive numbers for both modes on a 32-lane host, to sit beside the two reports above.
1.
translate --pipelineswithout--cachenever consults either switch.apps/victory/src/translate.rs:571buildsemit::Options { view_marks: true, ..Default::default() }, andhost_wave32/wave32_approxboth default tofalse. The only call sites arevictory-gpu/src/shader_cache.rs:99-100— the runtime path, which--cacheuses.I measured the consequence before reading the code, so the behaviour is on record too: PR at
f896d26,translate --validate --pipelines --list --jobs 8over the title's archive (26,503 containers, 26,084 programs), against a control built at that PR's own base (f3578e38) so no unrelated commit is in either tree.f3578e38Identical to the program. On the same command, #189's change is visible — so the asymmetry is real, and anyone using the offline run to triage this family will read "no effect" off a PR that works. Worth either setting the two options there from the same device query, or a line in the PR/README saying
--cacheis required to measure it.2. Both modes, archive scale, cold pipeline library. Windows 10 19044.7846, RTX 4090 (32-lane waves), validator DXC
1.8.2502.8, same command, same base, my one-line local change so the CLI can pass the flags through (env-gated:VICTORY_HOST_WAVE32,VICTORY_WAVE32_APPROX; nothing else touched).Both rows reconcile exactly against the 396: default mode declines 367 of them at translate and makes 29 new pipelines; approximation declines 195 and makes 201. The 195 are a single reason —
wave64 compute shader sharing LDS within one wave on a 32-lane host— which the description says stays by design, so this is the first count of how big that designed-away class actually is across the title: 195 programs, 191 of which translate and validate today and are then refused at creation. Across all stages the approximation costs exactly those 195 (25,669 emitted on the control against 25,474), so everything the default mode gave up beyond them comes back.Default mode's loss by reason: 573
a 64-bit wave mask read as data, 195 the LDS class, 69a cross-half operation.3. It agrees with the other card. @davesousa's Ampere whole-pack run at the same default mode: refusals 397→1, newly not-translating 391 compute / 328 pixel / 67 mesh ≈ 786, against my 837 on Ada and Windows 10, with the same ordering of causes (mask-as-data first, LDS second, cross-half smallest). Two independent hosts, same magnitude, so the ~800 figure is not a one-machine artifact — and the approximation recovers essentially all of it except the 195.
4. Same axis as the emulation route. Re-measured today at #189's current head (
3e39e340, now rebased onto current main), against a control at63bcca43which reports the same 396 / 2,658 / 25,273 as thef3578e38control, so the two routes are comparable across that 3-commit gap:On programs reaching a host pipeline — not gameplay, which depends on which of them the title dispatches — the split-halves route with the approximation on leads by 74 programs. The two controls agree exactly on all three tallies above, so the 3-commit gap between them is not doing any work here. Counts and reason strings only; no game files.
@reboot0000-cmd on GitHub · 2026-11-26 17:39 UTC · original
One reproducibility detail I should have stated with the table rather than left implicit: on Windows 10 these runs need the app-local runtime staging from #463 —
D3D12\D3D12Core.dllbeside the executable plus the two linker exports inapps/victory/build.rs. Without it the in-box runtime caps the shader model and this OS cannot give the census a shader-model 6.6 device, so no host pipelines can be created at all and the "pipelines made" column would not mean anything. That staging touches no recompiler logic; the only source change in these runs is the one line intranslate.rsabove.@reboot0000-cmd on GitHub · 2026-11-26 18:08 UTC · original
One refinement to our table above, which changes how it should be read — and the tile classifier, which does not run under this PR alone on our host.
Which of the losses are real. Our table counted programs that stop translating. The question that matters more is how many of them work today. Re-cutting the same runs against the control's per-program state:
So the two modes are not on a spectrum. In default mode 367 of what disappears was already dead, but 470 programs that translate, validate and hold a host pipeline today stop translating — pixel and mesh programs, which is what a partly-missing world looks like counted up, and consistent with the "world partly missing" row in the description for the base pull request. With
VICTORY_WAVE32_APPROX=1every one of the 195 declines is a program the driver already refuses, and 201 previously-refused programs come back: no regression, only gain. The flag is the difference between a net loss with collateral and a strict improvement.@davesousa's whole-pack numbers may already show this and I want to credit it if so — the shape holds across machines: they counted 328 pixel / 67 mesh newly not translating on Ampere and Windows 11, I count 430 pixel / 40 mesh on Ada and Windows 10, in the same default mode.
The tile classifier. @Venom2054 and @JurajSimicevic are reasoning from the classifier running under the approximation. In our archive it is
tiled_lighting:CS_MaterialTilesInitial_62659891atshaders.rpf@0xf39bc25, and on this host:The parameter is incorrect., and with the debug layer on (this week's #2562):id 622: CreateComputeShader: Shader wants wave lane count of 64 but maximum wave lane count for device is 32. It never runs here today.at 0x0 emit: wave64 compute shader sharing LDS within one wave on a 32-lane host.VICTORY_WAVE32_APPROX=1: declined, the same reason — the approximation does not reach it; it is in the class the description says stays.at 0x1f24 emit: a 64-lane wave ballot in divergent control flow.So on
main + this PRalone this program cannot be the source of anything drawn on a 32-lane host. Where it is observed running — @Venom2054's local Series S fork, @JurajSimicevic's #439 tree, the reports stacking #2925 — something else is translating it. One caveat so nobody over-reads this: I cannot join their program idbad01f53f53248e5to our archive name, so if that is a different variant of the classifier, the comparison may not transfer.That also makes the 195 a concrete target rather than an abstraction: they are all compute programs, all currently refused, and #2925's new
emit/lower/lds.rskeys on exactly this case (host_wave32withlds_dwords > 0). We are running this PR merged with #2925 on the whole archive now, in both modes, to see how many of the 195 come back and whether this classifier is one of them — the merge is clean, no conflicts, and the only local change is the sametranslate.rsline disclosed above. Will post the result here rather than guess at it.@davesousa on GitHub · 2026-11-26 18:28 UTC · original
@JurajSimicevic a third pattern, on Ampere, measured your way: on this card the green is not in the lighting output and does not follow the tile classifier. It appears at the colour-grading step.
RTX 3070 Ti (32-lane), driver 621.40, Windows 11 26200.
63bcca4+ #3097, #2703, #1906, #2098, #2464, #2626, #2628, this PR atf896d26(with #2176, #2118), #2634, #2925fd180a6, #2928;VICTORY_WAVE32_APPROX=1,diagbuild, warm caches. The first world view held still (no input after the menus),VICTORY_CAPTURE_WORLD=100withVICTORY_DUMP_TARGETS=1, one run per arm. Green-dominant: green above both red and blue by more than 24/255.VICTORY_SKIP_PIPELINES)The HDR targets are warm in both arms (red above green above blue). The identity grading tables are exact; the two graded ones are the same in both arms, and I can't tell yet whether they or their lookup in the grading pass are what turns the picture green. Either way, on this stack the green is downstream of the classifier and of lighting, unlike the 5080 run where the lighting output itself was 51% green. Whoever holds NEW-357 / NEW-454 may want to check the grading step on their card too.
Not tested: more than one run per arm, other scenes, other stacks. Counts only; the captures stay local.
AI-assisted (Claude Code); the runs are on my machine.
@reboot0000-cmd on GitHub · 2026-11-26 19:02 UTC · original
Result of the run I said I'd finish: the tile classifier gets a host pipeline only when this PR is merged with #2925 and
VICTORY_WAVE32_APPROX=1. Neither change does it alone.Same host, archive, validator and command as my posts above. The merge of
f896d26with #2925 atfd180a6was clean — no conflicts, no edits beyond the onetranslate.rsline already disclosed.f3578e38Last column is the number I should have published alongside the first version of this table: of the 269 programs the emulation route declines, 2 hold a working host pipeline on main (129 previously-refused programs come back, minus those 2, which is where +127 comes from). The approximation routes lose none.
The classifier, step by step (
tiled_lighting:CS_MaterialTilesInitial_62659891atshaders.rpf@0xf39bc25):The parameter is incorrect., and via the debug layerid 622: Shader wants wave lane count of 64 but maximum wave lane count for device is 32.wave64 compute shader sharing LDS within one wave on a 32-lane host. The approximation does not change this — same reason, still declined.a 64-bit wave mask read as data on a 32-lane host. The barrier work cleared its LDS problem and exposed the mask problem underneath.That is a mechanism for @JurajSimicevic's observation, and it is not a driver bug. Per #2176's own description, what the approximation substitutes for a 64-lane ballot read as data is that the high dword is 0 — so on a program declared for 64 lanes and split into two host halves, lanes 32-63 read zero. @davesousa's colour-grading result doesn't contradict it on our host: with the approximation on, zero pixel and zero mesh programs change state at all (every one of the 142 remaining declines is a compute program the driver already refuses), so a colour-grading difference on Ampere is not coming from shader availability here. Their #439 comparison also can't rule it out — I have no #439 tree, and that is a different translation entirely.
What #2925 adds under the approximation: 53 compute programs, every one of them driver-refused on main, none of them working today. All compute; no graphics stage involved. Grouped by pipeline:
InstanceCulling6,RiverSimPacket6,GpuParticleUpdate5,tiled_lighting4,sr_tracing3,scattering_transmittance_system3,water_compressed_simulation_rendertarget3,deferred_tiled2,shadowmask2,alphaResolve2,indirect_light_probes2,WindNew2,shader_binning_utils2, and one each ofTAA2,TAA_Utilities,BilateralGrid,height_buffer_offset,terrainshadows,weatherParticle,vfx_lightningStrike,ShallowWaterSim,water_shading,deferred_mirror,deferred_studio_shot.Among them, the ones most likely to show up as an image difference rather than a missing object, since they feed lighting and culling decisions:
CS_MaterialTilesInitialandCS_MaterialTiles,CS_ShadowRevealTilesInitialandCS_ShadowRevealTiles,cs_generate_material_tilesin the mirror and studio-shot deferred pipelines,CS_DepthProcessing/CS_DepthProcessingHBO, the sixCS_Slod_BatchCull*variants,CS_DenoiseShadowMaskPoissonDisc(+Packed),CS_IrradianceCache_Shadeand…_Secondary, andCS_ComputeLuminanceBilateralGrid.142 programs stay declined in that configuration, all with the single reason
one-wave LDS on a 32-lane host: no point all threads reach between a write…, and all 142 were refused on main too — so on this measure the combination is the best of everything on this list, +254 pipelines with nothing working given up.Caveats unchanged from before: this counts programs reaching a host pipeline offline, not dispatches in a running frame; Windows 10, Ada, validator DXC
1.8.2502.8; and I still cannot join your 16-hex program ids to our archive'sname_hash/offset pairs, so if your classifier variant differs fromCS_MaterialTilesInitial_62659891the step-by-step may not transfer. Counts, offsets, names and driver text only.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.