GPU: grow per-list upload scratch on demand #1246
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1246
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1246/head"
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?
@LaunchDoesntCode on GitHub · 2026-11-24 16:46 UTC · original
gpu/grow-list-upload-scratch→main· +50 −8 · 1 files · 1 commits · merged 2026-11-25 00:17 UTCThe first scratch allocation on each host command list currently reserves 4 MiB, even for a 256-byte request. This starts per-list chunks at 64 KiB, grows them to fit up to 4 MiB, and reuses them after a fenced reset. Larger requests still get a dedicated upload. The optional
victory_gpu::scratch=debugtrace reports each new chunk's requested and allocated sizes.On an integrated Windows WARP playtest build, 158 distinct command lists allocated 261 scratch chunks totaling 30.4 MiB during loading. At the old fixed size, the first chunk of each of those lists alone would account for 632 MiB. These figures describe cumulative chunk allocations. They do not measure peak process memory or frame time.
The regression test uses a D3D12 list to check 256-byte alignment, small and large requests, overflow, and reuse of the same upload addresses after submission and reset. On this branch based on
ffe310e, the Windows diagnostics GPU suite passed 54 tests with one ignored. Workspace Clippy with all targets and features, the default workspace check with all targets, and the asset-policy check also passed.Related to #982, which pools transient uploads across lists. This change sizes the scratch chunks retained by each list.
@Zipettte on GitHub · 2026-11-24 17:59 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
59035de:cargo test -p victory-gpupasses, 51 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@fladit123 on GitHub · 2026-11-24 18:02 UTC · original
Independent focused validation of
59035de94c4a7c42361994ea861641a7ac78c2e9on NVIDIA Ada Lovelace.Environment
The regression test
list_scratch_grows_to_fit_and_reuses_fenced_chunkspassed on both the physical RTX 4060 and WARP. Separate instrumentation confirmed that the test reached both GPU submissions rather than returning early.The existing alignment, allocation growth and fenced reuse assertions passed.
Limitations: The build used a zero-byte BCPack placeholder with the original table excluded. This is focused validation, not a clean full-workspace result. Peak memory reduction and scratch payload integrity were not independently measured.
No game data or proprietary console SDK material was used.
AI use: OpenAI Codex assisted with test execution and instrumentation; ChatGPT (GPT-6.2) assisted with reporting.