shader: retry wave32 emit without loops_wave to recover compute shader 926c46bab3b86bd6 #24
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/24"
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?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T07:40:31Z.
Summary
Port the
loops_wavefallback retry fromtrustno1-coder/VIctory-NVIDIA(8fc2254) intocrates/victory-shader/src/emit/mod.rs:emit()intoemit()andemit_once().emit_once()returnsShaderError::Unsupported { .. }whileloops_wave(native)was enabled, retries once under RAII-guardedLOOPS_OFF(with_loops_off) soloops_wave()returnsfalse.926c46bab3b86bd6(underwater/water compute pass) on 32-lane NVIDIA hosts, reducing untranslated world shaders from2to1and creating its host D3D12 PSO (host pipeline shaders=[compute 926c46bab3b86bd6]).emit::atomic_tests::loops_wave_disabled_inside_with_loops_off_and_restored.Rig Specs Tested On
Run Settings & Profile
release/victory --features diagnostics@87d486bseries-s(defaultverify-world.ps1baseline profile)offDLSS quality(-DlssMode quality)offVICTORY_*Overrides:D:\victory-build\verify-tools\verify-world.ps1 -Exe 'D:\victory-build\verify-bins\pr24-diag.exe' -GoldenDataDir 'D:\victory-data\golden-data-minivi' -OutDir 'D:\victory-data\verify-runs\pr24-loops-fallback-warm' -WorldSeconds 95 -MaxBootSeconds 240 -BaselineJson 'D:\victory-data\verify-runs\baseline-main\summary.json' -AutoNudgeMenudraws >= 500, max11533draws/frame),95sin-world (following an initial75scold-cache runpr24-loops-fallbackreaching frame 8150)Measurements & Verification
pr24-loops-fallback-warm): ALL 11/11 verifier gates PASS, median10.15 fps(98.7 ms, 18 windows, min1.2 fpsduring dock compile, vs baseline8.9 fps=+1.25 fps), preparing50.15 ms, GPU0.8 ms, copyback7.8 ms.5658–6145draws/frame, last 8 windows):10.8–11.5 fps(86.8–92.4 ms/frame,0pipelines being made).hash=926c46bab3b86bd6logged"shader translated"(user_data=2 samplers=6) and"host pipeline shaders=[compute 926c46bab3b86bd6]";untranslated=1(6b82bc7d22016cb5remains; down from2).24PNGs (lit=19/24, luma102.55, edge energy7.2,0.0%magenta); inspectedframe-8984.png&frame-8992.png(wide balcony shadows, sunlight, ocean reflections, HUD notification).off)used_max=5915 MB / budget_min=6887 MB(over=0 MB,copystatpeak6044 MBVRAM /5293 MBshared PC RAM),final_waiting=3502(vs baseline7121)0(crashes=0,no_host_texture_errors=0)cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(asset policy: 294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings(0warnings)victory-shadertests after final edit:emit::atomic_tests::loops_wave_disabled_inside_with_loops_off_and_restored(1 passed; 0 failed),emit::wave64_tests(12 passed; 0 failed) (Note: prior fullcargo test -p victory-shader --librun passed 287 tests and failed 3 pre-existing PSV0 validator tests against local Windows SDK10.0.22000.0dxil.dll101.6.2104.33:first_half_values_render_on_hardware_and_warp,the_rectangle_stage_is_a_geometry_shader,rectangles_are_drawn_whole; full CIvictory-shadersuite runs below)--releasebuilds (objdump -p:0non-system MinGW DLLs)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T08:02:59Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingSummary
Clean, tightly scoped change in
crates/victory-shader/src/emit/mod.rsthat retriesemit_once()once withloops_wavedisabled when a compute shader fails withShaderError::Unsupported { .. }.Code Review
emit/emit_once): Only triggers whenemit_once()returnsErr(ShaderError::Unsupported { .. })andloops_wave(native)istrue, avoiding overhead on already-translating shaders and preserving the original error if the fallback also fails.emit_once()clears thread-locallower::take_needs()at entry, so state from the first attempt does not leak into the retry.LOOPS_OFF/with_loops_off): Uses athread_local! Cell<bool>with an RAIIDropguard (Reset) that restores the prior value on both normal return and unwind, keeping concurrent shader translation thread-safe.emit::atomic_tests::loops_wave_disabled_inside_with_loops_off_and_restoredverifies stage gating (PsvsCs), toggling viawith_loops_off, and unwind restoration (with an RAII guard forTEST_HOST_WAVE). Note that it tests the toggle/guard rather than an end-to-endemit()fallback on a synthetic failing shader, which is acceptable here given CI is passing.926c46bab3b86bd6shader recovery that was previously bundled in PR #11.Verdict
Logic, thread safety, and CI look solid. Because this changes wave32 compute shader translation and brings a previously-dropped underwater/water compute shader (
926c46bab3b86bd6) onto the host GPU withoutloops_wave, a local real-GPU smoke test on a 32-lane (NVIDIA) host is recommended before merging.Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T21:18:26Z.
Closing as superseded duplicate of merged PR #11.
Pull request closed