Avoid unused VRAM slack for oversized COPY-queue transfers #1414

Merged
NotADonky43 merged 1 commit from upstream-pr/1414 into main 2026-11-29 08:16:56 +00:00
NotADonky43 commented 2026-11-28 19:23:29 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by NotADonky43 on 2026-11-28T19:23:29Z.


The optional COPY queue accepts up to 512 MiB per transfer, but retains at most 256 MiB of free slots. Above that free-pool limit, power-of-two rounding buys no reuse. Allocate exactly the requested width for these transfers and release the unretainable slot outside the queue mutex after DIRECT completion. No changes to gate thresholds, fence ordering or reusable size classes. This is independent of #1391 (this changes the GPU destination on COPY, not the CPU upload source).

On an RTX 5070 Ti with D3D12 diagnostics enabled, the isolated 257 MiB transfer regression on main 32ecacfa failed on actual resource width: 536870912 vs 269484032 bytes. The patched run passed, including fenced readback at both ends and checking the oversized slot was not retained. Four regular copy-queue tests and the release build also passed. 255 MiB less requested VRAM capacity for this transfer, not measured DXGI residency, a game-wide reduction or an FPS claim. No game assets required.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5543758599 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1414). Originally posted by [NotADonky43](https://github.com/NotADonky43) on 2026-11-28T19:23:29Z. --- The optional COPY queue accepts up to 512 MiB per transfer, but retains at most 256 MiB of free slots. Above that free-pool limit, power-of-two rounding buys no reuse. Allocate exactly the requested width for these transfers and release the unretainable slot outside the queue mutex after DIRECT completion. No changes to gate thresholds, fence ordering or reusable size classes. This is independent of #1391 (this changes the GPU destination on COPY, not the CPU upload source). On an RTX 5070 Ti with D3D12 diagnostics enabled, the isolated 257 MiB transfer regression on main 32ecacfa failed on actual resource width: 536870912 vs 269484032 bytes. The patched run passed, including fenced readback at both ends and checking the oversized slot was not retained. Four regular copy-queue tests and the release build also passed. 255 MiB less requested VRAM capacity for this transfer, not measured DXGI residency, a game-wide reduction or an FPS claim. No game assets required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!1414
No description provided.