Repository navigation
Conversation
|
I reran the underwater test on the RTX 4070 Ti SUPER with separate, initially empty shader and pipeline caches. Both builds used copies of the same v100 save, Series X, 2560×1440 input to 3840×2160 DLSS Quality M, frame generation off and the same diagnostic instrumentation. The actual game log confirmed all 53 BVH-builder pipelines in both runs. The candidate differs from the control by the patch in this PR (stable patch ID The GPU compiled different DXIL for
In the control, 883 groups exited at guest offset I also kept a sixth candidate capture with the camera crossing the waterline. The companion texture kept its marker in the top 28 tile rows and part of row 28. It had zero watchdog codes and no diagnostic colour in the DLSS input. A dark horizontal band is still visible in some underwater views. The captures support the fix for these two exits. Surface colour, the buoy rectangle and gameplay 1% lows need their own measurements. |
|
Tried this on a tree without #348 (no paired form), since #739 says it removes the dark rectangle at the buoy. It does seem to help the water here, but 13 programs lose their wave32 lowering with it, and some of them are used in play. Setup: RTX 5060 Ti 16 GB, Core Ultra 5 225F, 32 GB, Windows 11. Series S, 1920x1080, no DLSS, no frame generation, diagnostics profile, Offline (
By their names they are the four cascade-shadow classification programs, the ray-tile sort of the scattering system, a river-simulation one, a particle-emit count, a decal classification and five decal/triangle heap relocations. In the game (boat mission after the prologue, 470 s; and the opening, one run each):
The 9 are Picture, one run: the water is lit and I saw no dark rectangle beside a moored boat on the route. The boat cutscene is clearly darker than without the commit: people and mangroves stand in shade, which would fit the cascade-shadow classification being dropped. So on this tree the extra kept guards seem to push these programs out of every wave32 form. Perhaps the guard should be kept only where the lowering that bounds the loop is the one taken, or these programs need the same retry that Not tested: with #348 or the other open PRs; AI-assisted (Claude Code): the builds, the runs and this text; the captures were judged by eye on my PC. No game files attached. |
|
Confirming on an RTX 4070 Ti SUPER 16 GB (Ryzen 7 5800X3D, Series X 1440p DLSS Quality): Before: blocks around the bale, even with #45 and #822 on top. Leaving shaders out while playing pinned it to (Build: |
|
I saw the same on another tree: @MrEjecutor's list holds up here, and the picture shows it. Setup: RTX 5060 Ti 16 GB, i7-14700KF, Windows 10. trustno1 main
I reverted it locally for now. I'm happy to test a version that keeps the guards only where the wave32 lowering still succeeds. AI-assisted (Claude Code, Claude Opus 5.5); no game data. |
|
A small change on top of this PR gave me the water fix without the lost lowerings: when a program does not translate with the guards kept, try it once more with the walk as it was before. It is the same pattern What I changed locally (on
// sketch: arguments as emit() has them
pub fn emit(c, native, p, st, io, res) -> Result<HostShader, ShaderError> {
let kept = emit_loops(c, native, p, st, io, res); // the body emit() has today
if !matches!(kept, Err(ShaderError::Unsupported { .. })) {
return kept;
}
ir::with_loose_guards(|| emit_loops(c, native, p, st, io, res))
}Results, same PC and settings as my comment above (RTX 5060 Ti 16 GB, Series S, no DLSS,
It costs a second translation of every program that fails with the guards kept (once per program, cached). It does not say why those 13 stop translating; it only puts them back where they were, so the real fix may be narrower than this. Not tested: AI-assisted (Claude Code): the change, the runs and this text; the captures were judged by eye on my PC. No game files attached. |
|
Tried the retry from the comment above on an RTX 4070 Ti SUPER (Series X 1440p, DLSS Quality), on I also tried #742 instead of #888: the squares around the bale are gone too, but in that run part of the boat was missing its texture. I can't say yet whether that comes from #742 or was a one-off. |


In
ir::without_skips, an empty wave can enter a loop the guest would have branched around. The old walk recognises cycles composed of fully decided branches. If a scalar test is unresolved, revisiting its state is treated as already explored. The outer guard can then disappear and a lowering that bounds loop iterations can return before later stores.This change tracks states on the current path separately from fully explored states. A reachable cycle, or exhausting the existing analysis budget, keeps the guard. An ordinary vector compare under empty EXEC produces an empty predicate mask; following VCCZ/VCCNZ lets the analysis still remove the guard around a provably single-pass loop.
Reproduction on current main (
63b902f)The new unit test uses synthetic instructions. It covers a VCCZ backedge, a scalar loop whose initial value comes from an inactive vector lane, and the VCCNZ control that can still be simplified. On the unmodified base the test fails on the VCCZ case. With the patch,
cargo test --locked -p victory-shader --libpassed all 208 enabled tests (2 ignored).Runtime evidence and review scope
On an RTX 4070 Ti SUPER, the diagnostic captures in #739 identify two watchdog exits and 1,039 affected workgroups. A separate replay of a 56-program selection yielded 52 validated DXIL outputs on both builds, with four hashes changed and no outputs lost or gained. One timed run took 19.12 s before and 27.08 s after for the replay including validation. This is a single pair, and compile cost is worth reviewing.
#326 also protects scalar-test loops as part of its Wave32 water changes. This PR is limited to the current skip analysis and explicitly tests VCC-controlled backedges. I am leaving it in draft: the earlier in-game candidate/control shared shader and pipeline caches, so that comparison cannot establish a visual fix. I have not measured a gameplay FPS improvement from this change.