Skip to content

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

Closed
Heldenkrieger01 wants to merge 1 commit into
trustno1-coder:mainfrom
Heldenkrieger01:perf/share-indirect-scratch
Closed

Heldenkrieger01 wants to merge 1 commit into
trustno1-coder:mainfrom
Heldenkrieger01:perf/share-indirect-scratch

Conversation

@Heldenkrieger01

@Heldenkrieger01 Heldenkrieger01 commented Nov 29, 2026 •

Copy link
Copy Markdown

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.

OGShotz added a commit to OGShotz/VIctory-Turing that referenced this pull request Nov 29, 2026
@Heldenkrieger01
Heldenkrieger01 deleted the perf/share-indirect-scratch branch November 29, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant