Skip staging for fully GPU-written texture uploads #248
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!248
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-248"
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?
@tommiehansen on GitHub · 2026-12-02 20:55 UTC · original
tommiehansen:perf/skip-staging-for-copied-textures→main· +83 −22 · 2 files · 1 commits · closed without mergingProblem
Submission preparation read, hashed or detiled title texture memory before deciding whether it would upload the staging data. When earlier GPU copies already covered every part, the upload was discarded and that CPU-side work had no consumer. A skipped refresh can avoid a whole texture read, including a VRAM readback when the title pages are on the card.
Change and correctness
Use the existing full-coverage predicate when preparing refreshes. Include the submitted bits and the prefix of copies from strictly earlier lists in this submission. Resolve the mask by host-copy identity. A copy in the current or a later list cannot suppress the prelude. Partial coverage still refreshes as before. The sequential and parallel planners use the same test, and deferred execution checks the actual submitted state again. The existing upload decision and logging still run. Resource references, GPU copies, queue order and fence or barrier behavior are preserved.
This should reduce preparation time and the cost of streaming frames that contain discarded uploads. The frequency and critical-path impact of those uploads remain unmeasured.
Validation
Windows-target
cargo checkpassed with and without diagnostics and with test targets enabled, using a check-only mimalloc override and pure Rust BLAKE3 on macOS. Portable tests compared mask planning with an explicit subresource model over 65,536 randomized write orders and checked current-list exclusions, partial coverage and the 64-part limit.git diff --checkpassed. Hardware benchmarking was unavailable during initial development.Please test RX 9060 XT 16 GB at native 1920×1080 and RX 9070 XT at native 2560×1440, with RT enabled and no frame generation. Compare texture-preparation bytes and milliseconds, P99 frame time and image parity in a streaming route with GPU-copied textures. Include texture growth, baked decals and Bink playback to check that genuinely needed refreshes still happen.
Independent hardware testing
Both #248 and #233 were independently adopted by @ultimatebash in PR #267 and are included in commit 9166acc0.
The combined configuration reported the following results on an AMD Radeon RX 6750 XT (12 GB VRAM), comparing the old configuration with the new short release run:
These are independently reported results for the combined configuration, including other RAM and VRAM management changes. The runs differ in duration, and the author reports substantial run-to-run variation in separate experiments. They do not establish the individual performance contribution of either PR, but they do provide evidence of successful integration and hardware exercise on AMD. Isolated A/B measurements and RDNA4 validation remain desirable.
github-bot referenced this pull request2026-12-03 10:25:27 +00:00
@tommiehansen on GitHub · 2026-12-03 11:18 UTC · original
Independent hardware testing update: @ultimatebash integrated this PR together with #233 in #267 (commit 9166acc0).
On an RX 6750 XT (12 GB), the combined configuration reported:
These results include other memory-management changes and compare runs of different durations, so they cannot be attributed to this PR alone. Nevertheless, they confirm external adoption and hardware exercise. I've updated the PR description with the evidence and its limitations. Isolated A/B testing would help establish the individual impact.
@goldfishdev on GitHub · 2026-12-03 16:57 UTC · original
Superseded by #267, which carries this change and has 12 GB hardware testing. Closing to keep the review in one place.
Pull request closed