Textures: skip unchanged linear plane uploads and lockless-first plane reads (VICTORY_PLANE_SAME, VICTORY_PLANE_PIN) #1909
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1909"
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 Nosheboo on 2026-11-29T02:14:39Z.
Fixes #
What it changes
Ports
VICTORY_PLANE_SAMEandVICTORY_PLANE_PINfromreadmet3xt-lab/foxhoundcommit4349ab56(GPL-3.0-or-later) intocrates/victory-gpu/src/texture.rs.VICTORY_PLANE_SAME(Last::plane_step,Staging::plane_unchanged,PLANEScounters inupload_from): skips redundant linear CPU-written R8 plane uploads when the plane's title-memory digest is unchanged from the last recorded upload, entering a 30-frame trust window after 4 consecutive changing checks (for active video frames). If an earlier check in the same frame found the plane unchanged (plane_same == true), subsequent checks in that frame still re-sample so mid-frame CPU writes are picked up immediately without a 1-frame delay; opt out viaVICTORY_PLANE_SAME=0.VICTORY_PLANE_PIN(fill_plane): reads linear plane memory locklessly without takingwatch::title_memory_reading()first, falling back to the pinned mapping lock only whenread_intomisses a page (VICTORY_PLANE_PIN=1restores lock-first reads).crates/victory-gpu/src/texture.rs.How it was tested
clippy, andrustfmtverified locally; live in-game telemetry A/B pending after merge/release testing.texture::allocation_costs::plane_step_skips_static_and_trusts_active_video(covering baseline seed, same-frame change reuse, same-frame mid-frame write invalidation without 1-frame delay, and the 4-change -> 30-frame video trust window).cargo testpassed for the crates it touches: yescargo test -p victory-gpu --lib --locked -- --test-threads=1on99b2855:590 passed; 0 failed; 44 ignored(--test-threads=1used due to pre-existing parallel watch flake #724;VICTORY_HOME/LOCALAPPDATAisolated,VICTORY_STREAMLINE_DIRunset).cargo clippy -p victory-gpu --no-deps --all-targets --locked: 0 warnings incrates/victory-gpu/src/texture.rs(only pre-existing baseline warnings elsewhere invictory-gpu).rustfmt --edition 2024 --config-path rustfmt.toml: 0 formatting diffs on touched lines incrates/victory-gpu/src/texture.rs.cargo xtask policyfails on pre-existing untouchedcrates/victory-shader/src/emit/lower.rs(> 655,360 bytes) already present onmain(#1460/#1493/#1527).Checked for overlap
VICTORY_PLANE_SAMEorVICTORY_PLANE_PINincrates/victory-gpu/src/texture.rs.Council review
gpt-6-luna(xhigh)C1mid-frame write staleness)C1resolved)gpt-6-luna(xhigh)nosh-perf)gpt-6-luna(xhigh)H1baseline,H2–H4)H1acknowledged baseline,H2–H4resolved)Created with Gemini Pro Orchestrator (Neon) and reviewed by GPT-6 Luna (xhigh) in T3 Code.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-29T03:35:20Z.
Review: APPROVED
Tested locally merged onto
main(568c5e5).crates/victory-gpu/src/texture.rs.cargo test -p victory-gpu --lib texture::passed (10 passed; 0 failed; 4 ignored, including the newplane_step_skips_static_and_trusts_active_videoanda_digest_tells_bytes_aparttests) with 0 warnings intexture.rs.Nice linear-plane upload skip and lockless-first read optimization (
VICTORY_PLANE_SAME/VICTORY_PLANE_PIN). LGTM.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).