fix: reuse zeroed upload buffers for VIctory mip initialization #325
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!325
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-325"
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:19 UTC · original
mauroalvare:codex/victory-mip-zero-upload→main· +328 −27 · 3 files · 1 commits · openChange
tools/lancer_victory.ps1enables levels on demand. When VIctory records a clear for a newly mapped mip intexture::card_writes, it used to create a D3D12 upload buffer and fill the entire footprint with zeros. Successive mips need identical source bytes.Share one immutable zero source per host device. The cache grows up to 4 MiB. Each command list retains the source it recorded through submission, so a larger request can replace the cached buffer while an older source is still in use. Larger footprints use a dedicated upload buffer.
Verification
Windows x64 MSVC debug builds on the RTX 5070 Ti with driver 621.40. Baseline
c4c93bdc413191a9dc909998d2d53080a3f0c880uses the extracted clear helper and the same test fixture, with a dedicated upload buffer per clear.Run from
third_party/victory.Three fresh-process A/B pairs reproduced the allocation 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 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 creates six D3D12 textures with three mips each. It fills every mip with a generated marker byte, records the production clear, then writes a single row and verifies every byte of the readback. It records the lists before submitting, so the first source must survive cache growth. D3D12 heap types
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.