shader(water): give each lane its own tile list slot on 32-lane waves #49
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
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
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
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/Androtim--MiniVI!49
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/49/head"
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?
@Androtim on GitHub · 2026-11-28 14:17 UTC · original
Androtim:feat/iter63-water-tile-slots→main· +187 −2 · 4 files · 1 commits · closed without mergingSummary
Ports
fxceless/victory-fork@cd93552("Open water without dark patches: the water light's tile lists take a slot a lane", after xss3009's fix inVIctory-NVIDIA69e7e00) and keys the shader cache onVICTORY_WATER_TILE_SLOTS:water_tile_slots.rs: Matcheswater_shading:CS_TransmissionVolumetrics_GenerateTilesby container digest (f5d10cde74333782f30f9bb556c073d4), program size (2112bytes), and FNV-1a code hash, rewriting both the unlit-tile and lit-tile append blocks on 32-lane hosts so every lane atomic-adds1to obtain its own slot instead of exchanging half-wave masks via group memory (which overwrote first-wave tiles and left dark 16x16 water blocks around piers and boats). Opt-out viaVICTORY_WATER_TILE_SLOTS=0. Includes 2 unit tests.emit/mod.rs&translate.rs: Addpub fn host_form(c: &Container, native: &mut NativeProgram) -> booland run it before translation and offline DXIL listing.shader_cache.rs: IncludeVICTORY_WATER_TILE_SLOTSin the shader cache translation key so toggled runs never collide on disk.Rig Specs Tested On
32.0.16.2124Run Settings & Profile
release&diagnosticsrelease builds @49ddc6f(CARGO_TARGET_DIR=D:\victory-build\minivi,RUSTFLAGS="-C link-self-contained=yes")series-s—720poff(ambient_specular_active=true)DLSS qualityoffVICTORY_*Overrides:D:\victory-build\verify-tools\verify-world.ps1(matchingapps/victory/src/play.rsSETTINGS+VICTORY_D3D12_DRED=light,VICTORY_CARD_ACCOUNTING=1,VICTORY_CAPTURE_WORLD=1)max_draws=11246,world_windows=16), 75 seconds in-world capture (D:\victory-data\verify-runs\pr49-water-tile-slots)Measurements & Verification
11.15 fpsmedian (9.9 fpsmean,1.4 fpsmin,90.0 msmedian frame time;+2.25 fpsvsbaseline-main8.9 fps)5751.5 MBmedian /5779 MBpeak VRAM against6889 MBmin DXGI budget (0 MBover budget,room_false=8.3%,-85 MBpeak vsbaseline-main5864 MB); texture queue44363uploaded,1819final waiting (-5302vsbaseline-main7121)19/24lit, median luma104.7(+1.50vsbaseline-main103.2), edge energy7.04,0.0%magenta / cyan; inspectedframe-6888.png&frame-7842.pngshowing smooth water lighting along the pier and open sea with no dark tile patches0crashes,0no_host_textureerrors,mapped()rate36.93 ms/world_sec(39000calls,3596.3 ms, max30.3 ms), all11/11verify-worldgates PASScargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(298 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 diagnostics -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib water_tile_slots(2 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib wave64_tests(12 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib shader_cache(2 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory --bin victory(23 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu build -p victory --release+objdump -p(0non-system MinGW DLLs) &--features diagnostics --release@Androtim on GitHub · 2026-11-28 18:48 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingSummary
Clean, tightly scoped PR that rewrites the two tile-list append blocks of
water_shading:CS_TransmissionVolumetrics_GenerateTileson 32-lane wave hosts (lower::host_max_wave() == 32) so each lane performs its ownbuffer_atomic_addof1instead of exchanging half-wave masks through group memory.Review Notes
crates/victory-shader/src/emit/water_tile_slots.rs): The rewrite is gated by container digest (CONTAINER),HwStage::Cs,native.wave64, exact byte length (2112), and 64-bit FNV-1a hash (0x377a_8d97_4fb8_631f), so unrelated shaders cannot be modified. BothFRONT(0x6a8..0x704) andBACK(0x70c..0x774) preserve total length and pad trailing dwords withs_nop(0xbf80_0000), keeping surrounding branch targets intact.victory_shader::emit::host_formis applied consistently in bothcrates/victory-shader/src/emit/mod.rs(translate_plain) andapps/victory/src/translate.rs(translate).crates/victory-gpu/src/shader_cache.rs(build) addsVICTORY_WATER_TILE_SLOTSto the translation key alongsidehost_settings(), preventing cache collisions when togglingVICTORY_WATER_TILE_SLOTS=0.water_tile_slots::tests::an_append_becomes_one_add_a_lane_and_keeps_its_length, the rewrite loop is duplicated inline rather than calling a shared inner helper (e.g.,apply_rewrite(&mut code)), so the test verifies the constants/layout but not the production loop body directly.Verdict
Logic, cache keying, and CI look solid. Because this changes default shader translation behavior on 32-lane wave GPUs, it is marked
needs-gpu-testfor an independent local real-GPU visual/stability verification before merging.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-11-28 21:18 UTC · original
Closing as superseded duplicate of merged PR #2.
Pull request closed