perf: land packed linear VIctory texture readbacks directly #312
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!312
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-312"
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?
@mauroalvare on GitHub · 2026-11-26 02:16 UTC · original
mauroalvare:codex/victory-linear-readback→main· +320 −21 · 2 files · 1 commits · merged 2026-11-26 14:21 UTCChange
The Neptune launcher enables ocean texture copy-back. When a GPU readback lands,
texback::landcopies title memory into a temporary buffer, tiles the readback into it, and copies the buffer back. A tightly packed linear 2D texture with one subresource already has the title's layout in the mapped readback.Use the existing guarded title-memory copy directly for that case. Use the D3D12 unpadded row size and check both layouts, offsets and extents before selecting it. Padded rows and tiled layouts use the tiler to preserve bytes outside the texels. D3D12 copyable footprints
Verification
Base
c4c93bdc413191a9dc909998d2d53080a3f0c880, tested with the same regression and test-only scratch counter. Release build with diagnostics for adapter selection.Two 256×256 textures (
R32_FLOATandR32G32_FLOAT) receive a different row pattern on each of 64 submissions. The fixture records real GPU readbacks and checks every landed byte after the GPU finishes. A separate 65×64 fixture checks the padded rows and the guard bytes after the texture. The base passes the byte checks and fails the scratch-byte assertion. The fix passes both tests on the RTX 5070 Ti and on WARP.RTX 5070 Ti driver 621.40,
VICTORY_TEXTURE_BACK_MODES=0, five alternating pairs after one warm-up pair. Each run lands 128 readbacks. Time is the median spent in CPU copy-back after the GPU has finished. The copy volume sums the explicit CPU copies from the path and the measured scratch size.victory-gpurelease test binaries with--test-threads=1— base 197 passed, 4 failed, 3 ignored. Fix 198 passed, 3 failed, 3 ignored. The three failures in both arespans_say_the_next_start_and_the_lowest_level_viewed,warp_card_fetch_copies_flagged_pieces_to_their_slots, andwarp_card_patch_writes_the_masked_bytes_and_no_others.cargo xtask policy— 200 files OK.python -m ruff check --select W605,F,E9 PrototypeScarlett tests tools— All checks passed.python -m pytest -rawithANYXBOXX_REQUIRE_RUNTIME=1— 1665 passed in 192.97 s, zero skipped. Reused the C++, Rust and TomBox builds whose source inputs match this branch.Oracle and test data
The test generates the texture contents from integer row and frame patterns and compares them byte for byte after the D3D12 readback. It uses synthetic resources throughout. AI-assisted with OpenAI Codex.