perf(vk): the mesh-draw scan looks each op's kind up in a table #2008

Merged
HumanBean merged 8 commits from klimovich008/Longshot:perf/mesh-scan-op-table into main 2026-11-21 07:26:19 +00:00
Member

Summary

After each of the game's barriers the renderer scans the frame's commands for indirect mesh draws to batch (#1846). For every command it asked which kind it is by walking a list of 37 commands one by one, about 1,200 scans a frame, and that walk alone was about 1.7 % of the render thread's time on my PC. Now each command's kind is looked up in a 256-entry table built at compile time from the same list. Same answers, same draws, a little less recording time on the render thread.

  • gpu/vk/mesh_conv.h: Ops holds the table (kind[kOpTable], 256 entries) instead of a pointer to the list; constexpr make_ops() builds it (every entry starts as Stop, the listed commands become Pass, the mesh draw becomes Draw); kind_of() is one bounds check and one byte read. Anything not in the list, or past the table, is Stop, as an unknown command was before (that only costs a rescan, never a draw converted early). OpKind is now uint8_t with Stop at 0.
  • gpu/vk/vk_replay.cpp mesh_conv_at_barrier: the list of 37 commands stays the one place they are named; the table is made from it as a static constexpr, with a static_assert that every command fits.
  • Nothing else in the scan changes: the same stops, batches and counters. No switch: it is a plain speed-up; RX_VK_MESH_CONV=0 or 1 still turns the batching, and so the scan, off.

Who gains: every GPU on the native mesh path (RX_VK_MESH_CONV=2, the default, on a GPU with mesh shaders): NVIDIA, AMD and Intel on Windows, NVIDIA and Intel on Linux. The cost is a count of compares per command of the game's own stream, the same on every PC, so it carries; a slower CPU pays more of it in ms. In Automatic mode, RADV GPUs and the Steam Deck take the compute fallback with dev.mesh_shader disabled, so they do not run this scan. Forced native mode on a supported RADV device can reach it. The scan also requires mesh_args_rewrite to be off; that function gates a separate argument-rewrite mode. #1946 is in this branch's main and its test is kept.

Read first: kind_of and make_ops in gpu/vk/mesh_conv.h, then mesh_conv_at_barrier in gpu/vk/vk_replay.cpp.

Testing

Tested: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2: Hyrule Field with the camera turning, uncapped (frame_rate_cap = 6, vsync = 2, frame_generation = 0), 3 alternating pairs against main plus sampled runs and one screenshot run a side. Grass and foliage look the same as on main (nothing missing, flickering or garbled); the mesh counters in the log (vk: a frame: indirect mesh draws' arguments) are the same on both sides: 47 draws from 30 batches a frame, 0 dropped, 0 stale, the scans ending at a barrier, a command and the end the same number of times; no new kinds of error lines; the game clock read 1.000 in all 10 runs.

Checks:

  • tests/test_mesh_conv.py (in run_all): kind_of from the table answers as a walk of the replay's own list does, for every opcode 0..4096, every rx_nvn.h opcode with one of bits 8-31 set, and huge values, for the replay's Ops (its declaration cut from the live code of vk_replay.cpp), Ops with buffer clears added and an Ops made in a constant expression. A new check overwrites the list after making Ops and expects the same answers: main fails there ("kind_of walks the list at each op: no table"), this branch passes. Two new broken variants must fail and do (the table shifted by one opcode; an opcode past the table answered Pass), as do the five old ones. Seven broken copies of the real mesh_conv.h each make the test fail.
  • The test passes on this branch with MinGW g++ 16 (Windows) and g++ 15 (Linux). With clang++ it fails on this branch and on main alike, in #1946's tests/mesh_conv_real_test.cpp (constexpr int log_debug unused, -Werror), before it reaches this change; before merging main it passed with clang++ (llvm-mingw's clang 23 on Windows, clang 21 on Linux).
  • Syntax compiles of vk_replay.cpp and vk_draw.cpp for Windows (llvm-mingw) and Linux (clang 21, the Linux renderer flags); the Windows renderer DLL built with llvm-mingw.
  • mise run lint: only the known SC2016 info in build-windows.yml, which passes in CI on main.
  • tests/run_all.py (Windows, llvm-mingw clang): 776 passed, 75 failed, 54 skipped on this branch and the same on main @ f1f2dc5b; the failing files are identical, test_mesh_conv.py among them for the clang++ fixture reason above.

Still to test:

  • @Beanstalk Windows NVIDIA, Linux NVIDIA, Linux AMD: Hyrule Field uncapped against main, 2 runs a side, expecting fps and frame time p99 no worse than main and no crashes (requested; no farm run is recorded in the review snapshot).
  • A slower CPU (8 threads or fewer): the same, expecting no loss (by hand).

Measurements

Verdict: the scan's cost on the render thread fell from 2.30-2.65 % to 0.62-0.74 % of its time, about 0.2 ms a frame; fps no lower (diagnostic, see below).

Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2, 16:9, Hyrule Field with the camera turning from the load, a 20 s window, HOS_FPS_MAX=240, RX_VK_ASYNC=1 (render thread on), uncapped profile (frame_rate_cap = 6, vsync = 2, frame_generation = 0). The cost: sampled runs, the share of the render thread's samples that fall in the scan's code (each DLL's own map; 3,775-3,968 samples a run; two of this PR's three sampled runs failed the fps test's game-clock rule in one probe (0.936, 1.021; two of main's runs today failed it the same way), which doesn't change the sample counts). fps: 3 alternating pairs, the median. The renderer was built from 4c4583b0; the commits after it change only tests and merge main.

Before: main @ 87c0d7b4 After: this PR @ 4c4583b0
the scan's share of render-thread samples (3 sampled runs a side) 2.12-2.49 % (scan), 2.30-2.65 % with its caller 0.62-0.74 % (scan inlined into its caller)
fps, median of 3 pairs 85.24 90.34
CPU ms, median of 3 pairs 43.80 43.25
frame time p99, median (ms) 17.7 16.7
frames over 50 / 100 / 250 ms, 3 runs 3 / 1 / 1 1 / 0 / 0

The fps rose in all 3 pairs, but I don't claim that +6 %: it is more than the 0.2 ms the scan saves explains. The replay's draw and descriptor times fell too (5.62 → 5.45 ms, 2.58 → 2.29 ms), and this change doesn't touch them, so part of the difference is run-to-run spread or how the rebuilt DLL is laid out; I did not run a control with main's renderer rebuilt unchanged. Read the fps rows as "no loss". The one frame over 250 ms was on main's side (460 ms).

Measured on main @ 87c0d7b4; the branch is now on main @ f1f2dc5b. The counted cost should still hold: none of the commits between touch mesh_conv.h or the scan in mesh_conv_at_barrier (the renderer commits between change the compute fallback and its log line, the pipeline caches, the swapchain at the close and a brace), so the scan does the same work per command. The fps rows were not measured again. Since then the branch moved to main @ fd7dc40d. Between f1f2dc5b and fd7dc40d, mesh_conv.h and mesh_conv_at_barrier are untouched too. The only renderer changes are the FPS counter footer's upscale route record in vk_draw.cpp (and its two lines in vk_replay.cpp), which runs only while that footer is shown, so the numbers still hold.

Risks

A command given the wrong kind would be a rendering bug, not a crash: one taken for Pass that writes memory would convert a draw's arguments before the write (wrong grass for a frame); one taken for Stop only costs a rescan. The test compares the table with the old walk for every opcode, and anything unknown is Stop. A revert is enough to undo it; RX_VK_MESH_CONV=1 or 0 turns the scan off. After updating: nothing. mesh_conv.h and vk_replay.cpp are not in the shader-cache stamp, so no re-prepare; no renderer API change.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). On the author's Windows run (Checks above), the 75 failures are the same files on this branch and on main @ f1f2dc5b (test_mesh_conv.py among them, failing on main alike for the clang++ fixture reason in Checks; it passes with g++); the list itself wasn't kept, and the maintainer accepted the author's account of it.
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary After each of the game's barriers the renderer scans the frame's commands for indirect mesh draws to batch (#1846). For every command it asked which kind it is by walking a list of 37 commands one by one, about 1,200 scans a frame, and that walk alone was about 1.7 % of the render thread's time on my PC. Now each command's kind is looked up in a 256-entry table built at compile time from the same list. Same answers, same draws, a little less recording time on the render thread. - `gpu/vk/mesh_conv.h`: `Ops` holds the table (`kind[kOpTable]`, 256 entries) instead of a pointer to the list; `constexpr make_ops()` builds it (every entry starts as Stop, the listed commands become Pass, the mesh draw becomes Draw); `kind_of()` is one bounds check and one byte read. Anything not in the list, or past the table, is Stop, as an unknown command was before (that only costs a rescan, never a draw converted early). `OpKind` is now `uint8_t` with Stop at 0. - `gpu/vk/vk_replay.cpp` `mesh_conv_at_barrier`: the list of 37 commands stays the one place they are named; the table is made from it as a `static constexpr`, with a `static_assert` that every command fits. - Nothing else in the scan changes: the same stops, batches and counters. No switch: it is a plain speed-up; `RX_VK_MESH_CONV=0` or `1` still turns the batching, and so the scan, off. Who gains: every GPU on the native mesh path (`RX_VK_MESH_CONV=2`, the default, on a GPU with mesh shaders): NVIDIA, AMD and Intel on Windows, NVIDIA and Intel on Linux. The cost is a count of compares per command of the game's own stream, the same on every PC, so it carries; a slower CPU pays more of it in ms. In Automatic mode, RADV GPUs and the Steam Deck take the compute fallback with `dev.mesh_shader` disabled, so they do not run this scan. Forced native mode on a supported RADV device can reach it. The scan also requires `mesh_args_rewrite` to be off; that function gates a separate argument-rewrite mode. #1946 is in this branch's main and its test is kept. Read first: `kind_of` and `make_ops` in `gpu/vk/mesh_conv.h`, then `mesh_conv_at_barrier` in `gpu/vk/vk_replay.cpp`. ## Testing **Tested:** Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2: Hyrule Field with the camera turning, uncapped (`frame_rate_cap = 6`, `vsync = 2`, `frame_generation = 0`), 3 alternating pairs against main plus sampled runs and one screenshot run a side. Grass and foliage look the same as on main (nothing missing, flickering or garbled); the mesh counters in the log (`vk: a frame: indirect mesh draws' arguments`) are the same on both sides: 47 draws from 30 batches a frame, 0 dropped, 0 stale, the scans ending at a barrier, a command and the end the same number of times; no new kinds of error lines; the game clock read 1.000 in all 10 runs. Checks: - `tests/test_mesh_conv.py` (in `run_all`): `kind_of` from the table answers as a walk of the replay's own list does, for every opcode 0..4096, every rx_nvn.h opcode with one of bits 8-31 set, and huge values, for the replay's `Ops` (its declaration cut from the live code of `vk_replay.cpp`), `Ops` with buffer clears added and an `Ops` made in a constant expression. A new check overwrites the list after making `Ops` and expects the same answers: main fails there ("kind_of walks the list at each op: no table"), this branch passes. Two new broken variants must fail and do (the table shifted by one opcode; an opcode past the table answered Pass), as do the five old ones. Seven broken copies of the real `mesh_conv.h` each make the test fail. - The test passes on this branch with MinGW g++ 16 (Windows) and g++ 15 (Linux). With clang++ it fails on this branch and on main alike, in #1946's `tests/mesh_conv_real_test.cpp` (`constexpr int log_debug` unused, `-Werror`), before it reaches this change; before merging main it passed with clang++ (llvm-mingw's clang 23 on Windows, clang 21 on Linux). - Syntax compiles of `vk_replay.cpp` and `vk_draw.cpp` for Windows (llvm-mingw) and Linux (clang 21, the Linux renderer flags); the Windows renderer DLL built with llvm-mingw. - `mise run lint`: only the known SC2016 info in `build-windows.yml`, which passes in CI on main. - `tests/run_all.py` (Windows, llvm-mingw clang): 776 passed, 75 failed, 54 skipped on this branch and the same on main @ f1f2dc5b; the failing files are identical, `test_mesh_conv.py` among them for the clang++ fixture reason above. **Still to test:** - @Beanstalk Windows NVIDIA, Linux NVIDIA, Linux AMD: Hyrule Field uncapped against main, 2 runs a side, expecting fps and frame time p99 no worse than main and no crashes (requested; no farm run is recorded in the review snapshot). - A slower CPU (8 threads or fewer): the same, expecting no loss (by hand). ## Measurements **Verdict:** the scan's cost on the render thread fell from 2.30-2.65 % to 0.62-0.74 % of its time, about 0.2 ms a frame; fps no lower (diagnostic, see below). Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2, 16:9, Hyrule Field with the camera turning from the load, a 20 s window, `HOS_FPS_MAX=240`, `RX_VK_ASYNC=1` (render thread on), uncapped profile (`frame_rate_cap = 6`, `vsync = 2`, `frame_generation = 0`). The cost: sampled runs, the share of the render thread's samples that fall in the scan's code (each DLL's own map; 3,775-3,968 samples a run; two of this PR's three sampled runs failed the fps test's game-clock rule in one probe (0.936, 1.021; two of main's runs today failed it the same way), which doesn't change the sample counts). fps: 3 alternating pairs, the median. The renderer was built from 4c4583b0; the commits after it change only tests and merge main. | | Before: main @ 87c0d7b4 | After: this PR @ 4c4583b0 | |---|---|---| | the scan's share of render-thread samples (3 sampled runs a side) | 2.12-2.49 % (scan), 2.30-2.65 % with its caller | 0.62-0.74 % (scan inlined into its caller) | | fps, median of 3 pairs | 85.24 | 90.34 | | CPU ms, median of 3 pairs | 43.80 | 43.25 | | frame time p99, median (ms) | 17.7 | 16.7 | | frames over 50 / 100 / 250 ms, 3 runs | 3 / 1 / 1 | 1 / 0 / 0 | The fps rose in all 3 pairs, but **I don't claim that +6 %**: it is more than the 0.2 ms the scan saves explains. The replay's draw and descriptor times fell too (5.62 → 5.45 ms, 2.58 → 2.29 ms), and this change doesn't touch them, so part of the difference is run-to-run spread or how the rebuilt DLL is laid out; I did not run a control with main's renderer rebuilt unchanged. Read the fps rows as "no loss". The one frame over 250 ms was on main's side (460 ms). Measured on main @ 87c0d7b4; the branch is now on main @ f1f2dc5b. The counted cost should still hold: none of the commits between touch `mesh_conv.h` or the scan in `mesh_conv_at_barrier` (the renderer commits between change the compute fallback and its log line, the pipeline caches, the swapchain at the close and a brace), so the scan does the same work per command. The fps rows were not measured again. Since then the branch moved to main @ fd7dc40d. Between f1f2dc5b and fd7dc40d, `mesh_conv.h` and `mesh_conv_at_barrier` are untouched too. The only renderer changes are the FPS counter footer's upscale route record in `vk_draw.cpp` (and its two lines in `vk_replay.cpp`), which runs only while that footer is shown, so the numbers still hold. ## Risks A command given the wrong kind would be a rendering bug, not a crash: one taken for Pass that writes memory would convert a draw's arguments before the write (wrong grass for a frame); one taken for Stop only costs a rescan. The test compares the table with the old walk for every opcode, and anything unknown is Stop. A revert is enough to undo it; `RX_VK_MESH_CONV=1` or `0` turns the scan off. After updating: nothing. `mesh_conv.h` and `vk_replay.cpp` are not in the shader-cache stamp, so no re-prepare; no renderer API change. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). On the author's Windows run (Checks above), the 75 failures are the same files on this branch and on `main` @ f1f2dc5b (`test_mesh_conv.py` among them, failing on `main` alike for the clang++ fixture reason in Checks; it passes with g++); the list itself wasn't kept, and the maintainer accepted the author's account of it. - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mesh_conv::scan (RX_VK_MESH_CONV=2, the default with mesh shaders) asks kind_of for every op of a frame,
and kind_of walked the replay's list of the ops a batch steps over, up to 37 compares an op. Ops now
carries each op's kind in a table indexed by opcode, made at compile time from the same list
(mesh_conv::make_ops; vk_replay.cpp's list stays the one place those ops are named). An op at or past
the table is Stop, as an unknown op was; vk_replay.cpp asserts rx_nvn.h's NOP_COUNT_ fits in it.
OpKind's Stop is now 0, so an entry nobody set is the safe answer. Same answers for every opcode,
same stops, items and counters.

tests/test_mesh_conv.py cuts the Ops initializer from vk_replay.cpp with the list, and the model checks
kind_of against a walk of the list for every opcode up to 4096 and a few huge ones, also after the
list it was made from is overwritten (main fails there: its kind_of walks the list at each op). Two
new broken variants must fail: the table shifted by one opcode, an op past rx_nvn.h's last answered Pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The sol review of 4c4583b0 found no defect and three test gaps; two are closed here. kinds_match also asks
each of rx_nvn.h's opcodes with one of bits 8-31 set (a kind_of that cut the opcode to 16 bits answered
0x10001 as NOP_JUMP), and the model makes one Ops in a constant expression as the replay's static
constexpr one is, so a make_ops that cannot run at compile time fails the model's build too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test cut the first `static const(expr) mesh_conv::Ops ops` it found in mesh_conv_at_barrier. A commented-out copy
above the live declaration was then cut instead, so the model tested that copy while the replay used another (the
checker's sol review, j1121-1-c1). Each declaration must now be found once, alone on its line and outside a block
comment. Checked on a source copy with such a copy and a live Ops one op short: the test before this passes it, this
one fails it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The count of `/*` and `*/` from 22f8f784 refused valid code (a `/*` in a string or a line comment) and let a block-commented
or `#if 0` copy through when the live declaration was spelled with other whitespace (the checker's sol review,
j1121-1-c1b). Comments and `#if 0` blocks are now blanked first (string and character literals kept whole), the
declarations are matched with any whitespace, and each must be found exactly once. Checked on source copies: a `//`, a
`/* */` and an `#if 0` copy beside a changed live declaration each fail; `/*` in a comment and in a string pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge main (f1f2dc5b) into perf/mesh-scan-op-table
Some checks reported errors
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 12s
CI / Website build and checks (pull_request) Failing after 21s
beanstalk/approval approved by klimovich008 (reviewed)
beanstalk/windows+nvidia+vram-ge6gb 1/1 fail
beanstalk/linux+nvidia 0/1 pass, 2 error
beanstalk/linux+amd 1/1 fail
PR description / Description follows the template (pull_request_target) Has been cancelled
9391932ee7
tests/test_mesh_conv.py: #1946's compute-fallback fixture and docstring kept beside the table checks; import re kept,
which live_code needs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D: Hyrule Field uncapped, 3 alternating pairs against main plus sampled and screenshot runs. Grass and foliage look the same as main, the indirect mesh draw counters match, no new error-line kinds, game clock 1.000 in all runs; the scan's share of render-thread samples fell from 2.30-2.65 % to 0.62-0.74 %.

Tested in game: Windows 11, RX 9070 XT, AMD 26.11.2, Ryzen 7 5700X3D: Hyrule Field uncapped, 3 alternating pairs against main plus sampled and screenshot runs. Grass and foliage look the same as main, the indirect mesh draw counters match, no new error-line kinds, game clock 1.000 in all runs; the scan's share of render-thread samples fell from 2.30-2.65 % to 0.62-0.74 %.
Author
Member

@Beanstalk please compare this PR's head against main, no-loss check for a render-thread CPU change on the native mesh-shader path. Hyrule Field from the load, camera turning, windowed, frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0, 2 runs a side. On: Windows NVIDIA with 6 GB of VRAM or more (not the RTX 3050 Ti laptop tester), Linux NVIDIA, and Linux AMD. Report fps, frame time p99 and any crash or hang per side. Expecting fps and p99 no worse than main. Linux AMD on RADV takes the compute fallback, where this change doesn't run, so it should match main.

@Beanstalk please compare this PR's head against main, no-loss check for a render-thread CPU change on the native mesh-shader path. Hyrule Field from the load, camera turning, windowed, `frame_rate_cap = 6` (Uncapped), `vsync = 2` (Off), `frame_generation = 0`, 2 runs a side. On: Windows NVIDIA with 6 GB of VRAM or more (not the RTX 3050 Ti laptop tester), Linux NVIDIA, and Linux AMD. Report fps, frame time p99 and any crash or hang per side. Expecting fps and p99 no worse than main. Linux AMD on RADV takes the compute fallback, where this change doesn't run, so it should match main.
Member
Beanstalk test farm · an earlier run: commit 9391932, run 3 (the newer results are in a comment below)

Commit 9391932 · approved by klimovich008 (reviewed) · dashboard

⚠️ Note: The requested windowed camera-turning comparison is omitted: window scenarios require every target to have the window tag, and Linux testers cannot run them; the explicitly requested headless alternative runs instead.
⚠️ Note: The farm cannot exclude a specific GPU model from a target, so the Windows target may include the RTX 3050 Ti laptop if it meets the VRAM requirement.
⚠️ Note: On RADV, the compute fallback does not execute the changed scan, so that comparison is a control rather than a direct test of the optimization.

Summary, written by AI (gpt-6.1-terra) from the numbers below:

The farm marked Windows NVIDIA and Linux AMD as failed; Linux NVIDIA could not be judged. Mean FPS fell from 109.58 to 109.42 FPS (−0.1%) on Windows NVIDIA and from 97.80 to 96.76 FPS (−1.1%) on Linux AMD. Frame-time p99 rose from 11.56 to 12.81 ms (+10.8%) and from 13.17 to 14.50 ms (+10.1%), respectively, but both comparisons were inconclusive because there were too few usable starts. All PCs reported timeouts waiting for Hyrule Field while the game was in Kokiri Forest; Linux NVIDIA had no usable starts on either side.

Done (started 04:27 UTC, last report 04:55 UTC). Run 3: re-planned by klimovich008. Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows+nvidia+vram-ge6gb (6 GB VRAM or more) ❌ fail 2 1 2 11.6 → 12.8 (+11%) — none
linux+nvidia ⚠️ couldn't be judged (an outlier) 2 1 2 — — none
linux+amd ❌ fail (an outlier) 2 1 2 13.2 → 14.5 (+10%) — none

Why it failed

  • windows+nvidia+vram-ge6gb: field-headless field.fps_mean.min_delta_pct: 109.6 → 109.4 (−0.1%); limit 0.0
  • linux+amd: field-headless field.fps_mean.min_delta_pct: 97.8 → 96.8 (−1.1%); limit 0.0

Couldn'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+nvidia+vram-ge6gb, report 2: Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)
  • linux+nvidia, report 1: Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)
  • linux+nvidia, report 2: Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)
  • linux+amd, report 1: Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)
What was tested

What will be tested · AI plan (gpt-6.1-terra)

Compare PR head with main in headless Hyrule Field on Windows NVIDIA with at least 6 GB VRAM, Linux NVIDIA, and Linux AMD. Two runs per side measure FPS and frame-time p99 with the requested uncapped settings, compare a field image, and check for crashes or hangs. Lower FPS, higher p99, a crash, a hang, or a significant image difference fails the check; each tester's runs take about 22 minutes.

  • Where: windows+nvidia+vram-ge6gb (6 GB VRAM or more, 1-2 reports), linux+nvidia (1-2 reports), linux+amd (1-2 reports).
  • field-headless: from the repository's save kokiri-start (settings vsync=2, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 5 s warm-up); 2 runs on each side.
  • Measured: crashes, frame times, stutters and hitches, draws and frame rate.
  • The PR fails if: it crashes; or frame rate is more than 0% below main; or a picture differs from main by more than 5%; or frame time (p99) is more than 0% above main.
  • Time: about 22 min of game runs per tester (4 game starts), plus the two builds.
Measurements on `windows+nvidia+vram-ge6gb`, for the PR description

Verdict: fail on windows+nvidia+vram-ge6gb (2 reports): field-headless field.fps_mean.min_delta_pct (-0.1%) failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3080 Ti, 621.24.0 AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 616.56.0 AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM
Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ f1f2dc5 After: this PR @ 9391932
field-headless · field · frame rate 109.6 109.4 (−0%)
field-headless · field · frame time (p99) (ms) 11.6 12.8 (+11%)

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows+nvidia+vram-ge6gb (2 reports): `field-headless field.fps_mean.min_delta_pct (-0.1%)` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 621.24.0` `AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 616.56.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`  
Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ f1f2dc5 | After: this PR @ 9391932 |
|---|---|---|
| field-headless · field · frame rate | 109.6 | 109.4 (−0%) |
| field-headless · field · frame time (p99) (ms) | 11.6 | 12.8 (+11%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
Measurements on `linux+nvidia`, for the PR description

Verdict: could not be judged on linux+nvidia (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side).

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.70.6 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5080, 620.73.4 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Nothing was measured: no metric came back.

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** could not be judged on linux+nvidia (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side).

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5080, 620.73.4` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`  
Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

Nothing was measured: no metric came back.

**Flags and settings**

None: the plan varied no setting, switch or build option.
Measurements on `linux+amd`, for the PR description

Verdict: fail on linux+amd (2 reports): field-headless field.fps_mean.min_delta_pct (-1.1%) failed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7 AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.0.8 AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM
Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ f1f2dc5 After: this PR @ 9391932
field-headless · field · frame rate 97.8 96.8 (−1%)
field-headless · field · frame time (p99) (ms) 13.2 14.5 (+10%)

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** fail on linux+amd (2 reports): `field-headless field.fps_mean.min_delta_pct (-1.1%)` failed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`  
Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ f1f2dc5 | After: this PR @ 9391932 |
|---|---|---|
| field-headless · field · frame rate | 97.8 | 96.8 (−1%) |
| field-headless · field · frame time (p99) (ms) | 13.2 | 14.5 (+10%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
The testers' hardware
Target Report Ran on
windows+nvidia+vram-ge6gb 1 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3080 Ti, 621.24.0 AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM
windows+nvidia+vram-ge6gb 2 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 616.56.0 AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM
linux+nvidia 1 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.70.6 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM
linux+nvidia 2 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5080, 620.73.4 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
linux+amd 1 linux+amd+radv+dgpu AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7 AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM
linux+amd 2 linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.0.8 AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>9391932</code>, run 3 (the newer results are in a comment below)</summary> Commit `9391932` · approved by klimovich008 (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2008) ⚠️ **Note:** The requested windowed camera-turning comparison is omitted: window scenarios require every target to have the window tag, and Linux testers cannot run them; the explicitly requested headless alternative runs instead. ⚠️ **Note:** The farm cannot exclude a specific GPU model from a target, so the Windows target may include the RTX 3050 Ti laptop if it meets the VRAM requirement. ⚠️ **Note:** On RADV, the compute fallback does not execute the changed scan, so that comparison is a control rather than a direct test of the optimization. > **Summary**, written by AI (`gpt-6.1-terra`) from the numbers below: > > The farm marked Windows NVIDIA and Linux AMD as failed; Linux NVIDIA could not be judged. Mean FPS fell from 109.58 to 109.42 FPS (−0.1%) on Windows NVIDIA and from 97.80 to 96.76 FPS (−1.1%) on Linux AMD. Frame-time p99 rose from 11.56 to 12.81 ms (+10.8%) and from 13.17 to 14.50 ms (+10.1%), respectively, but both comparisons were inconclusive because there were too few usable starts. All PCs reported timeouts waiting for Hyrule Field while the game was in Kokiri Forest; Linux NVIDIA had no usable starts on either side. Done (started 04:27 UTC, last report 04:55 UTC). Run 3: re-planned by klimovich008. Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows+nvidia+vram-ge6gb` (6 GB VRAM or more) | ❌ fail | 2 [1](https://beanstalk.magicbean.dev/reports/rp_878cb1460c8c9141) [2](https://beanstalk.magicbean.dev/reports/rp_ad825be04ae6e02e) | 11.6 → 12.8 (+11%) | — | none | | `linux+nvidia` | ⚠️ couldn't be judged (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_2a5f529c8aec9bba) [2](https://beanstalk.magicbean.dev/reports/rp_aeaee3be4f7fd1e7) | — | — | none | | `linux+amd` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_c482dbd885ad0006) [2](https://beanstalk.magicbean.dev/reports/rp_4c1edb1219cd0876) | 13.2 → 14.5 (+10%) | — | none | **Why it failed** - `windows+nvidia+vram-ge6gb`: `field-headless` `field.fps_mean.min_delta_pct`: `109.6 → 109.4 (−0.1%); limit 0.0` - `linux+amd`: `field-headless` `field.fps_mean.min_delta_pct`: `97.8 → 96.8 (−1.1%); limit 0.0` **Couldn'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+nvidia+vram-ge6gb`, [report 2](https://beanstalk.magicbean.dev/reports/rp_ad825be04ae6e02e): `Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)` - `linux+nvidia`, [report 1](https://beanstalk.magicbean.dev/reports/rp_2a5f529c8aec9bba): `Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)` - `linux+nvidia`, [report 2](https://beanstalk.magicbean.dev/reports/rp_aeaee3be4f7fd1e7): `Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)` - `linux+amd`, [report 1](https://beanstalk.magicbean.dev/reports/rp_c482dbd885ad0006): `Insufficient frame-time evidence for 1 required comparison(s). See rule results. a step ran out of time at step 2 (wait map HyruleField_Child): timeout: not met in time (then the game was in play on KokiriForest_Child)` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) Compare PR head with main in headless Hyrule Field on Windows NVIDIA with at least 6 GB VRAM, Linux NVIDIA, and Linux AMD. Two runs per side measure FPS and frame-time p99 with the requested uncapped settings, compare a field image, and check for crashes or hangs. Lower FPS, higher p99, a crash, a hang, or a significant image difference fails the check; each tester's runs take about 22 minutes. - **Where:** windows+nvidia+vram-ge6gb (6 GB VRAM or more, 1-2 reports), linux+nvidia (1-2 reports), linux+amd (1-2 reports). - **field-headless:** from the repository's save `kokiri-start` (settings vsync=2, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 5 s warm-up); 2 runs on each side. - **Measured:** crashes, frame times, stutters and hitches, draws and frame rate. - **The PR fails if:** it crashes; or frame rate is more than 0% below main; or a picture differs from main by more than 5%; or frame time (p99) is more than 0% above main. - **Time:** about 22 min of game runs per tester (4 game starts), plus the two builds. </details> <details><summary>Measurements on `windows+nvidia+vram-ge6gb`, for the PR description</summary> **Verdict:** fail on windows+nvidia+vram-ge6gb (2 reports): `field-headless field.fps_mean.min_delta_pct (-0.1%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 621.24.0` `AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 616.56.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM` Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ f1f2dc5 | After: this PR @ 9391932 | |---|---|---| | field-headless · field · frame rate | 109.6 | 109.4 (−0%) | | field-headless · field · frame time (p99) (ms) | 11.6 | 12.8 (+11%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on windows+nvidia+vram-ge6gb (2 reports): `field-headless field.fps_mean.min_delta_pct (-0.1%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 621.24.0` `AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 616.56.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM` Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ f1f2dc5 | After: this PR @ 9391932 | |---|---|---| | field-headless · field · frame rate | 109.6 | 109.4 (−0%) | | field-headless · field · frame time (p99) (ms) | 11.6 | 12.8 (+11%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `linux+nvidia`, for the PR description</summary> **Verdict:** could not be judged on linux+nvidia (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side). Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5080, 620.73.4` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** could not be judged on linux+nvidia (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side). Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5080, 620.73.4` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `linux+amd`, for the PR description</summary> **Verdict:** fail on linux+amd (2 reports): `field-headless field.fps_mean.min_delta_pct (-1.1%)` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM` Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ f1f2dc5 | After: this PR @ 9391932 | |---|---|---| | field-headless · field · frame rate | 97.8 | 96.8 (−1%) | | field-headless · field · frame time (p99) (ms) | 13.2 | 14.5 (+10%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on linux+amd (2 reports): `field-headless field.fps_mean.min_delta_pct (-1.1%)` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM` Scene: field-headless, from the repository's save kokiri-start (vsync=2, frame_rate_cap=6, frame_generation=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); field-headless: 2 game starts a side, field 20 s after 5 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ f1f2dc5 | After: this PR @ 9391932 | |---|---|---| | field-headless · field · frame rate | 97.8 | 96.8 (−1%) | | field-headless · field · frame time (p99) (ms) | 13.2 | 14.5 (+10%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `windows+nvidia+vram-ge6gb` | [1](https://beanstalk.magicbean.dev/reports/rp_878cb1460c8c9141) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 621.24.0` `AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM` | | `windows+nvidia+vram-ge6gb` | [2](https://beanstalk.magicbean.dev/reports/rp_ad825be04ae6e02e) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 616.56.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM` | | `linux+nvidia` | [1](https://beanstalk.magicbean.dev/reports/rp_2a5f529c8aec9bba) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM` | | `linux+nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_aeaee3be4f7fd1e7) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5080, 620.73.4` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` | | `linux+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_c482dbd885ad0006) | linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM` | | `linux+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_4c1edb1219cd0876) | linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM` | </details> </details>
klimovich008 changed title from WIP: perf(vk): the mesh-draw scan looks each op's kind up in a table to perf(vk): the mesh-draw scan looks each op's kind up in a table 2026-11-21 04:26:41 +00:00
Author
Member

@Beanstalk the same comparison headless instead of windowed, so Linux can run too: this PR's head against main, Hyrule Field from the load (the camera need not turn during the measure step), frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0, 2 runs a side, on Windows NVIDIA with 6 GB of VRAM or more, Linux NVIDIA and Linux AMD. Report fps, frame time p99 and any crash or hang per side; a crash, hang, lower fps or higher p99 fails the no-loss check. The replay still runs headless, which is what this change touches.

@Beanstalk the same comparison headless instead of windowed, so Linux can run too: this PR's head against main, Hyrule Field from the load (the camera need not turn during the measure step), `frame_rate_cap = 6` (Uncapped), `vsync = 2` (Off), `frame_generation = 0`, 2 runs a side, on Windows NVIDIA with 6 GB of VRAM or more, Linux NVIDIA and Linux AMD. Report fps, frame time p99 and any crash or hang per side; a crash, hang, lower fps or higher p99 fails the no-loss check. The replay still runs headless, which is what this change touches.
Author
Member

@Beanstalk test it anyway (the headless alternative on Windows NVIDIA, Linux NVIDIA and Linux AMD is what this PR needs)

@Beanstalk test it anyway (the headless alternative on Windows NVIDIA, Linux NVIDIA and Linux AMD is what this PR needs)
BeanBot requested changes 2026-11-21 04:27:58 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The lookup preserves the current command classifications, but the new test can pass using a different initializer from the one the renderer compiles. The earlier Windows runs show a lower scan sample share. The gain still needs confirmation against the current base.

The renderer classifies each command with a bounds check and a byte lookup instead of walking a 37-opcode list. This reduces recording work for players using native mesh batching. The runtime addition is a 256-byte static table, with no new allocation or player setting. The test adds a partial C++ preprocessor that can give false confidence about which table it checks.

@fix will do (6)

  1. L1 tests/test_mesh_conv.py:75: The source cutter can silently select the inactive configuration. (more on the line)
  2. L2 (minor) tests/mesh_conv_test.cpp:284: The past_pass variant first fails at NOP_COUNT_, which is inside the 256-entry table. (more on the line)
  3. L3 (minor) tests/mesh_conv_test.cpp:304: The fixture queries out-of-range opcodes but constructs every table from in-range opcodes. (more on the line)
  4. L4 (its part an edit can do): Report per-run absolute render-thread CPU time per frame alongside the scan's sample share so the claimed saving can be checked.
  5. L6 (minor): The hardware summary calls mesh_args_rewrite the RADV compute fallback and says RADV never scans. That function gates a separate argument-rewrite mode. Automatic RADV skips the scan through dev.mesh_shader, while forced native on a supported RADV device can reach it. Describe the two gates and qualify the RADV and Deck statement with Automatic mode.
  6. L7 (minor): Testing says Beanstalk was asked in a comment, but the review snapshot contains no comments or farm runs. Update the description to match the request status. The checks box also says shared failures are named, while Testing names only the mesh fixture among the 75 reported failures. Include the paired test summaries or list the shared failures.

For the author (2) (a run, a measurement or a decision)

  • L4 (minor): Repeat the comparison on the current base and final PR head. The old pair predates the fallback fix and other renderer and host changes, and sample percentages alone do not establish milliseconds saved per frame. Report the matched-build, warmed, interleaved runs with their spread, render-thread CPU time per frame, average and 1% low fps, and median and p99 frame time. Include the source log lines and a representative player preset alongside the uncapped diagnostic.
  • L5 (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage.

Checks: Still running: CI / Website build and checks (pull_request), PR description / Description follows the template (pull_request_target), CI / Conventional Commit title (pull_request), CI / Workflow lint (actionlint) (pull_request), Guide screenshots / Guide images and local UI source review (pull_request), Third-party parts / As their notes say (pull_request).

More: does it help, other systems, switches, what was read

Does it help: Unproven on the current head. On the author's Windows RX 9070 XT system, three sampled runs per side attributed 2.30–2.65% of render-thread samples to the old scan and caller versus 0.62–0.74% to the new inlined scan and caller. Three unsampled pairs reported median 85.24 → 90.34 fps and p99 frame time 17.7 → 16.7 ms. Those runs compared 87c0d7b4 with 4c4583b0. Current base f1f2dc5b contains subsequent renderer and host changes. The summary lacks the per-run spread and the render-thread CPU time per frame needed to verify the claimed 0.2 ms saving.

Other systems: The scan runs when the recording uses mode 2, the device uses native mesh shaders, and argument rewriting is off. That includes eligible Windows and Linux configs, including RADV when native shaders are explicitly forced. Automatic RADV and Steam Deck use compute and skip the scan. The table is shared read-only and adds no GPU buffers or synchronization. Replay waits, registration order, ring allocation and draw conversion follow the existing paths. No host API, shader cache, save, audio, input or installer changes.

Switches: None added, changed or removed. RX_VK_MESH_CONV still defaults to 2 and retains the device and argument-rewrite gates. Modes 0 and 1 bypass the scan. The table lookup needs no separate switch.

Reviewed: 9391932ee7 against f1f2dc5bd2: Read AGENTS.md, CONTRIBUTING.md, the PR template and developer standards. docs/review-checklist.md is absent. Read mesh_conv.h, mesh_conv_test.cpp and test_mesh_conv.py in full. Read the changed vk_replay.cpp routine, both scan call sites, replay entry and scan statistics in context. The rest of vk_replay.cpp was skimmed for dependencies. Traced opcode definitions, command recording, mesh conversion and device policy, and inspected the source cutter, compiler selection and changed commits. The PR description supplies the run summaries. No run artifacts, translations or generated files changed.; nothing run (a code review).

Checked and fine:

  • The production pass list matches the base. Draw takes precedence if listed twice, and unlisted or out-of-range lookups return Stop without truncating the opcode.
  • The replay table is immutable and initialized at compile time. The scan scratch vector is thread-local with automatic destruction, and the statistics still use atomic counters.
  • The renderer change adds no platform-specific path handling, CPU instruction requirement or new failure path. The test runner still honors CXX and uses standard-library tooling and temporary files.
  • All PR commits contain AI co-author trailers. The diff contains no game-derived files, build outputs, generated changes, third-party edits or renderer API changes.

Testing: Read-only review. git diff --check produced no output. The author reports GCC passes on Windows and Linux and an existing Clang error in the fallback fixture that prevents the new model from running on the current base and head. The supplied CI snapshot has six checks pending and no head-only failures. No independent runs were performed.

Overlaps and merge order: #1846 introduced the batching path. #1946 is already in the base and its fallback fixture is retained. No open overlap or merge-order dependency surfaced in the supplied material.


Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The lookup preserves the current command classifications, but the new test can pass using a different initializer from the one the renderer compiles. The earlier Windows runs show a lower scan sample share. The gain still needs confirmation against the current base. The renderer classifies each command with a bounds check and a byte lookup instead of walking a 37-opcode list. This reduces recording work for players using native mesh batching. The runtime addition is a 256-byte static table, with no new allocation or player setting. The test adds a partial C++ preprocessor that can give false confidence about which table it checks. **`@fix` will do (6)** 1. **L1** `tests/test_mesh_conv.py:75`: The source cutter can silently select the inactive configuration. (more on the line) 2. **L2** (minor) `tests/mesh_conv_test.cpp:284`: The `past_pass` variant first fails at `NOP_COUNT_`, which is inside the 256-entry table. (more on the line) 3. **L3** (minor) `tests/mesh_conv_test.cpp:304`: The fixture queries out-of-range opcodes but constructs every table from in-range opcodes. (more on the line) 4. **L4** (its part an edit can do): Report per-run absolute render-thread CPU time per frame alongside the scan's sample share so the claimed saving can be checked. 5. **L6** (minor): The hardware summary calls `mesh_args_rewrite` the RADV compute fallback and says RADV never scans. That function gates a separate argument-rewrite mode. Automatic RADV skips the scan through `dev.mesh_shader`, while forced native on a supported RADV device can reach it. Describe the two gates and qualify the RADV and Deck statement with Automatic mode. 6. **L7** (minor): Testing says Beanstalk was asked in a comment, but the review snapshot contains no comments or farm runs. Update the description to match the request status. The checks box also says shared failures are named, while Testing names only the mesh fixture among the 75 reported failures. Include the paired test summaries or list the shared failures. **For the author (2)** (a run, a measurement or a decision) - **L4** (minor): Repeat the comparison on the current base and final PR head. The old pair predates the fallback fix and other renderer and host changes, and sample percentages alone do not establish milliseconds saved per frame. Report the matched-build, warmed, interleaved runs with their spread, render-thread CPU time per frame, average and 1% low fps, and median and p99 frame time. Include the source log lines and a representative player preset alongside the uncapped diagnostic. - **L5** (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage. **Checks:** Still running: `CI / Website build and checks (pull_request)`, `PR description / Description follows the template (pull_request_target)`, `CI / Conventional Commit title (pull_request)`, `CI / Workflow lint (actionlint) (pull_request)`, `Guide screenshots / Guide images and local UI source review (pull_request)`, `Third-party parts / As their notes say (pull_request)`. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven on the current head. On the author's Windows RX 9070 XT system, three sampled runs per side attributed 2.30–2.65% of render-thread samples to the old scan and caller versus 0.62–0.74% to the new inlined scan and caller. Three unsampled pairs reported median 85.24 → 90.34 fps and p99 frame time 17.7 → 16.7 ms. Those runs compared 87c0d7b4 with 4c4583b0. Current base f1f2dc5b contains subsequent renderer and host changes. The summary lacks the per-run spread and the render-thread CPU time per frame needed to verify the claimed 0.2 ms saving. **Other systems:** The scan runs when the recording uses mode 2, the device uses native mesh shaders, and argument rewriting is off. That includes eligible Windows and Linux configs, including RADV when native shaders are explicitly forced. Automatic RADV and Steam Deck use compute and skip the scan. The table is shared read-only and adds no GPU buffers or synchronization. Replay waits, registration order, ring allocation and draw conversion follow the existing paths. No host API, shader cache, save, audio, input or installer changes. **Switches:** None added, changed or removed. RX_VK_MESH_CONV still defaults to 2 and retains the device and argument-rewrite gates. Modes 0 and 1 bypass the scan. The table lookup needs no separate switch. **Reviewed:** 9391932ee7c5 against f1f2dc5bd282: Read AGENTS.md, CONTRIBUTING.md, the PR template and developer standards. docs/review-checklist.md is absent. Read mesh_conv.h, mesh_conv_test.cpp and test_mesh_conv.py in full. Read the changed vk_replay.cpp routine, both scan call sites, replay entry and scan statistics in context. The rest of vk_replay.cpp was skimmed for dependencies. Traced opcode definitions, command recording, mesh conversion and device policy, and inspected the source cutter, compiler selection and changed commits. The PR description supplies the run summaries. No run artifacts, translations or generated files changed.; nothing run (a code review). **Checked and fine:** - The production pass list matches the base. Draw takes precedence if listed twice, and unlisted or out-of-range lookups return Stop without truncating the opcode. - The replay table is immutable and initialized at compile time. The scan scratch vector is thread-local with automatic destruction, and the statistics still use atomic counters. - The renderer change adds no platform-specific path handling, CPU instruction requirement or new failure path. The test runner still honors CXX and uses standard-library tooling and temporary files. - All PR commits contain AI co-author trailers. The diff contains no game-derived files, build outputs, generated changes, third-party edits or renderer API changes. **Testing:** Read-only review. git diff --check produced no output. The author reports GCC passes on Windows and Linux and an existing Clang error in the fallback fixture that prevents the new model from running on the current base and head. The supplied CI snapshot has six checks pending and no head-only failures. No independent runs were performed. **Overlaps and merge order:** #1846 introduced the batching path. #1946 is already in the base and its fallback fixture is retained. No open overlap or merge-order dependency surfaced in the supplied material. </details> --- <sub>Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.</sub>
@ -266,0 +281,4 @@
// (kind_of, or a broken one: table_shift, past_pass)
mesh_conv::OpKind kind_tested(const mesh_conv::Ops& ops, uint32_t op) {
if (variant == "table_shift") return mesh_conv::kind_of(ops, op + 1);
if (variant == "past_pass" && op >= NOP_COUNT_) return mesh_conv::OpKind::Pass;
Member

L2 (minor): The past_pass variant first fails at NOP_COUNT_, which is inside the 256-entry table. It demonstrates an unlisted entry being answered Pass, while the description says it demonstrates an opcode beyond the table being answered Pass. Start this variant at kOpTable so the failure checks the claimed boundary.

**L2** (minor): The `past_pass` variant first fails at `NOP_COUNT_`, which is inside the 256-entry table. It demonstrates an unlisted entry being answered Pass, while the description says it demonstrates an opcode beyond the table being answered Pass. Start this variant at `kOpTable` so the failure checks the claimed boundary.
@ -266,0 +301,4 @@
return true;
}
// (made in a constant expression, as the replay's `static constexpr` Ops is: the model fails to build if it cannot be)
constexpr uint32_t const_ops_list[] = {PASS_OPS};
Member

L3 (minor): The fixture queries out-of-range opcodes but constructs every table from in-range opcodes. Removing either range check in make_ops would leave these cases green. Add constexpr cases that supply kOpTable as a pass opcode and as the draw opcode, then verify it stays Stop and a valid entry still classifies correctly.

**L3** (minor): The fixture queries out-of-range opcodes but constructs every table from in-range opcodes. Removing either range check in `make_ops` would leave these cases green. Add constexpr cases that supply `kOpTable` as a pass opcode and as the draw opcode, then verify it stays Stop and a valid entry still classifies correctly.
@ -37,0 +72,4 @@
elif re.match(r"#\s*endif", d) or (depth == 1 and re.match(r"#\s*(?:else|elif)\b", d)):
depth -= 1
line = ""
elif re.match(r"#\s*if\s+0\b", d):
Member

L1: The source cutter can silently select the inactive configuration. With the live initializer in #if 0 || 1 and a correct copy in #else, the compiler uses the first initializer while live_code discards it and the test checks the copy. An off-by-one pass-list count in the live initializer can therefore escape the test. Compile the same configuration the replay consumes, or reject conditional declarations the extractor cannot resolve. Cover a case where the inactive copy is correct and the live initializer is wrong.

**L1**: The source cutter can silently select the inactive configuration. With the live initializer in `#if 0 || 1` and a correct copy in `#else`, the compiler uses the first initializer while `live_code` discards it and the test checks the copy. An off-by-one pass-list count in the live initializer can therefore escape the test. Compile the same configuration the replay consumes, or reject conditional declarations the extractor cannot resolve. Cover a case where the inactive copy is correct and the live initializer is wrong.
Owner
@fix
Member

I didn't fix this pull request: docs/user/images/guide/settings-graphics.png isn't a UTF-8 text file. Nothing was pushed.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I didn't fix this pull request: docs/user/images/guide/settings-graphics.png isn't a UTF-8 text file. Nothing was pushed. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner
@fix
Member

I didn't fix this pull request: it failed (Codex didn't finish with an answer (exit 1)). Nothing was pushed.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I didn't fix this pull request: it failed (Codex didn't finish with an answer (exit 1)). Nothing was pushed. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner
@fix
Member

The ChatGPT usage limit is reached (it resets Nov 25th, 2026 1:04 AM), so this fix is paused. It runs by itself once the limit lifts (tried again every 30 minutes); nothing needs asking again.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

The ChatGPT usage limit is reached (it resets Nov 25th, 2026 1:04 AM), so this fix is paused. It runs by itself once the limit lifts (tried again every 30 minutes); nothing needs asking again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner
@fix
Member

I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is f432bd1df8. I edited the pull request's description too (3 edits).

Changed

  • Conditional source extraction: tests/test_mesh_conv.py:42 rejects directives in the extracted function and checks a conditional with a wrong active initializer and correct inactive copy.
  • Past-table negative variant: tests/mesh_conv_test.cpp:284 starts the past_pass variant at kOpTable.
  • Out-of-range table construction: tests/mesh_conv_test.cpp:306 adds constexpr constructions with out-of-range pass and draw opcodes, checks valid entries, and checks the boundary answers Stop.
  • RADV hardware summary: The description edit explains the separate batching gates and qualifies the RADV and Deck behavior with Automatic mode.

Not done this time (still open: the next @fix takes it)

  • Guide screenshot check: The branch’s screenshot manifest predates the base’s refreshed guide capture and source reviews. Bring the branch up to date with the base and recheck; the truncated log does not establish which issues remain afterward.
  • Website build check: The log omits the error message. The base includes later Graphics guide and website parser fixes; bring the branch up to date and recheck before identifying any remaining failure.
  • Testing description: The supplied description already records the Beanstalk request, but it does not provide the paired test summaries or the shared failure list. The author must supply those results; they cannot be reconstructed from the counts alone.

Left for the author

  • Matched performance measurements: Run warmed, interleaved matched builds of the current base and final head with the uncapped and representative presets. Report per-run render-thread CPU time per frame and scan sample share, spread, average and 1% low fps, median and p99 frame time, and source log lines. The supplied data does not contain the per-run values.

Still for the author (no edit does these)

  • L5 (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage.

Nothing was built or run: check the change. Its review follows.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is f432bd1df818. I edited the pull request's description too (3 edits). **Changed** - **Conditional source extraction**: tests/test_mesh_conv.py:42 rejects directives in the extracted function and checks a conditional with a wrong active initializer and correct inactive copy. - **Past-table negative variant**: tests/mesh_conv_test.cpp:284 starts the past_pass variant at kOpTable. - **Out-of-range table construction**: tests/mesh_conv_test.cpp:306 adds constexpr constructions with out-of-range pass and draw opcodes, checks valid entries, and checks the boundary answers Stop. - **RADV hardware summary**: The description edit explains the separate batching gates and qualifies the RADV and Deck behavior with Automatic mode. **Not done this time (still open: the next `@fix` takes it)** - **Guide screenshot check**: The branch’s screenshot manifest predates the base’s refreshed guide capture and source reviews. Bring the branch up to date with the base and recheck; the truncated log does not establish which issues remain afterward. - **Website build check**: The log omits the error message. The base includes later Graphics guide and website parser fixes; bring the branch up to date and recheck before identifying any remaining failure. - **Testing description**: The supplied description already records the Beanstalk request, but it does not provide the paired test summaries or the shared failure list. The author must supply those results; they cannot be reconstructed from the counts alone. **Left for the author** - **Matched performance measurements**: Run warmed, interleaved matched builds of the current base and final head with the uncapped and representative presets. Report per-run render-thread CPU time per frame and scan sample share, spread, average and 1% low fps, median and p99 frame time, and source log lines. The supplied data does not contain the per-run values. **Still for the author** (no edit does these) - **L5** (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage. Nothing was built or run: check the change. Its review follows. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
test(vk): guard mesh scan fixture boundaries
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 24s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 30s
CI / Workflow lint (actionlint) (pull_request) Successful in 32s
Third-party parts / As their notes say (pull_request) Successful in 30s
beanstalk/approval not approved yet
PR description / Description follows the template (pull_request_target) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
f432bd1df8
As the review on #2008 asked.
BeanBot left a comment

Recommendation: Request changes. The table preserves the scan’s classifications, and the reported samples show less scan work on the tested PC. A current-base comparison and affected hardware results are still needed to establish the player-facing gain and coverage. (It stands on L8: The check Guide screenshots / Guide images and local UI source review (pull_request) fails on this head and passes on the base branch: Failing after 10s.)

The native mesh batching scan replaces a linear opcode search with a compile-time lookup table. It simplifies each lookup at the cost of a small static table; the latest commit strengthens the test’s extraction and boundary checks.

@fix will do (4)

  1. L4 (its part an edit can do): Report per-run absolute render-thread CPU time per frame alongside the scan's sample share so the claimed saving can be checked.
  2. L7 (minor): The updated Testing section says no Beanstalk request is recorded, but the supplied comments contain requests for these comparisons. It also still lacks the paired test summaries or shared failure list for the 75 failures. Correct the request status and include the summaries or list.
  3. L8: The check Guide screenshots / Guide images and local UI source review (pull_request) fails on this head and passes on the base branch: Failing after 10s.
  4. L9: The check CI / Website build and checks (pull_request) fails on this head and passes on the base branch: Failing after 21s.

For the author (2) (a run, a measurement or a decision)

  • L4 (minor): Repeat the comparison on the current base and final PR head. The old pair predates the fallback fix and other renderer and host changes, and sample percentages alone do not establish milliseconds saved per frame. Report the matched-build, warmed, interleaved runs with their spread, render-thread CPU time per frame, average and 1% low fps, and median and p99 frame time. Include the source log lines and a representative player preset alongside the uncapped diagnostic.
  • L5 (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage.

Since the last review (on 9391932ee7)
Resolved: L1 (The source cutter can silently select the inactive configuration. With the live initialize…); L2 (The past_pass variant first fails at NOP_COUNT_, which is inside the 256-entry table.…); L3 (The fixture queries out-of-range opcodes but constructs every table from in-range opcodes.…); L6 (The hardware summary calls mesh_args_rewrite the RADV compute fallback and says RADV nev…)
Still open: L4 (Repeat the comparison on the current base and final PR head. The old pair predates the fal…); L5 (The affected Tier 1 native configurations still need results. An Automatic Linux AMD run o…); L7 (The updated Testing section says no Beanstalk request is recorded, but the supplied commen…)
New: L8 (The check Guide screenshots / Guide images and local UI source review (pull_request) fai…); L9 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)

More: does it help, other systems, switches, what was read

Does it help: Unproven on the current base and final head. On an earlier pair, the reported scan share of render-thread samples fell from 2.30–2.65% including its caller to 0.62–0.74%; the claimed approximately 0.2 ms per frame is not supported by reported absolute render-thread times. Median FPS was 85.24 versus 90.34 across three pairs, but the author does not claim that difference as the gain.

Other systems: The changed scan runs on eligible native mesh-shader recordings. Automatic RADV and Steam Deck configurations use the fallback and skip it; supported RADV devices forced to native mode can reach it. Windows and Linux NVIDIA, AMD native coverage, and a slower CPU still need the comparisons described in L5.

Switches: None added, changed or removed. Existing RX_VK_MESH_CONV modes 0 and 1 disable batching and its scan; mode 2 enables it where the other gates permit.

Reviewed: f432bd1df8 against f1f2dc5bd2: Read AGENTS.md, CONTRIBUTING.md, the pull request template, mesh_conv.h and test_mesh_conv.py, and the supplied description, comments, CI and ledger. Reviewed the diffs and relevant mesh_conv_test.cpp and vk_replay.cpp sections; the large replay file and surrounding callers were skimmed. The review checklist file was absent; the network and adjacent Tooling instructions were unavailable.; nothing run (a code review).

Checked and fine:

  • The pass list remains unchanged, Draw takes precedence over Pass, and unlisted or out-of-range opcodes return Stop.
  • The new constexpr boundary fixtures exercise both construction guards.
  • The supplied Windows AMD game run reports matching mesh counters and no visible foliage difference.

Testing: No code or tests were run during this read-only review. The author reports matching Windows game results and GCC fixture passes; the reported Clang fixture failure also occurs on main. Two head-only CI failures are supplied separately and are not restated as review items.

Overlaps and merge order: none found


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The table preserves the scan’s classifications, and the reported samples show less scan work on the tested PC. A current-base comparison and affected hardware results are still needed to establish the player-facing gain and coverage. (It stands on L8: The check `Guide screenshots / Guide images and local UI source review (pull_request)` fails on this head and passes on the base branch: Failing after 10s.) The native mesh batching scan replaces a linear opcode search with a compile-time lookup table. It simplifies each lookup at the cost of a small static table; the latest commit strengthens the test’s extraction and boundary checks. **`@fix` will do (4)** 1. **L4** (its part an edit can do): Report per-run absolute render-thread CPU time per frame alongside the scan's sample share so the claimed saving can be checked. 2. **L7** (minor): The updated Testing section says no Beanstalk request is recorded, but the supplied comments contain requests for these comparisons. It also still lacks the paired test summaries or shared failure list for the 75 failures. Correct the request status and include the summaries or list. 3. **L8**: The check `Guide screenshots / Guide images and local UI source review (pull_request)` fails on this head and passes on the base branch: Failing after 10s. 4. **L9**: The check `CI / Website build and checks (pull_request)` fails on this head and passes on the base branch: Failing after 21s. **For the author (2)** (a run, a measurement or a decision) - **L4** (minor): Repeat the comparison on the current base and final PR head. The old pair predates the fallback fix and other renderer and host changes, and sample percentages alone do not establish milliseconds saved per frame. Report the matched-build, warmed, interleaved runs with their spread, render-thread CPU time per frame, average and 1% low fps, and median and p99 frame time. Include the source log lines and a representative player preset alongside the uncapped diagnostic. - **L5** (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage. **Since the last review** (on 9391932ee7c5) Resolved: L1 (The source cutter can silently select the inactive configuration. With the live initialize…); L2 (The `past_pass` variant first fails at `NOP_COUNT_`, which is inside the 256-entry table.…); L3 (The fixture queries out-of-range opcodes but constructs every table from in-range opcodes.…); L6 (The hardware summary calls `mesh_args_rewrite` the RADV compute fallback and says RADV nev…) Still open: L4 (Repeat the comparison on the current base and final PR head. The old pair predates the fal…); L5 (The affected Tier 1 native configurations still need results. An Automatic Linux AMD run o…); L7 (The updated Testing section says no Beanstalk request is recorded, but the supplied commen…) New: L8 (The check `Guide screenshots / Guide images and local UI source review (pull_request)` fai…); L9 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven on the current base and final head. On an earlier pair, the reported scan share of render-thread samples fell from 2.30–2.65% including its caller to 0.62–0.74%; the claimed approximately 0.2 ms per frame is not supported by reported absolute render-thread times. Median FPS was 85.24 versus 90.34 across three pairs, but the author does not claim that difference as the gain. **Other systems:** The changed scan runs on eligible native mesh-shader recordings. Automatic RADV and Steam Deck configurations use the fallback and skip it; supported RADV devices forced to native mode can reach it. Windows and Linux NVIDIA, AMD native coverage, and a slower CPU still need the comparisons described in L5. **Switches:** None added, changed or removed. Existing RX_VK_MESH_CONV modes 0 and 1 disable batching and its scan; mode 2 enables it where the other gates permit. **Reviewed:** f432bd1df818 against f1f2dc5bd282: Read AGENTS.md, CONTRIBUTING.md, the pull request template, mesh_conv.h and test_mesh_conv.py, and the supplied description, comments, CI and ledger. Reviewed the diffs and relevant mesh_conv_test.cpp and vk_replay.cpp sections; the large replay file and surrounding callers were skimmed. The review checklist file was absent; the network and adjacent Tooling instructions were unavailable.; nothing run (a code review). **Checked and fine:** - The pass list remains unchanged, Draw takes precedence over Pass, and unlisted or out-of-range opcodes return Stop. - The new constexpr boundary fixtures exercise both construction guards. - The supplied Windows AMD game run reports matching mesh counters and no visible foliage difference. **Testing:** No code or tests were run during this read-only review. The author reports matching Windows game results and GCC fixture passes; the reported Clang fixture failure also occurs on main. Two head-only CI failures are supplied separately and are not restated as review items. **Overlaps and merge order:** none found </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
Member

Beanstalk test farm

Commit a6ef02b · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `a6ef02b` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/2008) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
Owner
@fix
Member

I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is c7883df9b1. I merged main (fd7dc40db0) into it, as it has merge commits. I edited the pull request's description too (1 edit).

Changed in part (the rest is for the author)

  • PR description check: Corrected the farm request status and identified who runs the hardware comparisons in the proposed description edit. The author must provide the shared failure list or paired test summaries before the test checklist can accurately be ticked.
  • Testing section request status and failure details: Corrected the Beanstalk request status in the proposed description edit. The author must supply the paired test summaries or shared failure list for the 75 failures; they are not present in the supplied evidence.

Not done this time (still open: the next @fix takes it)

  • Guide screenshot source review: The checkout has an older graphics image and 37 source-review mismatches. The base has a newer image and review record. Updating the hashes without reviewing the image would misrepresent the evidence; the binary cannot be changed under this task's rules. The author must reconcile the guide with the current base and review the image and sources.

Left for the author

  • Current-base performance measurements: The author must run matched, warmed, interleaved comparisons on the current base and final head, with the uncapped diagnostic and a representative player preset. Report per-run absolute render-thread CPU time per frame alongside scan sample shares, spread, average and 1% low fps, median and p99 frame time, and source log lines. The supplied evidence does not contain those measurements.

Still for the author (no edit does these)

  • L5 (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage.

Nothing was built or run: check the change. It will be reviewed again.


Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is c7883df9b154. I merged `main` (fd7dc40db0f6) into it, as it has merge commits. I edited the pull request's description too (1 edit). **Changed in part (the rest is for the author)** - **PR description check**: Corrected the farm request status and identified who runs the hardware comparisons in the proposed description edit. The author must provide the shared failure list or paired test summaries before the test checklist can accurately be ticked. - **Testing section request status and failure details**: Corrected the Beanstalk request status in the proposed description edit. The author must supply the paired test summaries or shared failure list for the 75 failures; they are not present in the supplied evidence. **Not done this time (still open: the next `@fix` takes it)** - **Guide screenshot source review**: The checkout has an older graphics image and 37 source-review mismatches. The base has a newer image and review record. Updating the hashes without reviewing the image would misrepresent the evidence; the binary cannot be changed under this task's rules. The author must reconcile the guide with the current base and review the image and sources. **Left for the author** - **Current-base performance measurements**: The author must run matched, warmed, interleaved comparisons on the current base and final head, with the uncapped diagnostic and a representative player preset. Report per-run absolute render-thread CPU time per frame alongside scan sample shares, spread, average and 1% low fps, median and p99 frame time, and source log lines. The supplied evidence does not contain those measurements. **Still for the author** (no edit does these) - **L5** (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage. Nothing was built or run: check the change. It will be reviewed again. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Merge main into perf/mesh-scan-op-table
Some checks failed
beanstalk/approval not approved yet
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 19s
CI / Conventional Commit title (pull_request) Successful in 22s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 29s
CI / Workflow lint (actionlint) (pull_request) Successful in 30s
Third-party parts / As their notes say (pull_request) Successful in 37s
CI / Website build and checks (pull_request) Has been cancelled
c7883df9b1
BeanBot left a comment

Recommendation: Wait. The sampled scan cost fell on the author's Windows AMD system, but the claimed per-frame saving has not been established against the current base and final head. The remaining hardware comparisons are also needed before merge.

The mesh-draw scan replaces a linear opcode search with a compile-time lookup table, reducing work on the native mesh path while preserving the existing batching behavior. The cost is a small fixed table and test complexity.

@fix will do (2)

  1. L4 (its part an edit can do): Report per-run absolute render-thread CPU time per frame alongside the scan's sample share so the claimed saving can be checked.
  2. L7 (minor): The Testing section reports 75 identical failures on the branch and main but does not include the paired summaries or shared failure list. Add either so readers can identify the failures.

For the author (2) (a run, a measurement or a decision)

  • L4 (minor): Repeat the comparison on the current base and final PR head. The old pair predates the fallback fix and other renderer and host changes, and sample percentages alone do not establish milliseconds saved per frame. Report the matched-build, warmed, interleaved runs with their spread, render-thread CPU time per frame, average and 1% low fps, and median and p99 frame time. Include the source log lines and a representative player preset alongside the uncapped diagnostic.
  • L5 (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage.

Since the last review (on f432bd1df8)
Resolved: L8 (The check Guide screenshots / Guide images and local UI source review (pull_request) fai…); L9 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)
Still open: L4 (Repeat the comparison on the current base and final PR head. The old pair predates the fal…); L5 (The affected Tier 1 native configurations still need results. An Automatic Linux AMD run o…); L7 (The Testing section reports 75 identical failures on the branch and main but does not incl…)

More: does it help, other systems, switches, what was read

Does it help: Unproven against the current base and final head. On the earlier measured builds, the scan and caller fell from 2.30–2.65% to 0.62–0.74% of render-thread samples; absolute render-thread time per frame and a matched current-base comparison are missing.

Other systems: The scan runs on eligible native mesh-shader recordings, including forced native mode on supported RADV devices. Automatic RADV and Steam Deck use the compute fallback; Windows and Linux NVIDIA, slower CPUs, and AMD native and fallback coverage remain outstanding.

Switches: None added, changed or removed. RX_VK_MESH_CONV continues to control the existing batching path.

Reviewed: c7883df9b1 against fd7dc40db0: Read the supplied description, comments, CI and ledger; repository rules and PR template; the diff and relevant mesh conversion and test code. The large combined file output was truncated, so the full changed files and all dependent code were not read in full. No review checklist was present at docs/review-checklist.md.; nothing run (a code review).

Checked and fine:

  • The farm request status in the description agrees with the supplied comments.
  • The reported Windows AMD game run found matching mesh counters and no visible foliage differences.
  • No files differ from the earlier reviewed head.

Testing: No commands from the project or tests were run. The author reports paired game runs, GCC fixture passes, and a Clang fixture failure also present on main; the requested farm runs have no recorded results.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.

**Recommendation: Wait.** The sampled scan cost fell on the author's Windows AMD system, but the claimed per-frame saving has not been established against the current base and final head. The remaining hardware comparisons are also needed before merge. The mesh-draw scan replaces a linear opcode search with a compile-time lookup table, reducing work on the native mesh path while preserving the existing batching behavior. The cost is a small fixed table and test complexity. **`@fix` will do (2)** 1. **L4** (its part an edit can do): Report per-run absolute render-thread CPU time per frame alongside the scan's sample share so the claimed saving can be checked. 2. **L7** (minor): The Testing section reports 75 identical failures on the branch and main but does not include the paired summaries or shared failure list. Add either so readers can identify the failures. **For the author (2)** (a run, a measurement or a decision) - **L4** (minor): Repeat the comparison on the current base and final PR head. The old pair predates the fallback fix and other renderer and host changes, and sample percentages alone do not establish milliseconds saved per frame. Report the matched-build, warmed, interleaved runs with their spread, render-thread CPU time per frame, average and 1% low fps, and median and p99 frame time. Include the source log lines and a representative player preset alongside the uncapped diagnostic. - **L5** (minor): The affected Tier 1 native configurations still need results. An Automatic Linux AMD run on RADV exercises the compute fallback and cannot establish the lookup's effect on a Linux AMD native path. Identify the driver and log the active mesh mode for each farm run. Complete the Windows and Linux NVIDIA and slower-CPU comparisons, and distinguish AMD native coverage from AMD fallback smoke coverage. **Since the last review** (on f432bd1df818) Resolved: L8 (The check `Guide screenshots / Guide images and local UI source review (pull_request)` fai…); L9 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) Still open: L4 (Repeat the comparison on the current base and final PR head. The old pair predates the fal…); L5 (The affected Tier 1 native configurations still need results. An Automatic Linux AMD run o…); L7 (The Testing section reports 75 identical failures on the branch and main but does not incl…) <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against the current base and final head. On the earlier measured builds, the scan and caller fell from 2.30–2.65% to 0.62–0.74% of render-thread samples; absolute render-thread time per frame and a matched current-base comparison are missing. **Other systems:** The scan runs on eligible native mesh-shader recordings, including forced native mode on supported RADV devices. Automatic RADV and Steam Deck use the compute fallback; Windows and Linux NVIDIA, slower CPUs, and AMD native and fallback coverage remain outstanding. **Switches:** None added, changed or removed. RX_VK_MESH_CONV continues to control the existing batching path. **Reviewed:** c7883df9b154 against fd7dc40db0f6: Read the supplied description, comments, CI and ledger; repository rules and PR template; the diff and relevant mesh conversion and test code. The large combined file output was truncated, so the full changed files and all dependent code were not read in full. No review checklist was present at docs/review-checklist.md.; nothing run (a code review). **Checked and fine:** - The farm request status in the description agrees with the supplied comments. - The reported Windows AMD game run found matching mesh counters and no visible foliage differences. - No files differ from the earlier reviewed head. **Testing:** No commands from the project or tests were run. The author reports paired game runs, GCC fixture passes, and a Clang fixture failure also present on main; the requested farm runs have no recorded results. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
test(vk): the mesh scan test's docstring says main now fails sooner, at the model's build
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 14s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
Third-party parts / As their notes say (pull_request) Successful in 16s
PR description / Description follows the template (pull_request_target) Successful in 5s
beanstalk/approval not approved yet
CI / Website build and checks (pull_request) Successful in 2m32s
a6ef02b39e
Since the boundary fixtures call make_ops and kOpTable directly, main's mesh_conv.h no longer
builds the model, so the negative control stops before the overwritten-list check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean requested changes 2026-11-21 07:12:03 +00:00
Dismissed
HumanBean left a comment

Recommendation: Request changes (description only). The code is right and I would approve it as it is: it classifies every opcode exactly as the old walk did, the cost it removes is measured, and it can't act differently on another GPU, driver or OS. What has to change is the description. The mise run test box is unticked and the 75 shared failures aren't listed, so the template check fails.

For players on the native mesh path (the default on any GPU with mesh shaders), the render thread spends a little less time recording each frame. The scan after each barrier now finds an op's kind with one bounds check and one byte read, not a walk of a 37-entry list. The code comes out a little simpler. It costs a 256-byte table, built at compile time, and nothing else.

Does it help: Yes, as a CPU cost, with no player-visible fps change shown and none claimed. Sampled runs, 3 a side, on a Ryzen 7 5700X3D with an RX 9070 XT under Windows: the scan and its caller fell from 2.30-2.65 % of render-thread samples to 0.62-0.74 %. The two ranges don't overlap, which puts the saving at about 1.7 % of the render thread. The author's +6 % fps (85.24 → 90.34, 3 pairs) is rightly not claimed, since it is more than 0.2 ms can explain. The farm run on 9391932 shows nothing past the noise either way:

  • Windows NVIDIA: 109.6 → 109.4 fps, and only one of the two reports usable.
  • Linux AMD on RADV: 97.8 → 96.8 fps and p99 +10 %. RADV in Automatic mode takes the compute fallback and never runs this scan, so this row is a control. It shows how far the farm's numbers move on their own.

The fps rows are "no loss", not a gain, and the PR says so.

Why the farm run says "failed": the farm, not this PR.

  • The field-headless scenario's teleport timed out at "wait map HyruleField_Child" (the game was still in Kokiri Forest). That happened on both sides: on Linux NVIDIA, for example, the report has 0 usable starts for main and 0 for the PR. It happened on four of the six reports.
  • The two "fail" verdicts come from a min_delta_pct limit of 0.0 on fps, which any noise trips: −0.1 % on Windows NVIDIA, and −1.1 % on RADV, where the changed code doesn't run.
  • No crash or hang on any side. A rerun once the scenario reaches Hyrule Field would be welcome, but it doesn't hold the merge (see Testing).

Other systems:

  • NVIDIA and Intel, Windows and Linux, and RADV forced to native: they run the same CPU code, which gives the same answers for every opcode. Only the speed differs; nothing vendor-, driver- or OS-specific is touched.
  • RADV in Automatic mode and the Steam Deck take the compute fallback and never reach the scan (mesh_conv_batching() returns first).
  • The scan stays on the render thread, and the table is immutable static data, so it adds no synchronisation. Frame pacing, VRAM, saves, audio, input and the shader-cache stamp are untouched.

Switches: none added, changed or removed. RX_VK_MESH_CONV keeps its default of 2, and modes 0 and 1 still skip the scan. A plain speed-up needs no switch, so that is right.

Reviewed:

  • Head a6ef02b3, against main fd7dc40d (BeanBot's merge of main). The PR's own diff is identical to the one on f432bd1d against f1f2dc5b.
  • Read in full: gpu/vk/mesh_conv.h (the OpKind, Ops, make_ops and kind_of changes, and scan(), which uses them), mesh_conv_at_barrier in gpu/vk/vk_replay.cpp, tests/mesh_conv_test.cpp's diff and the model it drives, and tests/test_mesh_conv.py's diff.
  • The test only compiles the model and runs it in a temporary folder, and reaches nothing outside the repository.
  • The Beanstalk report pages and the comments were read. Nothing was run (a code review).

Fixed in this review: a6ef02b3, pushed to perf/mesh-scan-op-table. The test's docstring said main "fails there", at the overwritten-list check. Since f432bd1d added the boundary fixtures, which call make_ops and kOpTable directly, main's header no longer builds the model at all, so main now fails sooner. The docstring says so now. The same sentence in the description's Checks ("main fails there ("kind_of walks the list at each op: no table")") is stale for the same reason; that one is the author's to change.

Checked and fine:

  • The 37 pass ops are the same set, in the same order, as on main (compared by name).
  • Draw wins over Pass for NOP_DRAW_MESH, as the walk asked it first.
  • Every unlisted op is Stop, and so is every op at or past kOpTable, at build time and at lookup. That is the safe side: a rescan, never an early conversion.
  • NOP_COUNT_ <= kOpTable is checked by static_assert. rx_nvn.h has far fewer than 256 ops.
  • OpKind moved Stop to 0, and nothing outside mesh_conv.h and the test uses its values (grep).
  • static constexpr gives a compile-time table: no per-call build and no guard on a function-local static.
  • The constexpr loops need only C++14.
  • The test compares kind_of with the old walk for 0..4096, high-bit opcodes and huge values, on the replay's own initializer (cut from live code, now rejecting preprocessor directives). Its two new broken variants exercise the shift and the past-table boundary.
  • The removed any Ops in the test was unused.
  • The Measurements paragraph says why the counted cost still holds on a newer main. That still holds at fd7dc40d: between f1f2dc5b and fd7dc40d the only change to vk_replay.cpp is the Sprint Toggle's option line (from e6196f0f).
  • The Guide screenshots check fails on main fd7dc40d's push as well, so it isn't this PR's.

Blocking (to change before merge; all in the description)

  1. Checklist: mise run test passes (any failure that also fails on main is named). Testing gives 776 passed, 75 failed and 54 skipped on both sides, with "the failing files are identical", but it doesn't name them. List the shared failing files (or attach the paired run_all summaries) and tick the box. pr status and the "PR description" check fail on this alone.

Suggestions

  • Measurements: the "the branch is now on main @ f1f2dc5b" line could name fd7dc40d (the base after BeanBot's merge). Its reasoning still holds there, as checked above. That would also clear pr status's "measured on main 87c0d7b4" warning, which asks for exactly that sentence.
  • Checks: the "main fails there" claim, as under Fixed in this review.

Testing:

  • The author ran Windows 11 on an RX 9070 XT (AMD native path): 3 alternating pairs plus sampled and screenshot runs. The mesh counters match (47 draws from 30 batches, 0 dropped, 0 stale), the grass looks the same, and the game clock read 1.000.
  • The farm run on 9391932 couldn't be judged (the scenario's teleport timed out on both sides) and showed no crash.
  • Still wanted, and not holding the merge in my view: the NVIDIA runs (Test Farm, once the scenario reaches Hyrule Field) and the slower CPU (by hand). The change is the same CPU code on every vendor, so it can't plausibly act differently there.
  • CI on the head: the template check fails (Blocking 1), and Guide screenshots fails on main too. Website build was still pending when I looked.

Overlaps and merge order: none found. Among the open PRs, about twenty others touch vk_replay.cpp. None of them changes mesh_conv_at_barrier, pass_ops, mesh_conv.h or its tests. #2028's collect_kind_of is an unrelated function with a similar name.

**Recommendation: Request changes (description only).** The code is right and I would approve it as it is: it classifies every opcode exactly as the old walk did, the cost it removes is measured, and it can't act differently on another GPU, driver or OS. What has to change is the description. The `mise run test` box is unticked and the 75 shared failures aren't listed, so the template check fails. For players on the native mesh path (the default on any GPU with mesh shaders), the render thread spends a little less time recording each frame. The scan after each barrier now finds an op's kind with one bounds check and one byte read, not a walk of a 37-entry list. The code comes out a little simpler. It costs a 256-byte table, built at compile time, and nothing else. **Does it help:** Yes, as a CPU cost, with no player-visible fps change shown and none claimed. Sampled runs, 3 a side, on a Ryzen 7 5700X3D with an RX 9070 XT under Windows: the scan and its caller fell from 2.30-2.65 % of render-thread samples to 0.62-0.74 %. The two ranges don't overlap, which puts the saving at about 1.7 % of the render thread. The author's +6 % fps (85.24 → 90.34, 3 pairs) is rightly not claimed, since it is more than 0.2 ms can explain. The farm run on `9391932` shows nothing past the noise either way: - Windows NVIDIA: 109.6 → 109.4 fps, and only one of the two reports usable. - Linux AMD on RADV: 97.8 → 96.8 fps and p99 +10 %. RADV in Automatic mode takes the compute fallback and never runs this scan, so this row is a control. It shows how far the farm's numbers move on their own. The fps rows are "no loss", not a gain, and the PR says so. **Why the farm run says "failed":** the farm, not this PR. - The `field-headless` scenario's teleport timed out at "wait map HyruleField_Child" (the game was still in Kokiri Forest). That happened on both sides: on Linux NVIDIA, for example, the report has 0 usable starts for main and 0 for the PR. It happened on four of the six reports. - The two "fail" verdicts come from a `min_delta_pct` limit of 0.0 on fps, which any noise trips: −0.1 % on Windows NVIDIA, and −1.1 % on RADV, where the changed code doesn't run. - No crash or hang on any side. A rerun once the scenario reaches Hyrule Field would be welcome, but it doesn't hold the merge (see Testing). **Other systems:** - NVIDIA and Intel, Windows and Linux, and RADV forced to native: they run the same CPU code, which gives the same answers for every opcode. Only the speed differs; nothing vendor-, driver- or OS-specific is touched. - RADV in Automatic mode and the Steam Deck take the compute fallback and never reach the scan (`mesh_conv_batching()` returns first). - The scan stays on the render thread, and the table is immutable static data, so it adds no synchronisation. Frame pacing, VRAM, saves, audio, input and the shader-cache stamp are untouched. **Switches:** none added, changed or removed. `RX_VK_MESH_CONV` keeps its default of 2, and modes 0 and 1 still skip the scan. A plain speed-up needs no switch, so that is right. **Reviewed:** - Head `a6ef02b3`, against main `fd7dc40d` (BeanBot's merge of main). The PR's own diff is identical to the one on `f432bd1d` against `f1f2dc5b`. - Read in full: `gpu/vk/mesh_conv.h` (the `OpKind`, `Ops`, `make_ops` and `kind_of` changes, and `scan()`, which uses them), `mesh_conv_at_barrier` in `gpu/vk/vk_replay.cpp`, `tests/mesh_conv_test.cpp`'s diff and the model it drives, and `tests/test_mesh_conv.py`'s diff. - The test only compiles the model and runs it in a temporary folder, and reaches nothing outside the repository. - The Beanstalk report pages and the comments were read. Nothing was run (a code review). **Fixed in this review:** `a6ef02b3`, pushed to `perf/mesh-scan-op-table`. The test's docstring said main "fails there", at the overwritten-list check. Since `f432bd1d` added the boundary fixtures, which call `make_ops` and `kOpTable` directly, main's header no longer builds the model at all, so main now fails sooner. The docstring says so now. The same sentence in the description's Checks ("main fails there ("kind_of walks the list at each op: no table")") is stale for the same reason; that one is the author's to change. **Checked and fine:** - The 37 pass ops are the same set, in the same order, as on main (compared by name). - Draw wins over Pass for `NOP_DRAW_MESH`, as the walk asked it first. - Every unlisted op is Stop, and so is every op at or past `kOpTable`, at build time and at lookup. That is the safe side: a rescan, never an early conversion. - `NOP_COUNT_ <= kOpTable` is checked by `static_assert`. `rx_nvn.h` has far fewer than 256 ops. - `OpKind` moved Stop to 0, and nothing outside `mesh_conv.h` and the test uses its values (grep). - `static constexpr` gives a compile-time table: no per-call build and no guard on a function-local static. - The `constexpr` loops need only C++14. - The test compares `kind_of` with the old walk for 0..4096, high-bit opcodes and huge values, on the replay's own initializer (cut from live code, now rejecting preprocessor directives). Its two new broken variants exercise the shift and the past-table boundary. - The removed `any` Ops in the test was unused. - The Measurements paragraph says why the counted cost still holds on a newer main. That still holds at `fd7dc40d`: between `f1f2dc5b` and `fd7dc40d` the only change to `vk_replay.cpp` is the Sprint Toggle's option line (from `e6196f0f`). - The `Guide screenshots` check fails on main `fd7dc40d`'s push as well, so it isn't this PR's. **Blocking** (to change before merge; all in the description) 1. Checklist: `mise run test` passes (any failure that also fails on `main` is named). Testing gives 776 passed, 75 failed and 54 skipped on both sides, with "the failing files are identical", but it doesn't name them. List the shared failing files (or attach the paired `run_all` summaries) and tick the box. `pr status` and the "PR description" check fail on this alone. **Suggestions** - Measurements: the "the branch is now on main @ f1f2dc5b" line could name `fd7dc40d` (the base after BeanBot's merge). Its reasoning still holds there, as checked above. That would also clear `pr status`'s "measured on main 87c0d7b4" warning, which asks for exactly that sentence. - Checks: the "main fails there" claim, as under *Fixed in this review*. **Testing:** - The author ran Windows 11 on an RX 9070 XT (AMD native path): 3 alternating pairs plus sampled and screenshot runs. The mesh counters match (47 draws from 30 batches, 0 dropped, 0 stale), the grass looks the same, and the game clock read 1.000. - The farm run on `9391932` couldn't be judged (the scenario's teleport timed out on both sides) and showed no crash. - Still wanted, and not holding the merge in my view: the NVIDIA runs (Test Farm, once the scenario reaches Hyrule Field) and the slower CPU (by hand). The change is the same CPU code on every vendor, so it can't plausibly act differently there. - CI on the head: the template check fails (Blocking 1), and `Guide screenshots` fails on main too. Website build was still pending when I looked. **Overlaps and merge order:** none found. Among the open PRs, about twenty others touch `vk_replay.cpp`. None of them changes `mesh_conv_at_barrier`, `pass_ops`, `mesh_conv.h` or its tests. https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2028's `collect_kind_of` is an unrelated function with a similar name.
HumanBean approved these changes 2026-11-21 07:24:32 +00:00
HumanBean left a comment

Recommendation: Approve. The code classifies every opcode exactly as the old walk did. The CPU time it saves is measured, and it can't behave differently on another GPU, driver or OS. The description blocker from my last review is resolved.

Re-review: a6ef02b has the same code as my last review. Only the description changed:

  • The mise run test box is ticked, on the author's report that the failing files are the same on this branch and on main. I accepted that as the maintainer, since the list wasn't kept.
  • The Measurements now name the current base, fd7dc40d. Since f1f2dc5b, nothing touches mesh_conv.h or the scan. The only renderer change is the FPS counter footer's route record, which runs only while that footer is shown.

Does it help: Yes, as CPU time. The scan's share of render-thread samples fell from 2.30-2.65 % to 0.62-0.74 %, 3 runs a side on an RX 9070 XT. No fps gain is claimed.

Testing: the farm run on 9391932 couldn't judge the change: the scene's teleport timed out on main as well. It showed no crash. An NVIDIA run is still wanted, but it doesn't hold the merge, because this CPU code is the same on every vendor.

**Recommendation: Approve.** The code classifies every opcode exactly as the old walk did. The CPU time it saves is measured, and it can't behave differently on another GPU, driver or OS. The description blocker from my last review is resolved. **Re-review:** `a6ef02b` has the same code as my last review. Only the description changed: - The `mise run test` box is ticked, on the author's report that the failing files are the same on this branch and on `main`. I accepted that as the maintainer, since the list wasn't kept. - The Measurements now name the current base, `fd7dc40d`. Since `f1f2dc5b`, nothing touches `mesh_conv.h` or the scan. The only renderer change is the FPS counter footer's route record, which runs only while that footer is shown. **Does it help:** Yes, as CPU time. The scan's share of render-thread samples fell from 2.30-2.65 % to 0.62-0.74 %, 3 runs a side on an RX 9070 XT. No fps gain is claimed. **Testing:** the farm run on `9391932` couldn't judge the change: the scene's teleport timed out on main as well. It showed no crash. An NVIDIA run is still wanted, but it doesn't hold the merge, because this CPU code is the same on every vendor.
HumanBean deleted branch perf/mesh-scan-op-table 2026-11-21 07:26:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2008
No description provided.