WIP: perf(vk): the part ramp runs only when asked (RX_VK_PART_ADAPTIVE=ramp), lazy upload stays on #3117
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3117
Loading…
Reference in a new issue
No description provided.
Delete branch "siantm/Longshot:perf/part-ramp-default-off"
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?
Summary
#3004 made
RX_VK_PART_ADAPTIVEdefault to a ramp of the recording parts' split thresholds (32 → 120 → 240 → 512draws) plus a lazily made upload command buffer. The test farm's run of #3004 (
8fd77e4, the PR's ownRX_VK_PART_ADAPTIVE=0against the default on each tester) measured worse frame-time tails with the ramp on threeindependent systems, and Kokiri worse in 8 of 9 reports: later parts of 240 and 512 draws hand the GPU a frame's work
later. This keeps the lazy upload command buffer on and the legacy part thresholds by default; the ramp runs only with
RX_VK_PART_ADAPTIVE=ramp(or3).=0and=checkare unchanged.Read first:
gpu/vk/part_adaptive_fast.h(the modes),vk_replay.cppmaybe_split, thegpu/vk/switches.defrow.See #3004.
Testing
Tested: Windows 11 Pro (26300), NVIDIA GeForce RTX 4060, driver 621.40:
dev.py rtover the shared base, thendev.py smoke: PASS, in play from kokiri-start, 900 frames, the Insert menu opened, no FATAL in the log.Checks (head
501fbfde, on main7bc53f84), each run alone through the PC's job queue(
python -I -B tests/<check>.py --cxx clang++where it takes one):tests/test_vk_part_adaptive.py,test_early_split_before_draw.py,test_split_before_draw.py,test_switch_table.py: 4 passed.test_vk_part_adaptive.pycutsmaybe_splitfromvk_replay.cppand runs it on submissions of 1,200 draws (the renderpass closed after each draw, ended every 100 draws, never ended): unset,
0,1,on,2andcheckgive the legacyparts (32 draws, then 120, to the next pass end; 512 inside a pass),
ramp,3and" Ramp "the ramp's (32, 120, 240,512). Its broken variants include
ignore_ramp_switch(rampand3parse as mode 1, so=rampruns the legacythresholds) and
ramp_by_default(maybe_splitramps in mode 1 too, as #3004 shipped): both fail, as all 14 do.Before an earlier rebase,
tests/run_all.py --changed origin/main: 214 of 219 passed; the 5 others (test_recorder_sync,test_prepare_stall,test_recorder_own_idle,test_present_semaphores,test_vk_ubo_ssbo_fast) failed or timed outwith 4 checks at once on a loaded PC and passed run one at a time.
Still to test:
(Radeon 760M Linux, RTX 4070 Windows, Steam Deck) and an Intel one: Kokiri and Market frame time p99 and average,
expecting the tails back at the legacy thresholds' (@Beanstalk frame-time tails in Kokiri and Market against main)
Measurements
Verdict: the default this ships at is chosen by the farm's numbers from #3004; on HumanBean's AMD Lab (GPU-limited)
the ramp and this default are within the spread. No main-against-head run yet: the farm's run of
f608fb8judged notarget (every report so far failed in the tester's setup of main, on
tools.lock).Setup: Beanstalk farm, #3004 at
8fd77e4, the same build withRX_VK_PART_ADAPTIVE=0and with the default (the ramp),two reports a target, frame time p99 (ms).
=0also made the upload command buffer eager, which this PR keeps lazy, sothese numbers are the ramp and the lazy upload together against neither.
HumanBean's Linux RTX 3090 A/B on #3004 (+2.80% average fps with the ramp) was within its run-to-run spread.
HumanBean's AMD Lab, Market (child): Radeon RX 580, Mesa RADV 26.2.6, Core i7-9700K, Linux, 1920x1080 at 100%, three
alternating pairs of 60 s,
f608fb8merged onto mainee9e1ed76,RX_VK_PART_ADAPTIVE=rampagainst=1:ramp1(this default)GPU-limited (GPU ~15.5 ms of a 19.8 ms frame): within the run-to-run spread.
Risks
the ramp loses that gain (none was shown beyond the spread).
RX_VK_PART_ADAPTIVE=rampbrings it back for a run.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Only the checks named in Testing ran on this head.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
gpu/vk/switches.def.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Tested in game: Windows 11 Pro (26300), NVIDIA GeForce RTX 4060, driver 621.40: dev.py rt over the shared base, then dev.py smoke PASS: in play from kokiri-start, 900 frames, the Insert menu opened, no FATAL in the log.
2cb320ab78f608fb84bb@review
@beanstalk
Beanstalk test farm · an earlier run: commit
f608fb8(the newer results are in a comment below)Commit
f608fb8· approved by HumanBean (reviewed) · dashboard⚠️ Note: The plan measures the shipped default against main but does not separately test the ramp, off, or check switch modes; additional switch cells would exceed the per-tester run-time limit.
⚠️ Note: The farm measures the performance effect but cannot directly verify that the lazy upload command buffer remains enabled or that the intended split thresholds were selected.
Started at 2026-12-04 06:39 UTC.
linux+amd+gpu-760m(GPU "760m")windows+nvidia+gpu-rtx-4070(GPU "rtx 4070")steamdeckwindows+nvidialinux+nvidiaamdinteligpuCouldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.
linux+amd+gpu-760m, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'swindows+nvidia+gpu-rtx-4070, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'ssteamdeck, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'ssteamdeck, report 2:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'swindows+nvidia, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'swindows+nvidia, report 2:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'slinux+nvidia, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'slinux+nvidia, report 2:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'sWhat was tested
What will be tested · AI plan (
gpt-6.1-terra)The farm will compare the default recording-part thresholds with main in Kokiri Forest and the Market, using three starts per side and 20-second measurements at full and half render resolution. It will measure frame-time tails and GPU time, and compare stationary pictures, across GPU vendors and the specifically requested systems. A crash, a picture difference above the allowed tolerance, or a p99 frame-time regression above 15% fails the pull request. The Steam Deck target will wait for a matching tester to come online. No tester online now matches steamdeck: that target waits for one.
kokiri-start(settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0; switchesHOS_OUTPUT_RES=gpu,RX_VK_AUTO_TUNE=0), then teleport to Kokiri Forest, take the picture kokiri to compare with main, measure kokiri-full for 20 s (after 5 s warm-up), set resolution to 4, measure kokiri-half for 20 s (after 5 s warm-up), set resolution to 1, teleport to Market, take the picture market to compare with main, measure market-full for 20 s (after 5 s warm-up), measure market-half for 20 s (after 5 s warm-up); 3 runs on each side.Measurements on `linux+amd+gpu-760m`, for the PR description
Verdict: queued on linux+amd+gpu-760m (1 report).
Hardware: 1: linux+amd+radv+igpu
AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `windows+nvidia+gpu-rtx-4070`, for the PR description
Verdict: queued on windows+nvidia+gpu-rtx-4070 (1 report).
Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window
NVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `steamdeck`, for the PR description
Verdict: could not be judged on steamdeck (2 reports).
Hardware: 1: linux+amd+radv+igpu+handheld
AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 16 GB RAM; 2: linux+amd+radv+igpu+handheldAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `windows+nvidia`, for the PR description
Verdict: could not be judged on windows+nvidia (2 reports).
Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window+xess
NVIDIA GeForce GTX 980, 582.78.0Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu+window+dlssNVIDIA GeForce RTX 5090, 621.47.0AMD Ryzen 9 9950X3D 16-Core Processor, 48 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `linux+nvidia`, for the PR description
Verdict: could not be judged on linux+nvidia (2 reports).
Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce RTX 5070, 620.73.4AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpu+dlssNVIDIA GeForce RTX 5070 Laptop GPU, 620.85.2AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `amd`, for the PR description
Verdict: could not be judged on amd (2 reports).
Hardware: 1: linux+amd+radv+dgpu
AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 (RADV GFX1201), 26.3.1AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `intel`, for the PR description
Verdict: could not be judged on intel (2 reports).
Hardware: 1: windows+intel+intel-proprietary+igpu+window
Intel(R) UHD Graphics 630, 0.404.2115Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM; 2: linux+intel+anv+igpuIntel(R) Graphics (RKL GT1), 26.2.411th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `igpu`, for the PR description
Verdict: could not be judged on igpu (2 reports).
Hardware: 1: linux+amd+radv+igpu
AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM; 2: linux+amd+radv+igpuAMD Radeon 8060S Graphics (RADV STRIX_HALO), 26.99.99AMD RYZEN AI MAX+ 395 w/ Radeon 8060S, 64 GB RAMScene: part-splitting, from the repository's save kokiri-start (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); part-splitting: 3 game starts a side, kokiri-full 20 s after 5 s warm-up, kokiri-half 20 s after 5 s warm-up, market-full 20 s after 5 s warm-up, market-half 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
The testers' hardware
linux+amd+gpu-760mAMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAMwindows+nvidia+gpu-rtx-4070NVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMsteamdeckAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 16 GB RAMsteamdeckAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMwindows+nvidiaNVIDIA GeForce GTX 980, 582.78.0Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAMwindows+nvidiaNVIDIA GeForce RTX 5090, 621.47.0AMD Ryzen 9 9950X3D 16-Core Processor, 48 GB RAMlinux+nvidiaNVIDIA GeForce RTX 5070, 620.73.4AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMlinux+nvidiaNVIDIA GeForce RTX 5070 Laptop GPU, 620.85.2AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAMamdAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAMamdAMD Radeon RX 9070 (RADV GFX1201), 26.3.1AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAMintelIntel(R) UHD Graphics 630, 0.404.2115Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAMintelIntel(R) Graphics (RKL GT1), 26.2.411th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAMigpuAMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAMigpuAMD Radeon 8060S Graphics (RADV STRIX_HALO), 26.99.99AMD RYZEN AI MAX+ 395 w/ Radeon 8060S, 64 GB RAMRecommendation: Approve. The new default restores earlier split thresholds while retaining lazy uploads, but its performance against main has not been measured. The existing farm comparison also changes upload behavior, so it cannot isolate the gain or cost of this default. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The change makes the longer recording-part ramp opt-in and keeps lazy upload command buffers enabled by default. That may improve frame-time tails, at the cost of more frequent submissions; the net effect of the combination remains unmeasured.
Should fix (1): not blocking, but worth doing before merging.
tests/test_vk_part_adaptive.py:252: The new wiring check checks source text instead of the resulting split behavior. (more on the line) Do: Exercise the extracted maybe_split path with an open and closed render pass and assert the actual part boundaries for default and ramp modes, including a broken default-ramp variant.Nits (1): optional.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_replay.cpp:2508: Measure the new default against main on the affected hardware before choosing it for release. (more on the line) Do: Run interleaved main-versus-HEAD measurements with matching scenes and settings, including the requested Radeon 760M Linux, RTX 4070 Windows and Steam Deck targets and an Intel target; report frame-time tails and averages.@fixcan do L2 and L3.Questions (1) (not confirmed from the code; they don't hold the recommendation)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The #3004 farm reports compare ramp plus lazy uploads against legacy thresholds plus eager uploads: ramp-on p99 was reported 10.9–55% worse in Kokiri and 0.2–17% worse in Market across three targets. They do not compare this PR's legacy thresholds plus lazy uploads against main.
Other systems: The split path affects GPU submission timing on Windows and Linux, including NVIDIA, AMD, Intel and Steam Deck; recorder modes and upload handling also share the mode value. The reported in-game smoke run covers Windows on an RTX 4060, but does not measure the new default against main.
Switches: RX_VK_PART_ADAPTIVE defaults to 1: lazy upload with legacy thresholds; 0 remains eager upload with legacy thresholds, 2 remains checked lazy upload with legacy thresholds, and new values ramp/3 select lazy upload with the ramp. The switch table is updated. Whether the new default is best across affected systems awaits measurements.
Reviewed:
f608fb84bbagainst45d1863b29: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the diff, commit, part_adaptive_fast.h and the changed test sections; traced the split and recording-mode wiring and consulted the relevant standards and architecture material. Skimmed the surrounding large renderer files and switch table rather than reading vk_main.cpp, vk_replay.cpp and switches.def in full. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no code, tests or scripts were run. The supplied Windows smoke result is evidence of a successful game run; CI checks were still running.
Overlaps and merge order: Not checked; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -2505,2 +2506,3 @@// tails worse than the legacy thresholds on a Radeon 760M, an RTX 4070 and a Steam Deck: the GPU gets the frame's work later)const int mode = rec_cur ? rec_cur->adaptive_mode : part_adaptive_mode();const int64_t need = part_adaptive_fast::part_threshold(rec_parts, kPartFirst, kPartMin, kPartMax, mode == 1);const int64_t need = part_adaptive_fast::part_threshold(rec_parts, kPartFirst, kPartMin, kPartMax, mode == 3);L1 (should fix): Measure the new default against main on the affected hardware before choosing it for release.
When: The reported farm A/B turns lazy uploads off together with the ramp, while this change keeps lazy uploads on. Its reported p99 differences therefore do not show the result of the combination this PR ships.
Do: Run interleaved main-versus-HEAD measurements with matching scenes and settings, including the requested Radeon 760M Linux, RTX 4070 Windows and Steam Deck targets and an Intel target; report frame-time tails and averages.
@ -243,2 +249,4 @@if "part_adaptive_fast::part_threshold(" not in ms or "part_adaptive_fast::verify_part_thresholds(" not in ms:fail("maybe_split does not call part_threshold and verify_part_thresholds")# (the ramp only when asked for, RX_VK_PART_ADAPTIVE=ramp: its longer later parts made frame-time tails worse, #3004)if "part_threshold(rec_parts, kPartFirst, kPartMin, kPartMax, mode == 3)" not in ms:L2 (should fix): The new wiring check checks source text instead of the resulting split behavior.
When: If the required expression remains in a comment while the live call enables the ramp by default, this check still passes; the threshold harness tests the helper separately and does not exercise that wiring.
Do: Exercise the extracted maybe_split path with an open and closed render pass and assert the actual part boundaries for default and ramp modes, including a broken default-ramp variant.
AMD Lab Market A/B: PR head
f608fb84bb9emerged ontomainee9e1ed76, usingRX_VK_PART_ADAPTIVE=ramp(A) andRX_VK_PART_ADAPTIVE=1(B) on the same build.Within the run-to-run spread. Median average FPS changed by -0.13%.
ramp)1)Market (child), headless Linux 7.3.3-1-cachyos, Core i7-9700K, Radeon RX 580 with Mesa RADV 3:26.2.6-1, 1920x1080 output at 100% render scale, uncapped with V-Sync and frame generation off. Three alternating pairs, 60 seconds per capture after warm-up, each a timing job of the queue.
A is the old default (the ramp), B this PR's. This run is GPU-limited: 100% scale at 1080p, with the GPU taking about 15.5 ms of a 19.8 ms frame against 9.7 ms for the renderer's CPU thread. This PC shows no tail difference between the two (p99 22.5 vs 22.2 ms, within noise), in the Market only.
f608fb84bb501fbfdec4Beanstalk test farm
Commit
501fbfd· approved by nobody yet · dashboardA member of
BigBeanscan review this commit and comment@Beanstalkto test it.Rebased onto main
7bc53f84(no conflicts); head is now501fbfde.L2 (should fix): done in
501fbfde. The source-text check is gone.tests/test_vk_part_adaptive.pynow cutsmaybe_splitfromgpu/vk/vk_replay.cppverbatim (astest_early_split_before_draw.pydoes; no change tovk_replay.cppwas needed), compiles it with stubs (draw_pass_openset per draw,split_partnoting each part's size, the mode taken fromRX_VK_PART_ADAPTIVEasbegin_recordingtakes it) and runs submissions of 1,200 draws with the render pass closed after every draw, ended every 100 draws, and never ended. It compares the part sizes exactly:RX_VK_PART_ADAPTIVE0,1,on,2,checkramp,3," Ramp "The new broken variant
ramp_by_defaultchangesmaybe_splittopart_threshold(..., mode == 1 || mode == 3)(the ramp on by default, as #3004 shipped it); it fails, and so do the 13 header variants.L3 (nit): done. The description now describes
ignore_ramp_switchas what it does (rampand3parse as mode 1, so=rampruns the legacy thresholds; the default doesn't change) and namesramp_by_defaultas the variant that turns the ramp on by default.HumanBean's AMD Lab A/B (Market, RX 580, RADV): thanks.
rampagainst1came out within the spread: average FPS 50.60 against 50.54, p99 22.48 against 22.19 ms, the renderer's CPU thread 9.62–9.67 ms against 9.66–9.80 ms, GPU 15.5 ms on both. The run is GPU-limited, so it can't show the earlier submission this default is for. I added it to Measurements.L1 (main against head on the Radeon 760M, RTX 4070, Steam Deck and Intel): not run, still needs the farm. I agree the #3004 farm numbers don't isolate this combination: its
=0also made the upload command buffer eager. Measurements now says so. Beanstalk's run off608fb8judged no target: every report failed while the tester set up main (tools.lockline 32, sdl: "its first URLs are not Longshot's store's"). That failure is on the tester's side and says nothing about this PR. main'stools.lockhasn't changed since #3120, so a new run on this head needs a BigBeans member to request Beanstalk again. That also answers BeanBot's question: I can't start it myself.Checks on
501fbfde, each run alone through the PC's job queue (dev.py queue run ... --mode build), Windows 11, llvm-mingw clang++:python -I -B tests/test_vk_part_adaptive.py --cxx clang++: PASS (wiring, unit and state-machine tests,maybe_split's parts for all 10 values, 14 of 14 broken variants caught)python -I -B tests/test_early_split_before_draw.py --cxx clang++: PASSpython -I -B tests/test_split_before_draw.py: PASSpython -I -B tests/test_switch_table.py --cxx clang++: PASS (707 switches)tests/run_all.py --exactdidn't run on this PC: its gen-shaders step needs an MSVC linker for cargo, and this PC has none. So I ran the four checks directly. No game run or renderer build for this round: the change only touches a test.@review
@review
Recommendation: Approve. The code is ready: only testing is left. The new default has not yet been measured against main on the affected hardware. The earlier farm comparison also changed upload-buffer behavior, so it cannot establish this change's net effect. Recommend approval; not approved on the forge.
The default returns to legacy part-splitting thresholds while retaining lazy upload; the ramp remains available for developer testing. The behavior test now checks the resulting part sizes, but the performance gain remains unproven.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_replay.cpp:2508: Measure the new default against main on the affected hardware before choosing it for release. When: The reported farm A/B turns lazy uploads off together with the ramp, while this change keeps lazy uploads on. Its reported p99 differences therefore do not show the result of the combination this PR ships. Do: Run interleaved main-versus-HEAD measurements with matching scenes and settings, including the requested Radeon 760M Linux, RTX 4070 Windows and Steam Deck targets and an Intel target; report frame-time tails and averages.Since the last review (on
f608fb84bb)Resolved: L2 (The new wiring check checks source text instead of the resulting split behavior.); L3 (The testing description calls the new broken variant a ramp-on-by-default variant, but it…)
Still open: L1 (Measure the new default against main on the affected hardware before choosing it for relea…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven. The #3004 farm reports showed ramp-on p99 increases of 10.9–55% in Kokiri on three systems, but also compared lazy upload against eager upload. An RX 580 comparison of ramp versus the new default found 22.48 versus 22.19 ms p99, within run-to-run spread and GPU-limited.
Other systems: The split policy affects Vulkan submission timing on Windows and Linux, including AMD, NVIDIA, Intel and Steam Deck. The recorded Windows NVIDIA smoke run passed; the requested main-versus-head comparisons on the affected systems and Intel remain outstanding.
Switches: RX_VK_PART_ADAPTIVE now defaults to 1: lazy upload with legacy thresholds. Ramp or 3 selects the prior ramp; 0 and check retain their behavior. The table is updated, but measurements have not yet established the new default's net effect.
Reviewed:
501fbfdec4against7bc53f8413: Read AGENTS.md, CONTRIBUTING.md, the diff, adaptive header and changed test; inspected the replay split and recording paths and switch row. The large renderer files and switch table were inspected around relevant changes, not read in full; recorded runs were skimmed.; nothing run (a code review).Checked and fine:
Testing: The author reports a Windows NVIDIA game smoke pass and four targeted checks passing on this head. CI is still running; no commands or tests were run for this review.
Overlaps and merge order: None identified from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.