GPU: share indirect argument scratch after completed lists reset #3298

Closed
github-bot wants to merge 1 commit from github-bot/gh-3298 into main AGit
Owner

@⁠Heldenkrieger01 on GitHub · 2026-11-29 21:26 UTC · original
Heldenkrieger01:perf/share-indirect-scratch → main · +16 −6 · 2 files · 1 commits · closed without merging

Each live command list kept its largest indirect-argument scratch allocation across resets. Lists that take turns can now reuse the same device-local allocation through the existing UAV pool. The handoff happens after execution finishes and only for poolable buffers whose close path restores COMMON.

On a 10 GiB RTX 3080, 16 live host lists each requested 8 MiB in turn, then closed, executed and reset. Main used 16 distinct buffers and added 129 MiB of DXGI local usage. This branch used one buffer and added 9 MiB. Three fresh processes per build gave the same results. The existing D3D12 lifecycle test passed with the new reset-time reuse assertion.

In-game A/B on a 10 GiB RTX 3080

The opening scene saved 54.35 MiB of device-local indirect scratch with indirect batching disabled. A local instrumented build toggled only this change for the unbatched comparison. It counted capacity held by live command lists and included all idle buffers in the shared UAV pool. By the end of the window the patch had returned a scratch buffer on 56,429 list resets.

Indirect batching off Median draws/frame Mean scratch plus spares Mean process-local VRAM Rendered FPS p99 frame time
Baseline 4,645 60.94 MiB 8,350 MiB 10.75 235.1 ms
PR 4,545 6.59 MiB 8,200 MiB 10.74 241.4 ms

The 150 MiB difference in whole-process usage includes other allocations and run-to-run variation. The directly measured saving is 54.35 MiB. This pair used VICTORY_INDIRECT_BATCH=0 on both sides.

With the launcher's default VICTORY_INDIRECT_BATCH=2, instrumented baseline and patched runs both recorded zero allocations through the changed path. Two ordinary PR runs at the higher draw count measured 10.99 and 11.10 FPS and 8,114 and 8,069 MiB of process-local VRAM. The comparable baseline measured 11.67 FPS and 8,169 MiB. The allocator counters give no basis for attributing those default-setting differences to this PR.

All runs started a single fresh game process from the same copied save on a 10 GiB RTX 3080. The Series S profile used the 720p scene setting, DLSS Quality, and frame generation off. The 45-second measurement window started 80 seconds after the first world interval with at least 500 draws/frame. FPS uses title presents, and local VRAM is the process's DXGI local-segment usage. Every build used the same diagnostics compilation fixes from #3086.

Created with GPT-6.2-Astra in the Codex harness.

**@⁠Heldenkrieger01** on GitHub · 2026-11-29 21:26 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3298) `Heldenkrieger01:perf/share-indirect-scratch` → `main` · +16 −6 · 2 files · 1 commits · closed without merging Each live command list kept its largest indirect-argument scratch allocation across resets. Lists that take turns can now reuse the same device-local allocation through the existing UAV pool. The handoff happens after execution finishes and only for poolable buffers whose close path restores COMMON. On a 10 GiB RTX 3080, 16 live host lists each requested 8 MiB in turn, then closed, executed and reset. Main used 16 distinct buffers and added 129 MiB of DXGI local usage. This branch used one buffer and added 9 MiB. Three fresh processes per build gave the same results. The existing D3D12 lifecycle test passed with the new reset-time reuse assertion. ### In-game A/B on a 10 GiB RTX 3080 The opening scene saved **54.35 MiB of device-local indirect scratch with indirect batching disabled**. A local instrumented build toggled only this change for the unbatched comparison. It counted capacity held by live command lists and included all idle buffers in the shared UAV pool. By the end of the window the patch had returned a scratch buffer on 56,429 list resets. | Indirect batching off | Median draws/frame | Mean scratch plus spares | Mean process-local VRAM | Rendered FPS | p99 frame time | |---|---:|---:|---:|---:|---:| | Baseline | 4,645 | 60.94 MiB | 8,350 MiB | 10.75 | 235.1 ms | | PR | 4,545 | 6.59 MiB | 8,200 MiB | 10.74 | 241.4 ms | The 150 MiB difference in whole-process usage includes other allocations and run-to-run variation. The directly measured saving is 54.35 MiB. This pair used `VICTORY_INDIRECT_BATCH=0` on both sides. With the launcher's default `VICTORY_INDIRECT_BATCH=2`, instrumented baseline and patched runs both recorded **zero** allocations through the changed path. Two ordinary PR runs at the higher draw count measured 10.99 and 11.10 FPS and 8,114 and 8,069 MiB of process-local VRAM. The comparable baseline measured 11.67 FPS and 8,169 MiB. The allocator counters give no basis for attributing those default-setting differences to this PR. All runs started a single fresh game process from the same copied save on a 10 GiB RTX 3080. The Series S profile used the 720p scene setting, DLSS Quality, and frame generation off. The 45-second measurement window started 80 seconds after the first world interval with at least 500 draws/frame. FPS uses title presents, and local VRAM is the process's DXGI local-segment usage. Every build used the same diagnostics compilation fixes from #3086. Created with GPT-6.2-Astra in the Codex harness.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 21:27:42 +00:00
github-bot closed this pull request 2026-11-29 22:40:43 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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