fix: stage only the requested rows for boxed VIctory texture uploads #332
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!332
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-332"
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 03:59 UTC · original
mauroalvare:codex/victory-texture-upload-rows→main· +370 −10 · 4 files · 1 commits · openChange
CopyTextureRegionstaged the whole buffer footprint when uploading a source box to a texture. A small patch could allocate and fill an upload buffer sized for the entire source.For a 2D box with whole block rows, stage the selected rows, keep the row pitch and horizontal coordinates, and rebase the vertical coordinates. The staging fill reads title memory at submission. A multi-slice footprint or a box with unaligned block rows takes the full-footprint path. This is the buffer-to-texture path in the VIctory runtime built by
tools/lancer_victory.ps1.Verification
Windows x64 MSVC debug builds on the RTX 5070 Ti with driver 621.40. The baseline uses
c4c93bdc413191a9dc909998d2d53080a3f0c880with the staging code extracted and the same synthetic regression.Run from
third_party/victory.Three fresh-process A/B pairs reproduced the byte-count assertion failing on the base and passing with the fix.
baseline-test.exe --test-threads=1fixed-test.exe --test-threads=1cargo test --locked --offline -j 2 -p victory-loader --test load_probecargo check --locked --offline -j 1 -p victory-gpu --features diagnosticscargo xtask policycargo test --release --manifest-path rust/Cargo.toml --locked --offline -j 1python -m pytest -rapython -m ruff check --select W605,F,E9 PrototypeScarlett tests toolsgit diff --checkThe full
victory-gpuruns used the captured Cargo test binaries. Three assertions reproduced on both builds.descriptor::host::tests::spans_say_the_next_start_and_the_lowest_level_viewedgotNonewhere it expectedSome(1).indirect::tests::warp_card_fetch_copies_flagged_pieces_to_their_slotsgot0where it expected1in the first result slot on WARP.indirect::tests::warp_card_patch_writes_the_masked_bytes_and_no_othersreported the first differing offsets at 0 through 7 on WARP.Oracle and test data
The fixture submits six 64×64 patches from a generated 1024×1024 RGBA buffer into different destination strips. It fills the source after recording and checks every destination byte after readback, including the pixels outside the patches. The layout unit test covers aligned BC1 rows, the tight final row, and full-footprint fallbacks. D3D12 CopyTextureRegion
Codex provided AI assistance with the investigation, implementation, and validation.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.