WIP: perf(vk): retain and refill capture buffers by size class #1599
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1599
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:perf/capture-buffer-class-refill"
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?
Type: perf · Risk: medium · Tested on: CachyOS Linux, Ryzen 9 7900X, 32 GiB, GeForce RTX 3090, NVIDIA 620.70.06
TL;DR
Reuse capture buffers by size class and refill large classes on a worker. In a simulated 6 GiB policy run, Market p99 improved from 83.50 to 70.39 ms against the retention-only renderer. Field FPS fell from 63.57 to 52.20 in the same pair.
Why and what changed
Prefer suitable retired buffers and account for in-flight worker reservations under the spare budget. A large class may be refilled after a hit or a successful foreground allocation. The normal renderer still controls safe retirement. The scarce-budget path can immediately take any suitable spare.
Measurements
On the normal budget, capture-only versus refill Market FPS was 64.16 versus 64.44 in the first profiled pair and 62.01 versus 60.09 in the reverse pair. Market p99 did not improve in either comparison. In the simulated 6 GiB comparison Market FPS increased from 45.43 to 47.28 while Field FPS fell. Real 6 GiB hardware has not been measured.
Testing
Ran the physical Market-to-Field crossing on Linux with warmed caches at normal and simulated 6 GiB budgets. The renderer reported a 32 MiB spare limit in the latter test. The synthetic fixture checks capture class reuse and refill behavior.
Risks and remaining work
Refill spends driver allocation time and may hold a spare class while another is needed. The second full-profile refill run still made two foreground 64 MiB allocations. An allocation trace using the simulated 6 GiB policy recorded 1,022 new buffers totaling 26.66 GiB allocated cumulatively during the Market circle. The stock replay matched allocation counts and bytes in every measured leg. A separate candidate with finer size classes reduced that modeled total to 13.45 GiB. That separate candidate has no in-game FPS result yet.
Checklist
876dc360. Measurements were taken before the cold-install packaging change on that revision.Tested in game: Linux, Ryzen 9 7900X, RTX 3090, NVIDIA 620.70.06. Exercised the capture refill in Market and Hyrule Field on the normal and simulated 6 GiB budgets. Field FPS worsened in the reduced-budget comparison.
Possibly related, for context:
b5bd2e5cf23ea1a6c8e1Corrected author and committer attribution to HumanBean. Verified identical file contents before and after the metadata change. The new simulated 6 GiB capture identified 26.66 GiB of cumulative allocations in one Market turn. The updated description distinguishes observed results from the buffer sizing model.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.