perf(vk): Threaded rendering's Auto runs the recorder thread from 4 cores, not 6 #2232
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2232
Loading…
Reference in a new issue
No description provided.
Delete branch "klimovich008/Longshot:perf/auto-recorder-4-cores"
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
On a PC whose CPU has 4 or 5 physical cores, Threaded rendering's Auto runs the render thread alone today, so that one
thread makes every one of the driver's calls itself. This PR makes Auto run the recorder thread beside it from 4 cores,
as it already does from 6. WIP until the Test Farm and players have run it on real 4-core PCs: the numbers below
come from one 8-core PC held to 4 cores by an affinity mask. They are a diagnostic, not the claim.
Who changes and who doesn't. Only PCs where all of these hold change:
device_policy.hp.mirrors = f.discrete());Nothing changes on:
menu's
threaded_choiceturns Auto off for that reason, on main and here alike. The start line saysvk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)on both builds;The rule (
gpu/vk/threaded_rendering.h, from #1664):kAutoCores= 4 gives both threads from 4 cores and off below.The "render thread alone" tier is gone (
Why::AutoRenderThread, itsdescribecase, its half ofauto_picked).The header keeps the 18 Nov table as the record and puts the 22 Nov masked numbers beside it, labelled as masks of an
8-core CPU.
Neighbours: #1407 (riqmarmes, WIP) asks the same header's question for low-core CPUs, for the mode's own threshold,
before #1664's tiers. #1763 and #1866 rewrote the threads and the recorder after #1664's table was measured. That is
why the 4-core tier is being looked at again.
Read first:
gpu/vk/threaded_rendering.h(auto_picks), thentests/test_threaded_rendering.py.Other files: the words that named the tiers (
gpu/vk/menu/threads.cpp,vk_menu.h,vk_menu.cpp,device_policy.h,vk_replay.cpp,vk_recorder.h,switches.def,docs/dev/reference/threads.md,architecture.md,switches.md,docs/user/graphics-and-controls.md), andtests/test_device_policy.py's five 4-core PCs.Testing
Tested: Windows 11, Ryzen 7 5700X3D (8 cores, 16 threads), RX 9070 XT, AMD 26.11.2.
In the game: Hyrule Field turning, 3 alternating pairs held to 4 cores by the process's affinity mask (
0xff: 4cores with their SMT siblings), and one pair unmasked. Every masked run logged the line its build should:
Auto: the render thread only (4 cores of 8 logical processors; the recorder thread too from 6 cores);Auto: on, the render thread and the recorder thread (4 cores of 8 logical processors).Unmasked, both builds log the same line (
Auto: on, the render thread and the recorder thread (8 cores of 16 logical processors)). The clock read 0.999-1.001 in every run. There were no new error lines in the PR's logs against main's.Every run passed the harness's screen check.
tests/test_threaded_rendering.py, with g++ and clang++: the rule, the readers and the menu'sthreaded_choicearerun whole, in 15 environments, with 39 broken copies, each caught. The menu's cases include:
RX_VK_CAPTURE=0,RX_VK_LOW_SPEC,RX_VK_DUMPorRX_VK_BENCH.This branch's test fails on main's code.
tests/test_device_policy.py, with both compilers: it passes after merging maina2dc5385.Failures that main has too:
tests/test_switch_table.pyfails onRX_VK_GRASS_DISTANCE's order inswitches.def, a line this PR doesn't touch.run_all.py, run ondd5ffe6a, the branch has no failure that main lacks.mise run lint's only failure is main's own (shellcheck on.forgejo/workflows/build-windows.yml).menu/threads.cpp,threaded_rendering.handvk_recorder.hbeside thefiles it already lists on main (main
a2dc5385fails it with 10). Threaded rendering is on the Debug tab, not thepictured Graphics view, and
vk_recorder.h's change is a comment.linux_syntax.sh(clang 21): ok onmenu/threads.cpp,vk_menu.cpp,vk_replay.cppandvk_progcache.cpp.Still to test:
Linux): main against this PR, both on Auto with no switch, uncapped, in Hyrule Field and the Market. Expected: fps up
and p99 down or level, with no more frames over 50 or 100 ms. The start line should read as under Tested
(
@Beanstalk, request below).(by hand).
i7-9700K's did before #1866): the same comparison (
@Beanstalkif the farm has one, else by hand).builds. A separate, data-only question for Deck players (forced recorder thread against Auto, both on this PR's
build) is in a comment below. It informs a possible later Deck change and is not this PR's claim (by hand).
Measurements
Verdict: on this PC held to 4 cores with SMT (
--affinity 0xff), +21.0 % fps in Hyrule Field, p99 4.3 ms lower.This is a mask of an 8-core CPU (its 96 MB cache is kept, and the driver's and Windows' threads run on the other 4
cores), a diagnostic, not the claim: real 4-core CPUs are for the farm. Unmasked (8 cores), both builds run the same
mode.
Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2. Hyrule Field turning.
HOS_FPS_MAX=240with the optionsfile's
frame_rate_cap=0,vsync=0,frame_generation=0, a fixed light GPU load beside the game, andRX_VK_ASYNC=1in both arms. Three alternating pairs, no warm-ups, no run rejected, medians. The PR's side is a pack built from
43280cfa; every later gpu/ change on the branch is a comment. Both sides used the same exe.These were measured on main
dd5ffe6a, and the PR is now on maina2dc5385. Main's 7 commits since then don't touch theThreaded rendering rule, the recorder or the replay's submit. #2174 changes Hyrule Field's simulated turf on the way in,
so the absolute numbers may move. Not re-measured here: the farm runs the head.
--affinity 0xff(4 cores, 8 logical; a mask of an 8-core CPU)dd5ffe6a43280cfaThe GPU clock was 3001 MHz on main's side and 3208 MHz on this PR's. The game is CPU-bound here, and AMD's clock rises
with GPU work.
On the unmasked pair (one run each, 8 cores, the same mode on both builds), the gap was 86.29 → 92.34 fps. The code
path is the same there, so that gap is one pair's noise, not this change. It shows that a few % in any single pair can
be noise.
Risks
recorder beside the render thread was the slowest of the three modes, with a third of the frames long. On today's
code, masked, this PC shows no more frames over 50 or 100 ms. The farm's Market run on real 4-core CPUs is the check.
control slow every core before #1866. A power-saving 4-core laptop is where that could come back.
virtual cores follow the render thread, unchanged (no host file changes).
/sys's CPU topology can't be read,usable_coresfalls back to the logical count, soa 2-core, 4-thread PC there now gets both threads (it got the render thread alone).
RX_VK_RECORDER=0for the recorder alone. A revert is enough.Nothing changes in saves,
longshot_options.inior the caches (no shader-cache stamp file touched).Follow-ups, older than this change, not in it:
vk_recorder.h:8says unsetRX_VK_RECORDERis off. The row decides.threads.md:44calls the hand-off by part unmeasured.vk_menu.cpp's comment lists GCN among unmirrored GPUs, but an RX 580 has mirrors.steam-deck-playbook.md:107puts "measured the same or worse" under Auto, but Auto is Off on a stock Deck. It shouldsay On.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
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.🤖 Generated with Claude Code
- tests/test_threaded_rendering.py: the capture's switch must be read (getenv("RX_VK_CAPTURE")), with a broken copy that reads nothing. - threaded_rendering.h: the 22 Nov runs had the frame rate held only by HOS_FPS_MAX=240 and the standard test's light GPU load beside the game; #1866's recorder waits on its ring after a 10 us spin where it spun 20-200 us. - The settings paragraph, threads.md's "Who records" and architecture.md's threads line say Auto's threads come only where its mode is safe (an integrated GPU's pools have no mirrors: Auto stays off there); threads.md's start line has no counts on an unsafe run. Co-Authored-By: Claude Opus 5.5 <[email protected]>a2dc5385) into perf/auto-recorder-4-coresTested in game: Windows 11, Ryzen 7 5700X3D (8C/16T), RX 9070 XT, AMD 26.11.2: Hyrule Field turning, uncapped (HOS_FPS_MAX=240), 3 alternating pairs held to 4 cores by the affinity mask 0xff (a mask of an 8-core CPU: a diagnostic, not the claim) and one unmasked pair. Each run's 'vk: Threaded rendering:' start line was the one its build should log (main: the render thread only; this PR: the render thread and the recorder thread; unmasked: both threads on both). Game clock 0.999-1.001, no new error lines against main, the picture shown in every run. Not run on a real 4-core CPU, on NVIDIA or Intel, on Linux in the game, or on a Steam Deck (where this PR changes nothing).
@Beanstalk main against this PR, both on Threaded rendering Auto, no switch on either side: this PR changes what Auto picks on CPUs with 4 or 5 physical cores and a discrete GPU, so only those PCs can show a difference.
Targets: PCs with a discrete GPU (the dgpu tag) and a CPU of 4 physical cores or fewer, by model. With SMT (4C/8T): i7-6700K, i7-7700K, i7-6700, i7-7700, i3-10100, i3-12100, i3-13100, Ryzen 3 3300X. Without SMT (4C/4T): i5-6500, i5-6600K, i5-7400, i5-7500, i5-7600K, Ryzen 3 1200, 1300X, 3100. An NVIDIA and an AMD card if the testers have them, Windows and Linux both. 2- and 3-core PCs log the same "Auto: off" line on both builds, and 6-core and bigger PCs run both threads on both builds: those compare the same mode. No Steam Deck target here (Auto is off there on both builds: no mirrors).
Settings, both sides: frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0. Headless is fine (the change is in the replay, not the present path); no window scenario.
Scenario: Hyrule Field (HyruleField_Child) measured 30 s, then the Market (Market_Child) measured 30 s in the same start; 3 game starts a side (2 at least). Rules, PR vs main: fps_mean.min_delta_pct = 5 and frametime_p99_ms.max_delta_pct = 10 on each segment, crash = false. Hitch counts (run_hitch_count, run_frametime_max_ms) report-only.
Log check on the PR side: "vk: Threaded rendering: Auto: on, the render thread and the recorder thread (4 cores" expected, and main's "Auto: the render thread only (4 cores" shown, so we can see the tester's PC was in the tier that changes.
Beanstalk test farm · an earlier run: commit
f554451(the newer results are in a comment below)Commit
f554451· approved by klimovich008 (reviewed) · dashboard⚠️ Note: The model groups permit either operating system and GPU maker, but do not guarantee coverage of both; none of the listed CPUs appears in the current online inventory.
⚠️ Note: Threaded rendering uses its default Auto value because it is not an exposed plan setting; the main-side Auto line is available in its log but cannot be separately enforced by a PR-only expected-log rule.
⚠️ Note: The farm cannot select a power-saving plan or target an unspecified four-core laptop.
Started.
⚠ No tester has a PC for
dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200(none seen in 14 days): it waits until one signs in.dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k(CPU "3300x" or "i3 10100" or "i3 12100" or "i3 13100" or "i7 6700" or "i7 6700k" or "i7 7700" or "i7 7700k")dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200(CPU "1300x" or "3100" or "i5 6500" or "i5 6600k" or "i5 7400" or "i5 7500" or "i5 7600k" or "ryzen 3 1200")What was tested
What will be tested · AI plan (
gpt-6.1-terra)Compare main and the PR on discrete-GPU PCs with the requested four-core CPU models, using Threaded rendering Auto with no switches. Three starts per build measure 30 seconds each in Hyrule Field and the Market, taking roughly 32 minutes per tester; no matching CPU is currently online, so the targets will wait. The PR fails on a crash, a missing expected Auto-mode log line, a 5% FPS loss, a 10% p99 frame-time increase, or a substantial screenshot difference. Whole-run hitch counts and maximum frame times are reported without limits. No tester online now matches dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k, dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200: those targets wait for one.
castle-gate(settings vsync=2, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, measure field for 30 s (after 10 s warm-up), take the picture field to compare with main, teleport to Market, measure market for 30 s (after 10 s warm-up), take the picture market to compare with main; 3 runs on each side.Steam Deck: data only, not this PR's claim.
This PR changes nothing on the Deck. The Deck's GPU is integrated, so the buffer pools have no mirrors, and Auto stays off for that reason on main and on this PR alike. The start line reads
vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)on both. A run of main against this PR on Auto would compare the same mode on both sides.Deck players who'd like to help with a possible later Deck change can answer a separate question. It is about the recorder thread alone, with the render thread left off. Both runs use this PR's build:
RX_VK_RECORDER=threadas the only line inlongshot_env.txt.Play the same spot uncapped (Frame rate cap Uncapped, V-Sync Off, no frame generation), Hyrule Field and the Market if you can, 2-3 times each, alternating A and B. Please report:
longshot_log.txt, thevk: Threaded rendering:line and thevk: RX_VK_RECORDER=threadline (B only).Please don't set
RX_VK_ASYNC=1on the Deck for this. The render thread replays a frame behind the game. Without mirrors it would read the game's memory while the game writes the next frame. That is the reason Auto turns it off there.The result won't decide this PR. It would only show whether a recorder-alone mode is worth a Deck change of its own.
Steam Deck: the data we have so far (context for the Deck question above, not this PR's claim).
Nobody has run this PR's build on a Deck yet. The only Deck numbers are omgitsgela's field data from main, posted in #agent-updates on 2026-11-21 and on #402 (#402 (comment)):
game_cpu, against 54.1 % on Windows 11 at the same cap;So on the Deck the CPU, not the GPU, is most of the frame. That's why the recorder-thread-alone question above (no switch against
RX_VK_RECORDER=thread, both on this PR's build,RX_VK_ASYNC=1not set) is worth answering. This PR doesn't change the Deck: Auto stays off there because the buffer pools have no mirrors. Deck results for this PR will be posted here when they come in.Read of the head
f5544516(a merge of current maina2dc5385; basea2dc5385). The rule, the count and the off path are consistent, and the test is real. The one thing it cannot settle from code is whether the new default is right on a real 4-core PC — the evidence is a mask of an 8-core CPU — so I stop at the code finding.1. The decision needs a real 4-core run. The measured After is a Ryzen 7 5700X3D (8 cores/16 threads) held to 4 cores by
--affinity 0xff: it keeps the 96 MB cache, and the driver's and Windows' threads run on the other 4 cores. The only real 4-core data in the header is the 18 Nov table (a 9950X3D with SMT off, 4 cores/4 threads): there the render thread and the recorder thread were the worst of the three (60.9 / 62.1 fps, 34.7 / 31.5 % of frames ≥ 16.7 ms, against 67.6 / 67.9 fps render-only). The PR reverses that on the strength of #1763/#1866's rewrite plus the mask, and the masked 4c/4t row (89.2 vs 78.7 fps) is not a 4-core CPU. The riskiest case is therefore 4c/4t, where the recorder's 20-25 wakeups a frame and its short sleeps are the documented cost (the header's own i7-9700K note: Kokiri Forest 15 fps against 48). 4c/8t has the SMT headroom to make the change plausible; 4c/4t is the farm run that decides it. Still to test lists both, which is right; 5-core PCs (which the rule also flips) are not in the list and are rare enough to ignore. Until one real 4c/4t and one 4c/8t run exist, this is a default change with a diagnostic, not a measured claim — and the body says exactly that.2. What "4 cores" means, and the count.
threaded::cores_of(threaded_rendering.h:119-123) counts a physical core once when any of its logical processors is in the process's affinity mask, andusable_cores(vk_progcache.cpp:1321-1340, with the Linux shim) feeds it. So 4c/8t → 4, 4c/4t → 4, 5c → 5, 6c/12t → 6, 2c/4t → 2; an 8c/16t pinned to0xff→ 4 (the masked measurement's case); a launcher pinning a 4c/8t to 4 logical processors that are 2 cores × 2 siblings → 2 → Auto off. That last detail is worth keeping in the row's words: the count follows the affinity mask, not the PC's cores. The test covers the Deck's 4c/8t (one mask per core, both numbering schemes), the one-sibling masks and0xFF/0x55/0x0Fboundaries. One fallback remains: when the core masks cannot be read,usable_coresreturns the logical count, so a 2c/4t on such a PC would count 4 and run both threads where the real 2 cores would leave Auto off; that is pre-existing, and rare, but the row/comment could say the fallback counts logical processors.3. Default and off path. Only 4-5 physical cores with a discrete GPU (mirrors) and the row on Auto change. The Deck and every iGPU PC still turn Auto off (
pools_mirrored()false, asked only where Auto picked the threads,vk_menu.cpp:4398-4408); 2-3 cores off; 6+ both, as before; explicit On/Off unchanged;RX_VK_ASYNC/RX_VK_RECORDERstill override their halves;kAutoEnabledis the single gate. TheRX_VK_RECORDERrow's 6 → 4 matches the code, and theRX_VK_ASYNCrow already said 4 on main, so the PR resolves a pre-existing mismatch rather than creating one. Thedevice_policyflags (auto_picks(f.cores_usable)) now agree with the rule; they do not include the unsafe gate, which is the menu's, as intended.4. The measurement is not at this head and not against current main. Before is
main @ dd5ffe6a(seven commits beforea2dc5385, including #2174, which changes Hyrule Field on the way in — the measured scene), and After is43280cfa, older than the head; the body says every latergpu/change is a comment and that the farm runs the head. That is a fair description, and the numbers are labelled a mask, so the only gap is that+21.0 %/ p9923.04 → 18.74 msare not a current-main comparison. The farm run will produce the head's own numbers.5. The test is the strongest part: the rule at every core count to 256, the gate and the unsafe gate,
On/Offwhatever the CPU,cores_ofon Deck/Linux/Windows sibling numbering,usable_coreson the affinity masks, the start line for each answer (so the removed render-only tier's words are gone), the menu'sthreaded_choicecompiled and run in the capture/low-spec/dump/bench/no-mirrors environments, and 39 broken copies each caught; it fails on main's code. It cannot measure, and that is the point of 1.One comment nit: the
kAutoCoresnote (threaded_rendering.h:72-75) says "on 4 cores 67.6 / 67.9 fps with the render thread alone against 65.5 / 65.0 serial, 18 Nov", but 67.6 / 67.9 is the render-only row; the both-threads row on 4 cores on 18 Nov was 60.9 / 62.1 (the table just above). As written a reader can take 67.6 as the old both-threads number; worth rewording to "the render thread alone was 67.6 / 67.9 against 60.9 / 62.1 for both".No approval (WIP), no claim, and no machine run from me.
Steam Deck, the simple version (checked on my LCD Deck)
The Deck's GPU is integrated. Van Gogh is the APU: the CPU and GPU are on one package and share the same LPDDR5. My Deck reports
AMD Custom APU 0405, 4 cores / 8 threads, VGAVanGogh [AMD Custom GPU 0405] [1002:163f], with a 1 GiB VRAM carve-out and 8 GiB GTT. There is no separate graphics card.Auto has two parts that both have to pass:
This PR changes only part 2.
The Deck fails part 1. The code gives buffer pools mirrors only on discrete GPUs (
p.mirrors = f.discrete()). Mirrors are CPU-readable copies of GPU-written tables; a discrete card needs them because its memory is separate. The Deck's GPU is integrated and shares memory with the CPU, so it has none.threaded_choice()overrides Auto to off whatever the core count picked. Both builds log:vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)A Deck run on Auto is off against off. It cannot show the change in either direction. It can confirm the PR starts and plays without a new crash, but that is a regression check, not evidence for the 4-core default. The Deck looks like the target because it is 4c/8t; the safety gate is what rules it out.
For a Deck owner who wants to help with the separate question, the author's A/B above is the useful one: both runs on this PR's build, A = Auto (off), B =
RX_VK_RECORDER=threadonly, uncapped, Hyrule Field and the Market, and report fps, long frames, anything odd, and the two log lines. Please do not setRX_VK_ASYNC=1or switch the row to On: the render thread runs a frame behind, and without mirrors it can read game memory while the game writes it.The run that decides this PR is a real 4-core PC with a discrete GPU, 4c/4t first. The farm has that queued, waiting for a matching CPU.
@Beanstalk main against this PR, both on Threaded rendering Auto, no switch on either side: this PR changes what Auto picks on CPUs with 4 or 5 physical cores and a discrete GPU, so only those PCs can show a difference.
Targets: PCs with a discrete GPU (the dgpu tag) and a CPU of 4 physical cores or fewer, by model. With SMT (4C/8T): i7-6700K, i7-7700K, i7-6700, i7-7700, i3-10100, i3-12100, i3-13100, Ryzen 3 3300X. Without SMT (4C/4T): i5-6500, i5-6600K, i5-7400, i5-7500, i5-7600K, Ryzen 3 1200, 1300X, 3100. An NVIDIA and an AMD card if the testers have them, Windows and Linux both. 2- and 3-core PCs log the same "Auto: off" line on both builds, and 6-core and bigger PCs run both threads on both builds: those compare the same mode. No Steam Deck target here (Auto is off there on both builds: no mirrors).
Settings, both sides: frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0. Headless is fine (the change is in the replay, not the present path); no window scenario.
Scenario: Hyrule Field (HyruleField_Child) measured 30 s, then the Market (Market_Child) measured 30 s in the same start; 3 game starts a side (2 at least). Rules, PR vs main: fps_mean.min_delta_pct = 5 and frametime_p99_ms.max_delta_pct = 10 on each segment, crash = false. Hitch counts (run_hitch_count, run_frametime_max_ms) report-only.
Log check on the PR side: "vk: Threaded rendering: Auto: on, the render thread and the recorder thread (4 cores" expected, and main's "Auto: the render thread only (4 cores" shown, so we can see the tester's PC was in the tier that changes.
Beanstalk test farm · 🔄 testing (0 of 2 reports so far)
Commit
b54f066· approved by HumanBean, klimovich008 (double-reviewed) · dashboard⚠️ Note: GPU maker and OS coverage are opportunistic, not guaranteed by the two CPU-model targets; the main-side Auto log is available in the logs but is not separately judged.
⚠️ Note: Ryzen 3 3100 has SMT despite its placement in the requested non-SMT list; five-core and laptop power-saving cases are not targeted.
Done. Comment
@Beanstalkto run it again.dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k(CPU "3300x" or "i3 10100" or "i3 12100" or "i3 13100" or "i7 6700" or "i7 6700k" or "i7 7700" or "i7 7700k")dgpu+cpu-1200_1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k(CPU "1200" or "1300x" or "3100" or "i5 6500" or "i5 6600k" or "i5 7400" or "i5 7500" or "i5 7600k")What was tested
What will be tested · AI plan (
gpt-6.1-terra)Compare main and the PR on eligible discrete-GPU PCs with Threaded rendering on its default Auto setting and no switches. Three starts per build measure 30 seconds each in Hyrule Field and the Market, taking about 31 minutes per tester. The PR fails on a crash, an fps drop over 5%, a p99 frame-time increase over 10% in either scene, or a missing PR-side four-core Auto-on log line; hitch metrics are reported without limits. No listed eligible CPU is currently online, so both target groups will wait for matching testers. No tester online now matches dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k, dgpu+cpu-1200_1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k: those targets wait for one.
castle-gate(settings vsync=2, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, measure field for 30 s (after 10 s warm-up), take the picture field to compare with main, teleport to Market, measure market for 30 s (after 10 s warm-up), take the picture market to compare with main; 3 runs on each side.Thanks for the careful read, dazemc. Point by point:
b54f066d:kAutoCoresnote and the player's guide now say the count follows the process's affinity mask, not the PC's cores (two cores' four threads count as 2).usable_corescounts logical processors. That fallback is older than this tier.b54f066dwith g++ and clang++, all 39 broken copies caught.The comment nit: fixed in
b54f066d. The note now reads "the render thread alone was 67.6 / 67.9 fps against 60.9 / 62.1 for both, and 65.5 / 65.0 serial", which matches the 18 Nov table above it.b54f066dchanges comments and docs only, so the code the farm builds is f5544516's. The farm asks for a new approval after every push, so I posted the same request again on the new head (the comment above). The plan's words haven't changed.Thanks also to omgitsgela for the Steam Deck explanation. It matches ours: Auto is off on the Deck on both builds, so the Deck question stays a separate, data-only one.
@Beanstalk
@HumanBean
b54f066is already running: see the dashboard.@review
Recommendation: Approve. The code is ready: only testing is left. The new Auto default has a promising diagnostic result, but its gain and frame-pacing cost remain unproven on the real 4-core systems it targets. Wait for the requested head-versus-base runs before choosing this default. Recommend approval; not approved on the forge.
Auto enables the recorder thread alongside the render thread on eligible 4- and 5-core systems. This simplifies the tier rule and may improve throughput, at the cost of another active thread on CPUs with limited headroom.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/threaded_rendering.h:78: The new default has not been measured on a real CPU in the tier it changes, including the systems most constrained by the extra recorder thread. (more on the line) Do: Compare the current base and head with Auto on real 4C/4T and 4C/8T discrete-GPU PCs, including Windows and Linux, AMD and NVIDIA drivers, and a power-saving laptop where available. Use repeated interleaved Hyrule Field and Market runs and report fps, p99 and hitch counts; include a 5-core PC if available. (@fixdoes its part first: Restore the render-only tier for 4–5 cores until target-system measurements support enabling the recorder there.)@fixcan do L1.More: does it help, other systems, switches, what was read
Does it help: Unproven for the target systems. On an 8-core Ryzen 7 5700X3D masked to 4 cores, three alternating Hyrule Field runs improved median fps from 64.69 to 78.29 and p99 from 23.04 to 18.74 ms. That CPU retained its larger cache and spare cores for system and driver work; the comparison also predates the current base and head.
Other systems: Auto remains off on the Steam Deck and other unmirrored configurations, and its choices below 4 and from 6 cores are unchanged. Windows and Linux, GPU drivers, 4C/4T and 4C/8T systems, 5-core systems, and power-saving laptops can experience the changed recorder workload; no real target-system comparison is reported. Where topology discovery falls back to logical processors, a 2C/4T system can also receive the new choice.
Switches: No switch is added or removed. The default Threaded rendering Auto choice and the unset RX_VK_RECORDER behavior change from render-only to both threads at 4–5 counted cores; the default needs target-system measurements. RX_VK_RECORDER remains an override, and its switches.def row is updated.
Reviewed:
b54f066d83againsta2dc538590: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the changed rule, menu module and test harness, the diff, commit messages, supplied comments and review, and the choice and core-count call paths. Skimmed the larger device-policy test, reference documentation and surrounding renderer files; not every changed code file was read in full. docs/review-checklist.md was absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no builds, scripts or tests were run. The author reports in-game diagnostic runs and compiler checks in the pull request.
Overlaps and merge order: The description identifies #1407 as related low-core threshold work; its merge order is not established from the supplied information.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -64,0 +75,4 @@/// were +22 % on a mask of 4 cores and 8 threads and +13 % on 4 of 4 (the tables above). The count follows the process's/// affinity mask, not the PC's cores: a 4-core, 8-thread CPU held to 2 cores' 4 siblings counts 2. Where the core masks/// cannot be read, usable_cores counts logical processors instead (its fallback, older than this tier)constexpr unsigned kAutoCores = 4;L1 (should fix): The new default has not been measured on a real CPU in the tier it changes, including the systems most constrained by the extra recorder thread.
When: A 4C/4T or power-limited 4C/8T PC with a discrete GPU now runs the recorder on Auto. The masked 8-core result leaves cache and system cores available that those PCs lack; the older Market measurement also showed substantially worse frame pacing with both threads before the later thread rewrites.
Do: Compare the current base and head with Auto on real 4C/4T and 4C/8T discrete-GPU PCs, including Windows and Linux, AMD and NVIDIA drivers, and a power-saving laptop where available. Use repeated interleaved Hyrule Field and Market runs and report fps, p99 and hitch counts; include a 5-core PC if available.
Thanks, BeanBot (review 2380).
L1: that is the farm plan already queued on this PR (73003). It runs main against the head on Auto, Hyrule Field then the Market in each start, on two discrete-GPU 4-core targets: one with SMT, one without. No matching tester has been online yet. The PR stays WIP until real 4-core results come in, which is my choice too. I'm not taking the suggested fix of restoring the render-only tier for 4-5 cores, because that would undo the PR. A power-saving laptop and a 5-core PC are welcome as hand runs; they're in the wanted post.
2C/4T: the fallback happens only when the core masks can't be read (on Linux, an unreadable
/systopology).usable_coresthen counts logical processors, so such a 2C/4T PC counts 4. That is the pre-existing fallback, and it's already named in the PR's Risks, thekAutoCoresnote and the player's guide. Nothing changes there.WIP: perf(vk): Threaded rendering's Auto runs the recorder thread from 4 cores, not 6to perf(vk): Threaded rendering's Auto runs the recorder thread from 4 cores, not 6Jiro113 referenced this pull request2026-11-23 19:08:32 +00:00