fix(gpu): verify moved-texture bytes before keeping old slot view (VICTORY_KEEP_SHOWN=checked) #280
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/280"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by Mikey970 on 2026-11-27T20:40:24Z.
Problem
With
VICTORY_KEEP_SHOWN=1, a descriptor slot rewritten with a texture of the same format and size at a different address (Kin::Moved) keeps showing the old texture until the new upload runs. That is right when the title moves a texture, but wrong when the streamer reuses a slot for a different texture of the same dimensions/format (e.g. an albedo where a mask or another character's map lived): the surface displays garbage/rainbow-noise texels in the G-buffer albedo until the upload finishes (reproducible on faces during the opening cutscene).Fix
VICTORY_KEEP_SHOWN=checked(opt-in; existing numeric0/1/2defaults unchanged).Kin::Moved,kept_meanwhilecompares the first and last 4 KiB (or the whole buffer under 8 KiB) viacrate::host::read_into. If both ends match, the old texture stays; if they differ or either address is unreadable, the slot falls back to the neutral texture until the new upload completes.Testing
descriptor::host::bake_flip_tests::a_moved_texture_is_kept_only_with_the_same_ends(passed viacargo test -p victory-gpu).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by cloph-dsp on 2026-11-28T02:52:47Z.
Independent local verification (Windows, Rust 1.100.0/MSVC, no game data):
48ff43c458d0659698fcb62d51f1d5a7d7727bdc, base (single-commit parent)f3534e6b09f113e369c3ade2a13ff3d711ce0cf1.cargo test --locked -p victory-gpu --lib -- descriptor::host::bake_flip_tests::a_moved_texture_is_kept_only_with_the_same_ends --exact --test-threads=1 --quiet→ 1 passed, 0 failed, 459 filtered, exit 0.git grep -Ffor the test name on the base returned no hits (test is new on this PR);git diff --check f3534e6 HEADclean (1 file, +109/-12).CARGO_TARGET_DIR(never shared) withCARGO_BUILD_JOBS=2.same_endsslice comparison, no GPU) was replayed; full workspace suite and clippy were not run locally (no clippy component on this toolchain). Pre-existing compiler warnings present.AI-assisted (Hy4 flash).