Repository navigation
Conversation
|
Thanks for going after the wave64 LDS refusals: they are one of the clearest blockers on 32-lane cards, and One concern with A tighter rule could accept only Written with an AI assistant (Claude). |
|
Test on an RTX 4070 (32-lane waves): this PR makes the driver create one of the compute pipelines that every 32-lane NVIDIA run refuses, Tested
Not tested: that run only reached the profile screen: my scripted presses didn't get past it, and the pipeline was made by the early-start warm-up. So I have not seen this program dispatched in the world, or its output. Other GPUs not tested either. 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. |
|
Tested on NVIDIA (32-lane host): this brings up one of the wave64 compute pipelines that this card refused (#7, #11). Setup: RTX 5070 Ti, driver 621.24, Windows 11, Ryzen 7 9800X3D. Own 1.0.2.1 copy, Series X profile, diagnostics build:
There was no device removal and no crash in a 7-minute run in the world, and the walls and lighting in the prologue room render. The four that are still refused presumably fail the lane-private LDS analysis. If it helps, I can rerun with The fps numbers are not a clean A/B, because other PRs changed in the same build, so I am leaving them out. |
|
A follow-up on
I hit it while writing a test: 64 threads, A fix that worked for me: in let old_only = |reg: Reg| match (&inst.fields, reg) {
(Fields::Valu(valu), Reg::V(x)) => {
inst.write(reg).is_some()
&& valu.dpp.is_none()
&& valu.sdwa.is_none()
&& !name.contains("mac")
&& !name.contains("lane")
&& !name.contains("16")
&& !valu.src.iter().any(|op| matches!(*op, Operand::Vector { reg, dwords }
if (u16::from(reg)..u16::from(reg) + u16::from(dwords.max(1))).contains(&u16::from(x))))
}
_ => false,
};
// ... in the loop over inst.reads:
if old_only(reg) { continue; }With it, |
…s on one card, and the wave64 halving analysis (by Koro4e)
|
Thanks @ericomeehan, @m335671 and @FrancescoGelosoEterea — the RTX 4070 and RTX 5070 Ti runs are exactly what this needed: the pipeline this PR brings up on a 32-lane host ( On both review points: taint is gone. You are both right that it could call a shared LDS word "per-lane", and the pushed commit (
Honest numbers, so nobody has to find them out the hard way: an offline scan of the 1,163 dumped compute shaders with the strict rule enabled lets 0 of the 37 programs through that the old taint rule passed. The dumps ( Practical effect of this PR as it stands: wave64 compute without LDS — or with LDS the meetings rule already orders — now runs on 32-lane cards; the LDS-heavy programs keep the old path until the loop analysis lands. |
1 similar comment
|
Thanks @ericomeehan, @m335671 and @FrancescoGelosoEterea — the RTX 4070 and RTX 5070 Ti runs are exactly what this needed: the pipeline this PR brings up on a 32-lane host ( On both review points: taint is gone. You are both right that it could call a shared LDS word "per-lane", and the pushed commit (
Honest numbers, so nobody has to find them out the hard way: an offline scan of the 1,163 dumped compute shaders with the strict rule enabled lets 0 of the 37 programs through that the old taint rule passed. The dumps ( Practical effect of this PR as it stands: wave64 compute without LDS — or with LDS the meetings rule already orders — now runs on 32-lane cards; the LDS-heavy programs keep the old path until the loop analysis lands. |
|
Offline check of Note: Tested
The two AI use: Claude Code (Claude Opus 5.5) built and ran the check on my machine, compared the listings and wrote this comment. |
|
A heads-up from combining this with #592 and #500 on f85101b. Alone, this PR is the biggest gain of the three: on a 32-lane host ( But with #592 merged as well, #592's test From reading
I haven't pinned down which path makes the test program split, so treat this as a pointer rather than a diagnosis. AI-assisted (Claude Code). |
…haders 2.1 fxceless f5c03f3 (PR fxceless#999), texback.rs: textures of the water kinds that shaders write are copied into read-back buffers when the list closes and tiled back into title memory once it has run, so the CPU's ocean sampling (boats) reads what the GPU wrote. ON by default here: VICTORY_TEXTURE_BACK unset or 1 takes the four water kinds, 0 turns it off, a list of <w>x<h>f<format> picks others. Merged with this tree's in-place write ranges (Deferred::placed): flights now carry both their placed ranges and their readback ranges. 2.2 fxceless a35c557, VICTORY_TARGET_VARIANTS (on unless =0): a draw into a render target whose format differs from what its pipeline declares for that slot gets a pipeline of the same state for the bound formats. Adapted to this tree's blending: host_blend() still turns blending off per format at creation, and integer_targets_unblended() now keeps the title's blend state (blend_as_given) for variants to start from. RTV records and pipeline states both carry stand-in formats (target_format), so they compare like for like. fxceless 025b042 (integer targets do not blend) was already here as e92dbb4; not ported again. 2.3 Marvisak 842b0cb7 (fxceless#158) not ported: the depth bounds test already reaches the host here (c96b4f2, fxceless#82: OMSetDepthBounds, adapter check, DEPTH_STENCIL1 for vertex and mesh streams, replay, test). 2.4 fxceless PR fxceless#808: v_dot4_i32_i8 / v_dot4c_i32_i8 / v_dot4_u32_u8 and v_dot2* lower to DXIL dot4AddPacked and fmad (emit/dot.rs, listed in sources(); Module::eval_u32 for constant operands). Only the PR's lowering and its new test were taken; the PR also deleted unrelated valu tests (cvt_f32_f64, permlane16), which stay. byte_dot_products_match_the_hardware is no longer ignored. 2.5 Shader correctness batch: - fxceless PR fxceless#1041: resource::track visits blocks in reverse postorder. - fxceless PR fxceless#1042: saturating clamp on packed 16-bit integer ops, with its tests (its clamp-taking vop3p helper kept; fxceless#808's test uses its own vop3p_dot). - Marvisak f3578e3 (#2493): f16 inline float constants in whole-wave v_add_f16 simulation; its test expects this tree's Shape::Active instead of Marvisak's Shape::Half. - justr4mzi 6ba165b2 (fxceless fxceless#1030): a ds_swizzle source lane outside EXEC reads zero. Restricted to console wave32 compute (no exchange, no twin), where the host lane is the console lane; the wave64 forms on 32-lane hosts keep the plain read, since a host ballot does not see the console's upper 32 lanes. - justr4mzi 640262ee (fxceless fxceless#1024): image_get_lod on cubes in pixel shaders (lower_image.rs), with its test. - justr4mzi a15e95d8 (fxceless fxceless#1019): typed half loads keep NaN payloads (widened through a finite half), with its test. - Skipped, not in this tree: Marvisak e815cef (#2484, the dirty bitmap of its memory view; ours is a page directory of copies), 366a978 (#2468, no dead_on_edge here), 120233c (#2448, no Lower::konst here). - Skipped on purpose: justr4mzi 6c9a9032 (fxceless fxceless#1026) makes v_mac/v_mad_legacy_f32 fused with flushed sources. Neither upstream has merged it, and the semantics reference here and in Marvisak/VIctory still takes the legacy multiply-add unfused; it is the title's most used arithmetic, so it waits for a hardware measurement. Gate: Windows check, diagnostics check, clippy -D warnings (default and all features), tests 342 passed / 0 failed / 8 ignored, policy 230 files ok, viz. The semantics and valu tests (and the new victory-gpu tests) are Windows-only: built and linted here, not run; pc-home is offline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Adds an analysis (
lds_lane_private) that lets a console wave64 program run in host waves of 32 even when the group is over 32 threads and LDS is in play — provided every LDS access's address derives only from per-lane values (the entry VGPRs, i.e. the thread id) plus uniforms and constants, and never from memory or another lane's LDS word. Such accesses need no ordering between the host waves: each console lane touches only the words its own address names.Wired into the halving decision next to
lds_ok/lds_meetings.VICTORY_WAVE_LDS_ASSUME=1force-enables it for programs the analysis cannot follow (quarantine keeps a wrong guess contained).Why
Programs with a group over 32 and LDS otherwise stay at WaveSize 64, which a 32-lane host refuses — on NVIDIA these pipelines never come up.
Measured
WaveSize 32than did before (probe:wave_why; verified withdxc -dumpbinon the emitted container).WAVE64-LDS-PRIVATE), where they would have been refused before.The four structure-builder programs are not among them — their LDS is genuinely shared across the console wave (a lane writes a flag at a fixed word, the rest read it) inside divergent regions, so they still need the full treatment. Notes on that, and on everything above, are in
docs/wave64-notes.md.Probes added
lds_dump— decodes a dumped console shader and prints every LDS access with the address computation.validate_dump— validates dumped containers with dxil.dll.wave_why— explains why a program keeps 64-lane waves.No game data of any kind is included — the probes take a file path at runtime.