perf(vk): add RX_VK_DRAW_OVERHEAD_LEAN per-draw, descriptor, and pass fast paths #3048
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
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3048
Loading…
Reference in a new issue
No description provided.
Delete branch "siantm/Longshot:perf/vk-draw-overhead-lean"
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
Eliminates redundant per-draw, per-descriptor-push, and per-pass overhead on the hot Vulkan graphics replay path without adding persistent TLS cache bloat:
gpu/vk/draw_overhead_lean.h,gpu/vk/vk_draw.cpp): replaces heavy helper call overhead insidedraw()with inlinestats_tick_needed(),mesh_indirect_convert_needed(),scene_draw_ubo_ready(),temporal_note_scene_needed(),fsr3_note_scene_needed(),skin_check_needed(),hidden_depth_draw_needed(), and lock-freeupscale_route::wanted_fast()(gpu/vk/upscale_route.h,gpu/vk/upscale_route.cpp). The sampledPROF_HOTphases (PROF_DRAW/DESC/PIPE/PROGRAM/CMDS) stay on whatever the switch: the periodic "a frame's replay time" log line, the slow-frame log, the frame trace and the performance summary read them.bind_descriptors_lean()ingpu/vk/vk_draw.cpp): tracksunbindable_imageonDescWriter(an imagebind_descriptors()refuses: no sampler, or no view on a device without null descriptors, as #3032 added), useswords_same_store_lean()for fast equality/store, keeps up to 64 changed writes onchanged_stack[64]to avoid heap allocations, pre-reservesDescWriterscratch vectors, and readsg_bind_stamp_fastinlean_bind_stamp().pass_targets_eq()before callingbegin_pass(), and defersStatsQueryDrawArgscopy untilbegin().gpu/vk/switches.def): addsRX_VK_DRAW_OVERHEAD_LEAN(1ON default,0OFF legacy,checkshadow parity mode), sampled per recording viadraw_begin_recording().First files to read:
gpu/vk/draw_overhead_lean.h,gpu/vk/vk_draw.cpp(lean_bind_stamp,bind_descriptors_lean,draw),gpu/vk/upscale_route.h,gpu/vk/upscale_route.cpp,tests/test_vk_draw_overhead_lean.py.Testing
Tested:
Windows 11, NVIDIA GeForce RTX 4060 (Vulkan 1.4): 30 s live
RX_VK_DRAW_OVERHEAD_LEAN=checkparity run inmarket(Market_Child, pre-rebase commit57df33bb4):2319frames at77.3fps,189,400,000+checks (82,895,653fast skips),0mismatches,RUN_ERROR=None.Rebased build & strict checks (
a73c2ca56onorigin/main @ 455b08373):longshot-builder.exe dev compile --only renderer(270units,0failed,longshot_vk.dll17 MB) andpython -I -X utf8 tests/run_all.py --strict tests/test_vk_draw_overhead_lean.py tests/test_draw_side_effects.py tests/test_hos_ab.py tests/test_tls_objects.py tests/test_vk_braces.py tests/test_vk_ubo_ssbo_fast.py tests/test_vk_desc_span_fast.py tests/test_vk_cmd_fast.py:8 passed, 0 failed, 0 skipped.Review fixes and rebase (
64437cd7onorigin/main @ 0aeb6858, Windows, llvm-mingw clang++):vk_draw.cpppasses aclang++ -fsyntax-onlycompile with the renderer's flags;tests/run_all.py --exact tests/test_vk_draw_overhead_lean.py tests/test_draw_side_effects.py tests/test_switch_table.py tests/test_hos_ab.pyand the 7 checks that cutdraw(),draw_begin_recording()orbuild_descriptors()(test_draw_binds,test_dlss_pre_bloom,test_fallback_pipeline_state,test_draw_stream_visibility,test_recording_admission,test_fsr_uniform_ownership,test_dummy_views) pass.--changed origin/main(208 checks) was run on the first rebase; the failures it showed are fixed or were 60 s compile timeouts under the shared PC's load (see the review reply).Still to test:
@Beanstalk).main @ 0aeb6858) in the same scene and settings, several interleaved runs with frame times and lows, under normal profiling settings (the table below compares the switch on and off within one PR build).=checkrun and gameplay on this head (the RTX 4060 runs above were on57df33bb4, before theunbindable_imagechange), and the Tier 1 systems it can change: Linux/RADV, Steam Deck, AMD and Intel, with the temporal upscaler, frame generation and mesh fallback paths.Measurements
Verdict: Faster with
RX_VK_DRAW_OVERHEAD_LEANON than OFF within the same pre-rebase PR build; not yet measured as this head against its base (Still to test):+2.61%fps (-0.330 msmean frame time, 95% CI+2.11%to+3.28%across 5/5 runs;draw_ms -5.86%,cmds_ms -6.02%, non-regressing1%and0.1%lows). Switch ships at default1(ON).Setup: Windows 11, NVIDIA GeForce RTX 4060;
market(Market, child (crowded)), 804x581, Custom preset, 50% internal res (768x432), 1280x720 output, uncapped (HOS_FPS_MAX=1000),RX_VK_FRAME_TRACE=1, 5×90 s interleaved in-run A/B (HOS_AB=RX_VK_DRAW_OVERHEAD_LEAN=0,3,0) on57df33bb4(SIDE_0unset = ON vsSIDE_1=0= OFF). Rebased cleanly ontoorigin/main @ 455b08373(a73c2ca56), keepingupdate_ubo_descriptors()ongpu_bind_stamp()for standalone test extraction compatibility.RX_VK_DRAW_OVERHEAD_LEAN=0)RX_VK_DRAW_OVERHEAD_LEAN=1)79.1081.20+2.61%(CI+2.11%..+3.28%)80.9782.92+1.95fps60.3161.88+1.57fps46.5147.06+0.55fpsms)12.6424 ms12.3157 ms-0.3267 ms(-2.58%)draw_ms7.3238 ms6.8945 ms-0.4294 ms(-5.86%)cmds_ms2.4429 ms2.2958 ms-0.1471 ms(-6.02%)desc_ms2.5379 ms2.5109 ms-0.0269 ms(-1.06%)0.000.000.00Risks
RX_VK_DRAW_OVERHEAD_LEAN(=0reverts immediately to legacydraw()/bind_descriptors()/begin_pass()paths, selectable cleanly at recording boundaries), and=checkvalidates every fast skip against the legacy predicate in live runs (189.4M+checks,0mismatches). No persistent file formats, shader caches, or API structs change.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (the checks that read the changed files: see Testing).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
Tested in game: Windows 11, NVIDIA GeForce RTX 4060 (Vulkan 1.4), market (Market_Child): 30 s RX_VK_DRAW_OVERHEAD_LEAN=check (2319 frames, 77.3 fps, 189.4M+ checks, 82.9M fast skips, 0 mismatches); 5x90 s in-run A/B (81.20 ON vs 79.10 OFF fps, +2.61%, 95% CI +2.11%..+3.28%, draw_ms -5.86%, cmds_ms -6.02%); rebased head
a73c2ca56compiled (0 failed) and passed 8/8 strict tests.Possibly related, for context:
@review
Recommendation: Request changes. The default path disables draw profiling that the renderer's regular replay-time log still reports, making those diagnostic values wrong. The reported performance gain also needs a comparison against the actual base and validation on other affected systems.
The change skips work on Vulkan draws, descriptor pushes, and render-pass reuse. It adds a default-on developer switch and substantial fast-path and parity-check code; its benefit outside the reported NVIDIA test remains unmeasured.
Blocking (1): must change before merging.
gpu/vk/vk_draw.cpp:10826: The default fast path stops collecting the sampled draw phases even though the regular replay-time log continues to report them. (more on the line) Do: Preserve sampled profiling whenever the periodic replay-time report uses those counters, or change the reporting and its consumers so they do not present disabled counters as measured times.Should fix (1): not blocking, but worth doing before merging.
tests/test_vk_draw_overhead_lean.py:333: The changed-write test exercises a separate copy of the stack-selection loop rather than the implementation that sends descriptor writes. (more on the line) Do: Exercise the production changed-write selection with fake descriptor pushes, and include a mutation or regression case that fails when a changed write is omitted.Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L1 and L2.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven against the base. Five interleaved runs on the pre-rebase PR build reported 81.20 versus 79.10 fps (+2.61%), with improved lows, but compared the PR switch on and off rather than this head against its base. The runs used frame tracing, which also keeps draw profiling enabled.
Other systems: The draw and descriptor paths run on Windows and Linux across Vulkan drivers, including AMD, Intel, and Steam Deck; temporal upscalers, frame generation, mesh fallback, and diagnostic profiling also use the affected path. The supplied game run covers Windows on an RTX 4060 in one scene; it does not establish behavior or performance on the other systems.
Switches: RX_VK_DRAW_OVERHEAD_LEAN is added, default 1; 0 selects the legacy paths and check/2 enables parity checks. Its row is in switches.def. The default still needs validation against the base and on other affected hardware.
Reviewed:
a73c2ca56fagainst455b083738: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the commit and changed-file diffs, draw_overhead_lean.h, upscale_route.cpp and upscale_route.h, and selected surrounding renderer paths. Inspected the new test and the changes to the two existing tests. Skimmed the renderer architecture and standards documents and the large vk_draw.cpp file; did not read that file in full. docs/review-checklist.md is absent. No generated files or recorded runs were included in the diff.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no build, tests, scripts, or game runs were executed. The author reports an eight-test strict subset and a renderer build on the head; CI is still running.
Overlaps and merge order: Not checked; network access is unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -10616,0 +10823,4 @@perf_measure.load(std::memory_order_relaxed);draw_lean_note_check("prof_hot_needed", prof_needed == leg_prof, !prof_needed, prof_needed, leg_prof);}const bool prof_on = lean_mode != 1 || prof_needed;L1 (blocking): The default fast path stops collecting the sampled draw phases even though the regular replay-time log continues to report them.
When: With the default switch and no frame trace, fine profiling, benchmark, or performance summary, prof_on is false. The periodic "a frame's replay time" line still reads PROF_DRAW, PROF_DESC, PROF_PIPE, PROF_PROGRAM and PROF_CMDS, so those values omit the draw work and mislead diagnosis.
Do: Preserve sampled profiling whenever the periodic replay-time report uses those counters, or change the reporting and its consumers so they do not present disabled counters as measured times.
@ -0,0 +330,4 @@}static void test_changed_stack_and_pass_eq() {using namespace mkwvk;L2 (should fix): The changed-write test exercises a separate copy of the stack-selection loop rather than the implementation that sends descriptor writes.
When: If bind_descriptors_lean stops adding a changed write to its stack while retaining the checked source tokens, this harness still builds its own correct list and passes, even though the game can use a stale descriptor.
Do: Exercise the production changed-write selection with fake descriptor pushes, and include a mutation or regression case that fails when a changed write is omitted.
a73c2ca56f64437cd701Rebased onto current
main(0aeb6858) and answered the review in64437cd7(the PR's own commit is nowe555926c).L1 (blocking): fixed, sampled profiling kept.
draw()timesPROF_DRAW,PROF_PROGRAM,PROF_PIPE,PROF_DESCandPROF_CMDSwith the plain sampledPROF_HOTagain, whatever the switch;PROF_HOT_LEAN,LeanScopeGuardandprof_hot_needed()are gone. I chose this over changing the report because:gpu/vk/vk_replay.cpp,log_frame_stats), theRX_VK_SLOW_LOGline, the frame trace columns and the performance summary (perf_report.cpp) all read these counters. Hiding them from the report would take that data away from every default run;RX_VK_FRAME_TRACE=1, soprof_onwas true on both sides and the profiling skip was never part of the +2.61%;PROF_HOTis sampled already (one draw in eight takes the clock reads; the rest only bump a thread-local counter).tests/test_vk_draw_overhead_lean.pynow fails ifdraw()losesPROF_HOT(...)for any of the five phases, or ifPROF_HOT_LEANcomes back.L2 (should fix): fixed. The test no longer runs a copy of the loop. It cuts
bind_descriptors_lean(),bind_descriptors_ubo_delta(),lean_words_same_store()andstruct Pushedout ofvk_draw.cpp(srccut) and runs them against a fakevkCmdPushDescriptorSetKHRthat records every push's writes. It covers mode 1 and=check, with 1, 12, 64 and 72 writes (72 goes pastchanged_stack[64]to the heap list). Each push must carry exactly the changed writes in order, with the first and last slots changed. A repeat push sends nothing, a layout change sends the whole set, an unbindable image pushes nothing, and theubo_deltapath pushes only the dirty writes that changed. New MUST_FAIL variants of the cut source each leave a changed write out: the last stack write, the first heap write, or the last dirtyubo_deltawrite. Another publishes an unbindable set. All of them fail. The variants must now also compile, so a check catches each one, not the compiler. Seven of the old variants left a parameter unused and only failed under-Werror; they now(void)it.Rebase (mergeable=False): done, with one semantic conflict resolved. #3032 (
b6e38a13c) madebind_descriptors()refuse a combined image sampler with no view on devices withoutnullDescriptor. The lean path only checkedhas_null_sampler, so on such devices the default path would have pushed whatmaindeclines. NowDescWriter::unbindable_imageusesbind_descriptors()'s exact predicate (draw_overhead_lean::image_unbindable) and is set at all three placesbuild_descriptors()adds an image, thetex_desc_memohit included.=checkcompares it againstlegacy_unbindable_image(). A source check pins the predicate tobind_descriptors()'s line. The textual conflicts were the newswitches.defrow and the thread-locals next torec_grass_reach, whichmainremoved.Checks the PR had broken (from its first commit, not the rebase).
test_draw_binds,test_dlss_pre_bloom,test_fallback_pipeline_state,test_draw_stream_visibility,test_recording_admissionandtest_fsr_uniform_ownershipfailed on the PR and pass onmain. The description had listedtest_fallback_pipeline_stateas failing onmaintoo, which was wrong. Their fixtures now knowlean_bind_stamp()anddraw_overhead_lean_begin_recording(), anddraw()callstemporal_pre_bloomfrom one place, whichtest_dlss_pre_bloompins.test_dummy_views(#3032's) now includes the lean header for the new flag.Tested (Windows, llvm-mingw clang++, through the PC's job queue):
tests/run_all.py --changed origin/main(208 checks that read the changed files), before the fixture fixes: 196 passed, 11 failed, 11 skipped. The 11 failures were the 7 above, plus 4 compile-and-run checks that hit their 60 s timeout under load (test_jobs_wait_runs_queued,test_pipeline_cache_save,test_fallback_buffer_cleanup,test_mesh_args_cleanup).main @ b4d56f526):tests/run_all.py --exactof those 11 plustest_vk_draw_overhead_lean,test_draw_side_effects,test_switch_tableandtest_hos_ab: 15 passed, 0 failed. The same 11 on thatorigin/main: 11 passed.0aeb6858(no textual conflicts;vk_draw.cppis the same on bothmains): the same 15 gave 11 passed and 4 failed. The 4 weretest_jobs_wait_runs_queued,test_pipeline_cache_save,test_fallback_buffer_cleanupandtest_mesh_args_cleanup, each aTimeoutExpiredon its own 60 s compile, which runs at below-normal priority while the PC's build slots were full. A rerun passedtest_jobs_wait_runs_queued; the other three timed out the same way. They read onlyvk_draw.cpptext this push did not change since the run where they passed, so I count them as this PC's load, not a result. CI should confirm.vk_draw.cpppassesclang++ -fsyntax-onlywith the renderer's compile flags (llvm-mingw, from the builder's compile_commands), on this head.=checkrun on this head is still to do (L4).L3 (testing): still open. I have not measured this head against its base. The numbers in the description compare the switch on and off inside the pre-rebase PR build
57df33bb4, with the frame trace on, so they are not a base-vs-head result. I've relabelled the table to say that. Still needed: interleaved runs ofmain0aeb6858vs this head in the same scene and settings, with frame times and lows, under normal profiling settings. L1 keepsPROF_HOTon in both builds, so the frame trace no longer changes what the switch does.L4 (testing): still open. The only game coverage is the Windows RTX 4060 run: a 30 s
=checkrun with 0 mismatches and the 5×90 s A/B, both on57df33bb4, before this rebase and before theunbindable_imagechange. Linux/RADV, Steam Deck, AMD and Intel, and the upscaler/frame-generation and mesh-fallback paths still need the test farm (Beanstalk) or people with that hardware. I can't run them here.@review
@beanstalk
Beanstalk test farm · ⚠️ couldn't be judged on nvidia, windows+nvidia, amd and 3 more
Commit
64437cd· approved by HumanBean (reviewed) · dashboard⚠️ Note: The farm's noise-tolerant thresholds can detect substantial regressions but cannot establish the reported 2.6% gain or its confidence interval.
⚠️ Note: Check mode uses legacy operations for several checked paths; the default-mode pictures and timings test the shipping fast path separately.
⚠️ Note: Frame generation, vendor-SDK temporal upscalers and a forced mesh-fallback path are not exercised; the plan also does not run the standalone test suite.
Done (started 06:39 UTC, last report 13:17 UTC). Comment
@Beanstalkto run it again.nvidiawindows+nvidiaamdintellinux+radvsteamdeckCouldn'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.
nvidia, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'snvidia, 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'samd, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'samd, report 2:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'sintel, report 1:main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store'sintel, 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 plan compares the default renderer with main in the Market and Kokiri Forest, using uncapped 720p gameplay to expose CPU draw-submission costs. Three alternating starts per side measure frame times and lows; separate check-mode starts exercise parity checks and FSR 3.1, with still-scene pictures compared against main. Crashes, parity mismatch logs, substantial frame-time regressions, or excessive picture differences fail 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.
check(PR only).market-entrance(settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0; switchesHOS_OUTPUT_RES=1280x720,RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture market to compare with main, measure market-perf for 20 s (after 5 s warm-up), teleport to Kokiri Forest, take the picture forest to compare with main, measure forest-perf for 20 s (after 5 s warm-up); 3 runs on each side.market-entrance(settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0; switchesHOS_OUTPUT_RES=1280x720,RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture market-check to compare with main, set dlss to 3, take the picture market-fsr to compare with main, teleport to Kokiri Forest, take the picture forest-fsr to compare with main; 2 runs on each side.Measurements on `nvidia`, for the PR description
Verdict: could not be judged on nvidia (2 reports).
Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window+dlss+xess
NVIDIA GeForce RTX 4090, 621.40.013th Gen Intel(R) Core(TM) i7-13700K, 32 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu+window+xessNVIDIA GeForce GTX 980, 582.78.0Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAMScene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); parity-and-fsr, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, 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); default-performance: 3 game starts a side, market-perf 20 s after 5 s warm-up, forest-perf 20 s after 5 s warm-up; parity-and-fsr: 2 game starts a side; 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
RX_VK_DRAW_OVERHEAD_LEANcheckAs 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+dlss
NVIDIA GeForce RTX 5090, 621.47.0AMD Ryzen 9 9950X3D 16-Core Processor, 48 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu+window+dlss+xessNVIDIA GeForce RTX 4090, 621.40.013th Gen Intel(R) Core(TM) i7-13700K, 32 GB RAMScene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); parity-and-fsr, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, 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); default-performance: 3 game starts a side, market-perf 20 s after 5 s warm-up, forest-perf 20 s after 5 s warm-up; parity-and-fsr: 2 game starts a side; 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
RX_VK_DRAW_OVERHEAD_LEANcheckAs 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 (RADV GFX1201), 26.3.1AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMScene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); parity-and-fsr, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, 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); default-performance: 3 game starts a side, market-perf 20 s after 5 s warm-up, forest-perf 20 s after 5 s warm-up; parity-and-fsr: 2 game starts a side; 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
RX_VK_DRAW_OVERHEAD_LEANcheckAs Markdown for the PR description:
Measurements on `intel`, for the PR description
Verdict: could not be judged on intel (2 reports).
Hardware: 1: linux+intel+anv+igpu
Intel(R) Graphics (RKL GT1), 26.2.411th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM; 2: windows+intel+intel-proprietary+igpu+windowIntel(R) UHD Graphics 630, 0.404.2115Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAMScene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); parity-and-fsr, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, 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); default-performance: 3 game starts a side, market-perf 20 s after 5 s warm-up, forest-perf 20 s after 5 s warm-up; parity-and-fsr: 2 game starts a side; 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
RX_VK_DRAW_OVERHEAD_LEANcheckAs Markdown for the PR description:
Measurements on `linux+radv`, for the PR description
Verdict: could not be judged on linux+radv (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+dgpuAMD Radeon RX 9070 (RADV GFX1201), 26.3.1AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAMScene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); parity-and-fsr, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, 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); default-performance: 3 game starts a side, market-perf 20 s after 5 s warm-up, forest-perf 20 s after 5 s warm-up; parity-and-fsr: 2 game starts a side; 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
RX_VK_DRAW_OVERHEAD_LEANcheckAs Markdown for the PR description:
Measurements on `steamdeck`, for the PR description
Verdict: could not be judged on steamdeck (1 report).
Hardware: 1: linux+amd+radv+igpu+handheld
AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 16 GB RAMScene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); parity-and-fsr, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, 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); default-performance: 3 game starts a side, market-perf 20 s after 5 s warm-up, forest-perf 20 s after 5 s warm-up; parity-and-fsr: 2 game starts a side; 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
RX_VK_DRAW_OVERHEAD_LEANcheckAs Markdown for the PR description:
The testers' hardware
nvidiaNVIDIA GeForce RTX 4090, 621.40.013th Gen Intel(R) Core(TM) i7-13700K, 32 GB RAMnvidiaNVIDIA 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 RAMwindows+nvidiaNVIDIA GeForce RTX 4090, 621.40.013th Gen Intel(R) Core(TM) i7-13700K, 32 GB RAMamdAMD Radeon RX 9070 (RADV GFX1201), 26.3.1AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAMamdAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMintelIntel(R) Graphics (RKL GT1), 26.2.411th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAMintelIntel(R) UHD Graphics 630, 0.404.2115Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAMlinux+radvAMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAMlinux+radvAMD Radeon RX 9070 (RADV GFX1201), 26.3.1AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAMsteamdeckAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 16 GB RAMRecommendation: Approve. The code is ready: only testing is left. The profiling and descriptor-test fixes address the earlier code findings. The claimed performance gain still needs a comparison against the actual base, and the default-on renderer path needs broader game coverage. Recommend approval; not approved on the forge.
The change reduces Vulkan draw, descriptor and render-pass overhead while retaining sampled profiling. It adds a fast path and a diagnostic switch, at the cost of more renderer code and unmeasured cross-system behavior.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
Since the last review (on
a73c2ca56f)Resolved: L1 (The default fast path stops collecting the sampled draw phases even though the regular rep…); L2 (The changed-write test exercises a separate copy of the stack-selection loop rather than t…)
Still open: L3 (The claimed gain has not been measured against the actual base commit.); L4 (The default-on renderer change needs game coverage beyond the single NVIDIA Windows run.)
Checks: Failing on this head, which is behind its base, where it passes:
PR description / Title and description (pull_request_target).@rebase(or@fix) brings it up to date and runs it again; not held against it. Still running: 10 checks.More: does it help, other systems, switches, what was read
Does it help: Unproven against the base. Five interleaved runs on a pre-rebase PR build reported 81.20 versus 79.10 fps with the switch on versus off, a 2.61% gain; that is not a comparison of this head with main.
Other systems: The path affects graphics and compute descriptor binding, render passes, temporal upscaling and mesh fallback. Windows/NVIDIA has a pre-rebase parity run; Linux/RADV, Steam Deck, AMD, Intel and the affected upscaler and fallback paths still need coverage.
Switches: RX_VK_DRAW_OVERHEAD_LEAN is added, default 1; 0 selects legacy paths and check selects parity checks. The default's benefit and behavior remain unverified against the base and across affected systems.
Reviewed:
64437cd701against0aeb685893: Read the repository rules, contribution guide, PR template, standards, changed descriptor and profiling code, test harness, and fixture diffs; inspected the renderer diff and helper header. The large renderer file and test file were not read in full. Tooling's adjacent AGENTS.md was unavailable; the review checklist was absent.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run. The author reports a Windows syntax check and targeted checks on this head; CI is still running. The maintainer's Test Farm request could not be submitted under the read-only, network-closed rules.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
AMD Lab Market A/B: PR head
64437cd70192merged ontomainee9e1ed76, usingRX_VK_DRAW_OVERHEAD_LEAN=0(A) andRX_VK_DRAW_OVERHEAD_LEAN=1(B) on the same build.Within the run-to-run spread. Median average FPS changed by +0.72%.
0)1)Market (child), headless Linux 7.3.3-1-cachyos, Core i7-9700K, Radeon RX 580 with Mesa RADV 3:26.2.6-1, 1280x720 output at 33% 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.
The RX 580 lab can't be made cleanly CPU-bound, so fps there can hide a CPU saving: the CPU thread row is the one to read for this change. Compare its two columns.
This was merged into
mainas7cd35e4b(2026-12-04) before I got to the rebase, so there is nothing to rebase or push here and the PR description check no longer applies. Replying to what came in after my last comment:AMD Lab A/B (HumanBean, comment 102456): thanks. Switch on vs off on the same build (
64437cd70192merged ontomain @ ee9e1ed76), RX 580 / RADV, Market (child), 3 alternating pairs:61.18→61.62(+0.72%), within the run-to-run spread; p99 frame time19.41→18.97 ms.9.38 / 9.46 / 9.39 ms→9.11 / 9.01 / 9.16 ms, about 3% less CPU time a frame. GPU time stays at about12.2 ms, so that box is GPU-limited and the fps hides the saving.BeanBot L3 (base vs head): still not measured. Both A/B runs so far (my RTX 4060 one and the AMD Lab one) compare the switch on and off inside one build. The open measurement is now
mainjust before7cd35e4bagainst7cd35e4b, same scene and settings, several interleaved runs with frame times and lows.BeanBot L4 (game coverage): also still open. Apart from the RX 580 run above, nothing has run on Linux/RADV gameplay with pictures compared, Steam Deck, Intel, or the temporal upscaler, frame generation and mesh fallback paths. That needs the farm or people with that hardware; I only have a Windows RTX 4060.
Beanstalk (comment 101963): no target could be judged. Every report stopped in baseline setup on
main'stools.lockline 32 (SDL store URLs), so it says nothing about this change. A re-run needs a BigBeans member to start Beanstalk again once that is fixed.If any of this shows a regression,
RX_VK_DRAW_OVERHEAD_LEAN=0brings back the old draw, descriptor and pass paths (gpu/vk/switches.def:360), and=checkcompares the fast path against the old one.