GPU: reuse retired upload buffers for oversized submissions #1390
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1390
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1390"
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?
@AkshatPal2007 on GitHub · 2026-11-28 18:43 UTC · original
AkshatPal2007:codex/segmented-upload-readback→main· +251 −29 · 2 files · 1 commits · closed without mergingAddresses #1383. The segmented staging patch and the original gameplay measurements come from @NotADonky43. This PR adapts the posted patch and adds the requested byte-exact GPU readback, failure recovery coverage, and a reproducible device-local memory measurement.
Uploads now request their exact size when rounding up would exceed the pool retention limit. With
VICTORY_STAGE_SEGMENTS=1, oversized submissions reuse retired buffers for complete destination groups and allocate only the remainder. All source buffers stay alive until the submission retires. Segmented reuse is opt-in pending longer gameplay testing.Device-local memory measurement
RTX 4070 Laptop GPU, Windows,
VICTORY_SEND_BAR=1. Each run started with 26 MiB and 38 MiB retired buffers and requested the same four destination groups totaling 105 MiB. DXGI local usage was sampled before creating the retired buffers and again with the submission buffers alive.The default upload path uses host memory. The table specifically measures device-local upload heaps. Gameplay FPS and long-session behavior remain unmeasured here.
Verification
Four destinations received distinct bulk copies and scatter writes. The readback checked every byte, including untouched sentinel regions, as the scatter source switched between retired blocks and the new remainder. Tests also cover rollback after a failed allocation and size rounding at the retention limit. All four focused checks passed. The default host-memory path passed its three applicable checks separately.
To reproduce on a GPU supporting device-local upload heaps, run in PowerShell:
Strict Clippy reports a pre-existing
manual_is_multiple_oflint inshadow.rsat line 1708 on the base revision.Pull request closed