Take texture upload memory from the list's scratch pool #30
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/30"
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 Belobug/VIctory-Belobug-AMD. Originally posted by romainhedouin on 2026-11-25T12:32:39Z.
Each title copy from a buffer into a texture created a brand new D3D12 upload buffer, mapped it, and destroyed it at list reset (the code marked this as a shortcut to pool later). Now the bytes go into the list's scratch memory: pooled 512 KiB chunks that stay mapped and are reused once the GPU is done with them, at a 512-byte offset as D3D12 requires for texture copies. Copies over 512 KiB still get their own buffer, as before.
CreateCommittedResourceMapCounts from the code, not timings. Type-checked for Windows (
cargo clippy --target x86_64-pc-windows-msvc, with and without--all-features, no new warnings); not run.🤖 Generated with Claude Code
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-25T15:13:08Z.
Review: COMMENTED
AI-assisted review: I traced the scratch allocation alignment contract and the current test coverage.
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by gut0to on 2026-11-25T15:13:08Z.
Code review location:
crates/victory-gpu/src/host.rs; line 2423Could we add a Windows regression test that first allocates a 256-byte scratch span, then requests an upload span with 512-byte alignment and checks that the returned GPU offset is 512-byte aligned? This is the contract that makes the new pooled upload safe for placed footprints, and the mixed-alignment rollover path is currently untested. AI-assisted review.