perf(vk): eliminate per-draw QPC, scene mutexes, desc_slots_kept scans, Targets copies, and short-payload overhead (RX_VK_DRAW_SELF_FAST) #2958
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
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2958
Loading…
Reference in a new issue
No description provided.
Delete branch "siantm/Longshot:perf/vk-draw-self-fast"
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 per-draw CPU overhead outside the descriptor/command/pipeline scopes (
RX_VK_DRAW_SELF_FAST, default1, supporting in-runHOS_ABflipping per recording):gp_table_check_logQPC (gpu/vk/vk_draw.cpp): Skipssteady_clock::now()on every draw unlessfinalor every 4096th tick, removing ~3,500 unnecessary clock queries per frame. WithRX_VK_DRAW_OVERHEAD_LEAN=1(main's default since #3048), whose draw already calls it once in 4096 draws, this second sampling is skipped.gpu/vk/vk_temporal.cpp,gpu/vk/vk_fsr3_inputs.cpp,gpu/vk/upscale_route.h/.cpp): Checks atomic(fast_cam_frame, fast_cam_area)before takings.muwhen the frame's camera is already captured (invalidated cleanly alongsides.cam.valid), and keeps a yes fromupscale_route::wanted()for the recording (an expired request is still cleared for main'swanted_fast()).desc_slots_kept()k.reg == reg_genfast-exit &ubo_deltacleanup (gpu/vk/vk_draw.cpp): Short-circuitsdesc_slots_kept()whenk.reg == reg_gen, evaluatesdesc_slots_kept()once instead of twice acrosssame_desc/ubo_delta(reuse_base/slots_ok, which also carry main's texture-pack generationpgen), cachesdesc_slotgen_on()per recording and staticwrites_ssboperconst Program*(in a TLS sidecar cache leavingProgramunchanged), and skips the redundantcb.desc.fpvector copy onubo_deltahits. (Thegfx_sampled()copy skipped onubo_deltais main's since #2949, underRX_VK_CMD_FAST.)Targets&color_types[8](gpu/vk/vk_draw.cpp): Avoids repeated 336-byteTargetsby-value copies andcolor_types_of()recomputations per draw whens.rt_serialand viewport are unchanged.gpu/vk/vk_replay.cpp):read_bind_bufs()andread_bind_handles()copy only the live header +b.nentries without zero-filling unused array tails or hitting cold fallback paths on normal short payloads.Read first:
gpu/vk/vk_draw.cpp(draw_self_fast_begin_recording,gp_table_check_log,desc_slots_kept,targets_ref,draw),gpu/vk/vk_temporal.cpp,gpu/vk/vk_fsr3_inputs.cpp,gpu/vk/upscale_route.cpp, andgpu/vk/vk_replay.cpp.Assisted-by: Antigravity
Testing
Tested: Windows 11, NVIDIA GeForce RTX 4060 (
build-windows/rt-Longshot,v3.2.0-189-g461c67789onmain @ 55773e361):HOS_AB(147periods,30,085frames): 5/5 individual runs won (-1.05%to-1.69%), 0 crashes, 0 runtime/Vulkan errors,0.00frames >= 50 ms on both sides.python -X utf8 -I tests/test_vk_draw_self_fast.py --cxx clang++:PASS(0failures; verifies source wiring,HOS_ABtoggle, all fast-path parities, and 5 broken-variant catches).python -X utf8 -I tests/test_draw_side_effects.py:PASS.python -X utf8 -I tests/test_hos_ab.py --cc clang:PASS(RX_VK_DRAW_SELF_FASTwired viahost->ab_value).python -X utf8 -I tests/test_tls_objects.py&tests/test_thinlto_tls.py --cxx clang++:PASS.python -X utf8 -I tests/test_run_all_declarations.py:PASS.main @ 7bc53f84, where main'sRX_VK_DRAW_OVERHEAD_LEAN(#3048) and Sharpness (#3118) meet this PR: main's leanpass_hitcheck and its=checkcomparison use this PR'sdraw_depth_layout(the draw's layout is no longer written intoat), and bothbegin_passcalls pass it;build_descriptorskeeps main'sdesc_fp()reserve withdesc_slotgen_cached();upscale_route::wanted()keeps main'sg_wanted_atand clears an expired request; the lock-free exit intemporal_note_scene_drawleaves out main's Sharpness-only scene, as the locked early return does;gp_table_check_log's own sampling applies only when the lean switch is 0 or check. (The earlier rebase ontoa98cf28a:begin_pass'sRX_VK_CMD_FASTsame-target check compares thedepth_layoutoverride;same_desc/ubo_deltakeep main'spgenthroughreuse_base;temporal_note_scene_drawkeeps main's world-layer camera; the checks reading the reshaped source were updated.)7bc53f84(Windows, throughdev.py queue):vk_draw.cpp,vk_replay.cpp,vk_temporal.cpp,vk_fsr3_inputs.cpp,upscale_route.cpp) passclang++ -fsyntax-onlywith the build plan's exact commands.tests/run_all.py --exact tests/test_vk_draw_self_fast.py tests/test_vk_draw_overhead_lean.py tests/test_hos_ab.py tests/test_switch_table.py: 4 passed (test_vk_draw_self_fastnow also catches a doubledgp_table_check_logsampling and an expiredwanted()request left set).tests/run_all.py --changed origin/main: 345 passed, 7 failed, 14 skipped. The 7 (test_present_acquire_ahead,test_present_held_image,test_present_geometry_trace,test_present_image_free,test_sync_watch_event,test_turf_budget,test_dlssg) fail the same way on main7bc53f84.Tested by others:
RX_VK_DRAW_SELF_FAST=0against1on461c677, three alternating pairs of 40 s: within the run-to-run spread. Median average FPS 54.88 → 54.69 (−0.35 %), p99 frame time 41.36 → 48.00 ms, frames of 50 ms or more 4 / 16 / 18 against 25 / 14 / 12; the harness flagged pipeline or shader activity in 11 / 34 / 67 and 96 / 39 / 59 frames.draw_ms−3.8 % to −4.6 % over three paired samples, and −2.6 % to −5.2 % in a build without #2946.461c677against main55773e3, Market and Kokiri Forest (FSR 3.1): passed on every target. p99 frame time windows+nvidia 15.7 → 10.3 ms, linux+nvidia 18.6 → 18.7, windows+amd 44.9 → 44.0, linux+radv 37.6 → 37.2, intel 235.0 → 239.6, steamdeck 45.7 → 47.3. One Windows AMD PC and one Windows Intel PC crashed on both sides in every start, so those two reports say nothing about the PR.Still to test:
gfx_sampled()skip they included is main's (#2949), and main'sRX_VK_DRAW_OVERHEAD_LEAN(#3048) now skips some of the same per-draw work (thegp_table_check_logcalls, the scene-draw hooks when nothing wants them), so the switch's own share is smaller than the table shows until it is measured again.Measurements
Verdict: Faster: +1.39% FPS (
-0.188 msmean frame time, 95% CI+0.73% to +2.09%strictly excluding 0 across 147 paired periods),-2.79%draw_ms(-0.218 ms),-8.64%wait_gpu_ms(-0.214 ms),+1.21%P50 FPS (76.10 vs 75.19), and+0.23%1% Low FPS (60.13 vs 59.99), with all 5/5 runs winning. Ships enabled by default (RX_VK_DRAW_SELF_FAST=1).Setup: Windows 11, NVIDIA RTX 4060;
Market, child (crowded)(1280x720, 50% internal res768x432, V-Sync Off, Framegen Off,HOS_FPS_MAX=1000,RX_VK_FRAME_TRACE=1), 5x90s runs after pipeline warm-up (147paired 3 sHOS_ABperiods,15,140ON /14,945OFF frames;dev.py ab+perf.py ab).Baseline: Both sides ran on the same build (
v3.2.0-189-g461c67789onmain @ 55773e361) flippingRX_VK_DRAW_SELF_FASTevery 3 s within each run (HOS_AB=RX_VK_DRAW_SELF_FAST=0,3,0).461c6778461c6778draw_msmeancmds_msmeandesc_msmeanmain_cpu_msmeanwait_gpu_msmean(Pooled 0.1% Low was
50.13ON vs51.81OFF FPS across 15 worst Market crowd frames per side with normaldraw_ms7–10 msandgame_ms11–19 ms;p99anddraw_ms/cmds_ms/desc_msall improved cleanly across all 5 runs.)Risks
fast_cam_frameatomics mirror everys.cam.validinvalidation point;desc_slots_kept()only short-circuits whenreg_genitself is unchanged; sidecar caches keepProgramsize and translator stamp unchanged.RX_VK_DRAW_SELF_FAST=0(or reverted).Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (the whole suite has not run on this branch; Testing lists the checks that ran).main, or Measurements says why there is nothing to measure (RX_VK_DRAW_SELF_FAST=0vs unset via in-runHOS_ABonmain @ 55773e361).third_party/untouched; nothing GPL-incompatible.When it applies
gpu/vk/switches.def(RX_VK_DRAW_SELF_FAST).Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Tested in game: Market CPU-bound 5x90s in-run HOS_AB (147 periods): +1.39% FPS (74.8 vs 73.8, 95% CI +0.73%..+2.09%), -2.79% draw_ms, -8.64% wait_gpu_ms, +0.23% 1% Low
#2958: Deck measurement
Steam Deck LCD (RADV VANGOGH, Mesa 26.2.0-devel), 2026-12-01. Build: base
87045899plus a dev-pack ofmainwith #2954 and #2958 merged. Settings: 1280x800 output, 50 % render (640x400), the game's own upscaler, preset Custom/0, no V-Sync, no cap. Same save, slot and route as my other Deck runs; play window 30-97 % of each trace. Separate interleaved launches, becauseHOS_AB's thread does not start here yet (glibc refuses the 64 KiB stack; this host binary's static TLS block is 61,936 bytes; fix in review as #2971).3 runs a side, both switches off in the off arm (
RX_VK_PROG_FAST=0 RX_VK_DRAW_SELF_FAST=0): fps 37.03 against 36.69 (+0.94 %, p 0.25), median 26.70 against 27.09 ms (-0.39 ms, p 0.05).draw_msover three paired samples: 9.75-9.91 ms against 10.19-10.30 ms, -4.2 %, -4.6 %, -3.8 %, every sample the same direction. That is 0.3-0.5 ms of a 10.2 ms phase, and the draw phase is the largest host phase we measure on this hardware (10.1 ms of a 27 ms frame at 50 % render, 10.2 ms of 31 ms at 100 %).In a build with #2952 but not #2946, the same draw saving is still visible (-2.6 to -5.2 %), so it does not depend on #2946's mesh fast paths. Queue note: #2958 conflicts with #2946 and #2958's test file overlaps #2952's (
tests/test_hos_ab.py), but it merges cleanly with #2932 and with #2952 apart from that test.@review
Recommendation: Approve. The code is ready: only testing is left. The Windows A/B shows a small improvement between two modes of this branch, but it does not measure the whole change against main. Rendering parity and the default’s effect on the remaining Tier 1 systems are still unverified. Recommend approval; not approved on the forge.
The change reduces work in Vulkan draw recording and replay through several caches and short-payload copies. It adds a default-on kill switch and substantial cache and synchronization logic; the measured Windows A/B reports 1.39% higher average FPS and 0.23% higher 1% low.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
Checks: Still running: 10 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven against main. The PR reports five Windows RTX 4060 in-run A/B tests, with mean frame time falling from 13.56 to 13.37 ms, but both sides use this branch and some changed work also runs with the switch off. The Deck report combines this PR with other changes and reports +0.94% FPS with p=0.25, so it does not isolate the gain.
Other systems: The changed paths run throughout Vulkan replay, including temporal upscalers, descriptor reuse, render targets and buffer and texture binding. The supplied runs cover Windows NVIDIA and a combined Steam Deck build; Linux NVIDIA and Windows and Linux AMD parity and performance remain outstanding.
Switches: RX_VK_DRAW_SELF_FAST is added as a kill switch, default on, sampled at each recording and available to HOS_AB. Its table row is present; the default is supported by the Windows branch A/B but is not yet established against main or across the affected Tier 1 systems.
Reviewed:
461c677897against55773e3613: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the commit, the production diff, upscale_route files, and selected surrounding replay, draw, registration and test code. Skimmed the large new test and did not read every changed code file in full; docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No recorded runs or generated files were included in the diff.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no builds, tests or project scripts were run. The author reports Windows checks and gameplay; CI is still running.
Overlaps and merge order: The Deck tester reports conflicts with #2946 and an overlap in tests/test_hos_ab.py with #2952; merge order is not established.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
Thank you @omgitsgela for running the Steam Deck LCD (RADV) comparison showing the independent -2.6% to -5.2%
draw_mssaving even without #2946, and thank you @BeanBot for the review and approval recommendation. Acknowledged on L1/L2 (interleaved base-vs-HEAD measurements at player settings and Tier-1 Linux NVIDIA / Windows & Linux AMD parity/perf). Happy to rebase cleanly onto whichever merge order maintainers select between #2946, #2952, and #2958.@beanstalk
Beanstalk test farm · an earlier run: commit
461c677(the newer results are in a comment below)Commit
461c677· approved by HumanBean (reviewed) · dashboard⚠️ Note: The farm does not measure the reported per-draw CPU phase or reproduce the in-run switch-flipping confidence interval, so it may not resolve the claimed roughly 1% gain.
⚠️ Note: The plan selects FSR 3.1 but does not cover the SDK-dependent DLSS or FSR 4 paths, or run the standalone test suite.
Done (started 2026-12-02 16:12 UTC, last report 11:38 UTC). Comment
@Beanstalkto run it again.windows+nvidialinux+nvidiawindows+amdlinux+radvintelsteamdeckCouldn'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.
windows+amd, report 2:Insufficient frame-time evidence for 5 required comparison(s). See rule results.intel, report 1:Insufficient frame-time evidence for 5 required comparison(s). See rule results.What was tested
What will be tested · AI plan (
gpt-6.1-terra)The farm will compare main and the PR in the crowded Market and Kokiri Forest on NVIDIA, AMD, Intel and Steam Deck targets, including the named Windows and Linux driver paths. Three alternating starts per side will capture stationary pictures and measure 30-second uncapped frame-time and FPS segments at a CPU-oriented 720p resolution; the forest segment also selects FSR 3.1. Crashes, Vulkan device loss, substantial picture differences, or a frame-time regression over 15% will fail the PR. The reported small speed-up may be below the noise of these comparisons. No tester online now matches linux+nvidia: that target waits for one.
market-entrance(settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switchesHOS_OUTPUT_RES=1280x720,RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture market to compare with main, measure market for 30 s (after 10 s warm-up), set dlss to 3, teleport to Kokiri Forest, take the picture forest-fsr3 to compare with main, measure forest-fsr3 for 30 s (after 10 s warm-up); 3 runs on each side.Measurements on `windows+nvidia`, for the PR description
Verdict: pass on windows+nvidia (2 reports): no rule failed and no PR run crashed.
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+windowNVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMScene: draw-replay, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=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); draw-replay: 3 game starts a side, market 30 s after 10 s warm-up, forest-fsr3 30 s after 10 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)55773e3461c677Flags 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: pass on linux+nvidia (2 reports): no rule failed and no PR run crashed.
Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu
NVIDIA GeForce GTX 1660 Ti, 620.73.4Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, 16 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 5070, 620.73.4AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMScene: draw-replay, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=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); draw-replay: 3 game starts a side, market 30 s after 10 s warm-up, forest-fsr3 30 s after 10 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)55773e3461c677Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `windows+amd`, for the PR description
Verdict: pass on windows+amd (2 reports): no rule failed and no PR run crashed.
Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4
AMD Radeon RX 9070 XT, 2.0.416AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM; 2: windows+amd+amd-proprietary+igpu+window+xessAMD Radeon(TM) Graphics, 2.0.279AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAMScene: draw-replay, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=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); draw-replay: 3 game starts a side, market 30 s after 10 s warm-up, forest-fsr3 30 s after 10 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)55773e3461c677Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `linux+radv`, for the PR description
Verdict: pass on linux+radv (2 reports): no rule failed and no PR run crashed.
Hardware: 1: linux+amd+radv+dgpu
AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAMScene: draw-replay, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=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); draw-replay: 3 game starts a side, market 30 s after 10 s warm-up, forest-fsr3 30 s after 10 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)55773e3461c677Flags 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: pass on intel (2 reports): no rule failed and no PR run crashed.
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: draw-replay, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=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); draw-replay: 3 game starts a side, market 30 s after 10 s warm-up, forest-fsr3 30 s after 10 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)55773e3461c677Flags 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: pass on steamdeck (2 reports): no rule failed and no PR run crashed.
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, 16 GB RAMScene: draw-replay, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=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); draw-replay: 3 game starts a side, market 30 s after 10 s warm-up, forest-fsr3 30 s after 10 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)55773e3461c677Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
The testers' hardware
windows+nvidiaNVIDIA GeForce RTX 4090, 621.40.013th Gen Intel(R) Core(TM) i7-13700K, 32 GB RAMwindows+nvidiaNVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMlinux+nvidiaNVIDIA GeForce GTX 1660 Ti, 620.73.4Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, 16 GB RAMlinux+nvidiaNVIDIA GeForce RTX 5070, 620.73.4AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAMwindows+amdAMD Radeon RX 9070 XT, 2.0.416AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAMwindows+amdAMD Radeon(TM) Graphics, 2.0.279AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAMlinux+radvAMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAMlinux+radvAMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1AMD Ryzen 7 5700X3D 8-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 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, 16 GB RAMAMD Lab Market A/B on PR head
461c6778970f, usingRX_VK_DRAW_SELF_FAST=0andRX_VK_DRAW_SELF_FAST=1on the same build.Within the run-to-run spread. Median average FPS changed by -0.35%.
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 and 50% (640x360) render scale, uncapped with V-Sync and frame generation off. Three alternating pairs, 40 seconds per capture after warm-up.
After warm-up, the harness still flagged pipeline or shader activity in 11 / 34 / 67 frames on side A and 96 / 39 / 59 on side B across the three captures. The FPS and tail numbers include those frames.
461c677897aa94e69a8bBeanstalk test farm
Commit
eeff19c· approved by nobody yet · dashboardA member of
BigBeanscan review this commit and comment@Beanstalkto test it.Rebased onto main @
a98cf28a(the branch wasmergeable=False) and pushedaa94e69a.The rebase
begin_pass: main's same-target check underRX_VK_CMD_FAST(rt_serial) now also compares this PR'sdepth_layoutoverride.same_descandubo_deltakeep main's texture-pack generation (pgen) throughreuse_base.gfx_sampled()copy skip onubo_deltahits is main's since #2949, underRX_VK_CMD_FAST, so this PR no longer carries its own copy.temporal_note_scene_drawkeeps main's world-layer camera. The lock-free exit returns only where the locked early return already did, so a draw that would setworld_camstill reaches it.Checks that read the changed code
test_bc_raw_targets,test_device_policy,test_readback_early,test_texture_pack,test_vk_occlusion_queries,test_rgba16f_scene_offandtest_rgba16f_scene_fsr3_fgfollow the reshaped source.test_draw_stream_visibility,test_fsr_uniform_ownershipandtest_recording_admissioncopydraw_begin_recording(), which now also resetsbare_targets_serial; they declare it.test_vk_draw_self_fast's scene-draw fixture stubs main's world-layer and screen-effect queries and hasworld_cam.Results on Windows, through
dev.py queue:vk_draw.cpp,vk_replay.cpp,vk_temporal.cpp,vk_fsr3_inputs.cpp,upscale_route.cpp) passclang++ -fsyntax-onlywith the build's flags.tests/run_all.py --changed origin/mainon main1c91b18f: 341 passed, 1 failed, 14 skipped.test_switch_tablefails here, and the same way on main1c91b18fanda98cf28a:LONGSHOT_SANDBOX_PROGRAMDATA(host/sandbox_win_plan.h:41) has no row ingpu/vk/switches.def.a98cf28a, which changed none of this PR's files,test_intel_quick_compute(the one check main changed among those that read this PR's files) passes.Results from others
=0against=1: −0.35 % median FPS, within the run-to-run spread. Thanks. The p99 41.36 → 48.00 ms goes with more frames flagged for pipeline or shader activity on the=1side (96 / 39 / 59 against 11 / 34 / 67), so I can't separate the switch from compile stalls in that number.Still open (I can't run these here: one Windows RTX 4060, shared GPU queue)
gfx_sampled()skip they included is main's, this switch's own share is smaller than the table shows until it is measured again.Please rebase!
aa94e69a8beeff19c23dNew commits pushed, approval review dismissed automatically according to repository settings
Rebased onto main
7bc53f84and pushedeeff19c2(wasaa94e69a). @HumanBean, your approval is onaa94e69a, the old head; the resolution below changes code, so it may want another look.Conflicts (main's
RX_VK_DRAW_OVERHEAD_LEAN#3048 and Sharpness #3118 touch the same lines)draw(), beforebegin_pass: main's leanpass_hitcheck comparedat.depth_layout. This PR no longer writes the draw's depth layout intoat(it passesdraw_depth_layouttobegin_pass), so the lean check, its=checklegacy comparison and bothbegin_passcalls usedraw_depth_layout.build_descriptors: main'sdesc_fp().reserve(32)stays, next to this PR's per-recordingdesc_slotgen_cached().upscale_route::wanted(): main'sg_wanted_atstays, and so does its clearing of an expired request (whichwanted_fast()reads). This PR's per-recording cache now keeps only a yes, so an expired request is still cleared.temporal_note_scene_draw: the lock-free exit leaves out main's Sharpness-only scene (sharpen_only), as the locked early return does.gp_table_check_log(no textual conflict): withRX_VK_DRAW_OVERHEAD_LEAN=1, main's default, the draw already calls it once in 4096 draws, and this PR's own 1-in-4096 would have made that once in about 16.7M. It now applies only when the lean switch is 0 orcheck.switches.defandtest_hos_ab.py'sWIRED: both rows kept.test_vk_draw_self_fast.pyfollows these changes (eeff19c2). It has a broken variant for the doubled sampling and checks that an expiredwanted()request is cleared.Checks (Windows, through
dev.py queue)tests/run_all.py --exact tests/test_vk_draw_self_fast.py tests/test_vk_draw_overhead_lean.py tests/test_hos_ab.py tests/test_switch_table.py: 4 passed.vk_draw.cpp,vk_replay.cpp,vk_temporal.cpp,vk_fsr3_inputs.cppandupscale_route.cpppassclang++ -fsyntax-onlywith the build plan's exact commands.tests/run_all.py --changed origin/main: 345 passed, 7 failed, 14 skipped. The 7 (test_present_acquire_ahead,test_present_held_image,test_present_geometry_trace,test_present_image_free,test_sync_watch_event,test_turf_budget,test_dlssg) fail the same way on main7bc53f84. For example, their fixtures don't declaresettings_startororder_watch_on.Still open
461c677. Main's lean switch now skips some of the same per-draw work, so this switch's own share on current main needs measuring again. I updated Testing in the description to say so.eeff19cneeds a BigBeans member to start it.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.