GPU: use the host upload path for texture staging copies #680
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/680"
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 Marvisak/VIctory. Originally posted by EatCodeSleep2 on 2026-11-24T06:43:43Z.
Summary
Fixes #128.
CopyTextureRegionnow queues the list-owned D3D12 staging buffer throughdefer_fill. On Wine/vkd3d-proton, the title-memory copy path can skip this upload becauseVirtualQueryreports the host mapping asMEM_FREE. Using the existing host-upload path keeps the destination checks for actual writes to title memory in place.Verification
cargo test --locked -p victory-gpu --lib resource::tests::buffer_data_reaches_the_host_texture -- --exact --nocapturepassed.victory-gpulibrary test binary with--test-threads=1. 43 passed and one benchmark was ignored.AI-assisted implementation and verification with Codex.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T06:46:26Z.
Review: APPROVED
LGTM! Tested on Windows 11 with MSVC Rust 1.98.1. cargo test -p victory-gpu passed cleanly (43 passed, 1 benchmark ignored), including uffer_data_reaches_the_host_texture. Using defer_fill for staging uploads bypasses erroneous MEM_FREE reporting on Wine/vkd3d-proton while maintaining valid texture uploads.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:55:00Z.
Review: COMMENTED
Static review only (Windows/D3D12 code, no macOS verification possible):
HostList::defer_fill(dst, src, len)exists on main with the same signature asdefer_copy; the only difference is the queuedStep::FillvsStep::Copy, i.e. which submit-time path reads the source bytes.VirtualQuery→MEM_FREEexplanation for skipping the title-memory read is plausible and matches the symptom (staging silently never filled).Can't verify the submit-time behavior of
Step::FillvsStep::Copywithout reading the executor; ifFillis the path used for other title-memory uploads that are known-good on Proton, this looks like the right reuse.upstream-sync referenced this pull request2026-11-24 17:02:31 +00:00