perf(shaders): native task and mesh stages read global memory through the guest page table #2291

Merged
HumanBean merged 1 commit from TrashPanda/Longshot:perf/mesh-global-table into main 2026-11-23 16:06:49 +00:00
Contributor

Summary

#2103 sent the vertex, fragment and compute stages' global loads (and the mesh fallback's task and mesh stages') through the
guest page table. The native task and mesh stages kept the storage buffer search, and their load helpers are inlined at
every load (#994). Native mesh shaders are what NVIDIA runs, and AMD's Windows driver; RADV takes the compute fallback by
default (issue 2245), which already reads through the table, so on RADV this changes something only with
RX_VK_MESH_SHADERS=native. The mesh programs Kokiri Forest and Hyrule Field translate have 2,619
left-global loads in 141 task/mesh stages (up to 144 in one mesh stage), and each one tests every bound storage buffer's
range. The drivers turn that into very large shaders: on NVIDIA the largest mesh stages are 560-640 KB of code at 255
registers, and one pipeline (43ec86f35fd937b9) takes 32 s to compile.

This makes a native task or mesh stage that reads global memory read through the table alone, as the other stages do. Stores
and atomics keep the search, as everywhere else (in these scenes the task and mesh stages leave no store global, and one
mesh stage leaves 4 atomics). The result,
offline on the same SPIR-V (84 programs, both drivers here): mesh code 54% smaller on NVIDIA and 38% smaller on RADV, RADV's
SGPR spills 2,377 -> 176, pipeline compile time down about two thirds. In-game GPU time and frame rate: Measurements.

  • The constructor asks for the table's push member for a native task or mesh stage that reads global memory (before
    RX_VK_MESH_FIRST's task block can be made); DefineGlobalMemoryFunctions gives it device addresses and the push block
    (native_mesh_table), and table_stage takes every task and mesh stage.
  • RX_VK_GP_TABLE=2 checks native task and mesh loads against the table too (translate_program.cpp gives them the check
    buffer); only the mesh fallback's task and mesh stages stay out of the check, as before.
  • The host needs nothing: push_constants already pushes the table to every program with a stage that reads global memory,
    and gp_table_cover already covers a virtual pool's binding for any such stage.
  • No new switch: RX_VK_GP_TABLE=0 turns this off with the rest of #2103.

Read first: gpu/vk/eden/shader_recompiler/backend/spirv/spirv_emit_context.cpp (the constructor's native task/mesh block;
DefineGlobalMemoryFunctions: native_mesh_table, table_stage, table_check).

Coordination, before this leaves WIP: dyst claimed perf/mesh-global-helpers in the team room on 2026-11-21: HeyListen's
RX_VK_MESH_G3, RX_VK_MESH_NOINLINE_ABOVE and RX_VK_FOLD_PSEUDO, which make the same inlined native mesh load helpers
cheaper while keeping the search (no pull request yet). With this one their loads have no search left; G3's hoisting would
still apply to mesh stores and atomics. To be agreed with dyst which goes first, or whether both. And #2144 (dyst, WIP)
changes how translator_stamp holds switches: this PR adds no switch and moves the stamp only through the translator's
sources, so they should not conflict, but whichever lands second rebases and re-checks the stamp.

See #2103.

The idea came from reading Rekarina's notes (another PC port of this game), whose global-memory lookup was its largest
GPU cost; the change here is our own, built on #2103.

Testing

Tested: Linux (Ubuntu), RTX 4070 Ti (NVIDIA 595.99.02); Ryzen 7 9800X3D's Radeon iGPU (RADV, Mesa 26.0.8) for the offline
compiles.

  • Kokiri Forest and Hyrule Field (the test save, teleports 0 and 1), three runs each on main and on this branch: the same
    pictures (foliage, trees, rocks; Link lit by Navi wherever she flies on both sides), and logdiff of each pair of logs
    finds no warning or problem line new, gone or changed in count.
  • RX_VK_GP_TABLE=2 (the search kept, every task/mesh/vertex/fragment/compute load compared with the table's answer):
    Kokiri Forest, 0 loads read otherwise in 273 checked programs; 2,475,150 of 2,475,155 storage buffer bindings held by the
    table, 5 written (a virtual pool's), none outside its windows or served from a copy. Hyrule Field: 0 in 333 checked
    programs; 2,537,462 of 2,537,467 bindings held, 5 written. (A first Hyrule Field run in this mode timed out waiting for the
    game to read the controller: the check's own mesh stages, search and table and comparison inlined at every load, took up to
    9 s each to compile in play. The mode is a diagnostic; the second run, with those pipelines cached, passed.)
  • On main, RX_VK_MISS_LOG=1 in both scenes: no global access of a native task or mesh stage missed every binding (so the
    search found a binding for each, which the table maps), and no store or atomic anywhere was lost.
  • Checks: tests/global_load_16_ir.cpp now also emits native task and mesh stages with RX_VK_GP_TABLE 0, 1 and 2; with 1 no
    load helper searches, and the push block has its member at GUEST_PAGES_PUSH_OFFSET. All 37 modules pass spirv-val. On
    main the task stage with 1 fails ("a load helper still searches"). tests/test_mesh_fallback_pages.py checks the
    constructor's condition (and that it comes before RX_VK_MESH_FIRST's block) and the stages the check reaches (g++ and
    clang++). The suite against the merge base a2dc5385: 904 passed, 22 failed, 26 skipped on both; nothing fails on one side
    only.

Still to test:

  • Windows NVIDIA, and AMD's Windows driver (native mesh shaders there): Kokiri Forest and Hyrule Field, expecting the same
    pictures and lower GPU time, and a cold "Preparing shaders" expecting it shorter (@Beanstalk)

  • RADV with RX_VK_MESH_SHADERS=native (not the default, issue 2245) on an RX 6000-9000: the same (by hand; offline on this
    PC's RADV iGPU the mesh stages' code is 38% smaller and SGPR spills 2,377 -> 176)

  • Steam Deck, RADV at its default and the mesh fallback elsewhere (Intel, GCN, Windows RDNA 2): unchanged, the fallback's
    SPIR-V is the same as on main (@Beanstalk)

  • This PR's head (d19d3b543) is that commit cherry-picked onto current main 67ba729d (it applied cleanly), compiled with
    the build's flags; test_mesh_fallback_pages passes on it. The runs above were made at main a2dc5385; the game was not
    run again on this head.

Measurements

Verdict: faster on NVIDIA: +21% fps in Kokiri Forest and +14% in Hyrule Field, 1.20 and 0.90 ms less GPU time a frame;
the mesh stages' code half the size, and their pipelines compile in a third of the time.

Setup: Linux (Ubuntu), RTX 4070 Ti, NVIDIA 595.99.02, Ryzen 7 9800X3D. Kokiri Forest and Hyrule Field from the test save
(tools/gamerun.py: teleports 0 and 1), headless 1280x720 window with the 3D passes at 2560x1440 (the runtime's default
options), HOS_FPS_MAX=1000 (uncapped), 60 s in
the scene, the last 45 s measured from the frame trace (RX_VK_FRAME_TRACE) and the log's vk: GPU time lines; each run a
--mode timing job of the PC's queue (alone on the GPU: no other game ran during any of them), three interleaved rounds per
scene, the median. Baseline: dev.py ab needs a base at main's commit, which this PC does not have, so both sides are packs
over the shared base 3e4b1faf: main @ a2dc5385 and this branch (0a6d4d65, the same code as 69fc598e: one comment differs).

Kokiri Forest Before: main @ a2dc5385 After: this PR @ 69fc598e Δ
fps (3 runs) 136.6 / 70.4* / 136.7 165.2 / 164.8 / 166.1 +20.9% (median)
1% low fps (median) 124.9 148.4 +18.8%
median frame time 7.31 ms 6.05 ms -1.26 ms
p99 frame time 8.01 ms 6.74 ms -1.27 ms
GPU time a frame (every run) 6.20 ms 5.00 ms -1.20 ms
Hyrule Field Before: main @ a2dc5385 After: this PR @ 69fc598e Δ
fps (3 runs) 126.6 / 127.3 / 126.6 77.7* / 145.0 / 144.4 +14.1% (median)
1% low fps (median) 114.9 122.5 +6.6%
median frame time 7.86 ms 6.88 ms -0.98 ms
p99 frame time 8.70 ms 8.16 ms -0.54 ms
GPU time a frame 6.50 ms (every run) 5.50 / 5.60 / 5.60 ms -0.90 ms

* two runs (one a side) had 400-800 frames over 20 ms in which the game's main thread was blocked (main_blocked_ms): other
agents' check suites ran beside the timed run on this shared PC. Their GPU time is the same as their side's other runs, and
leaving them out changes no median by more than 0.1 fps.

Where the GPU time went, one more timed run a side with RX_VK_PASS_TIMING=2 (a timestamp at each change of program; the
spans add up to more than an unprofiled frame):

ms a frame Kokiri Forest: main this PR Hyrule Field: main this PR
all, timed 6.64 5.41 7.09 6.13
render passes (draws) 4.129 2.913 4.091 3.132
dispatches 1.082 1.080 1.348 1.349
mesh program 43ec86f35fd937b9 1.055 0.367 0.583 0.218
mesh program 636eed4d5000d1c0 / d8e59341cf4f629c 0.626 0.279 0.308 (d8e5) 0.141
a vertex program (1a7482c0ec9991ea), for comparison 0.259 0.260 0.259 0.259

Offline, the stored SPIR-V of the 84 mesh programs both scenes translated, compiled with VK_KHR_pipeline_executable_properties
statistics and the drivers' disk caches off:

Before: main @ a2dc5385 After: this PR @ 69fc598e
NVIDIA mesh stages, code 11.43 MB (largest 638 KB) 5.25 MB (largest 217 KB)
NVIDIA mesh stages, registers (sum / median) 9,381 / 88.5 9,833 / 93
NVIDIA mesh stages, local memory (spills, sum) 592 B 1,328 B
NVIDIA task stages, code / registers 2.02 MB / 2,888 1.60 MB / 2,766
NVIDIA pipeline compile, sum (largest) 151.9 s (32.1 s) 49.4 s (2.1 s)
RADV mesh stages, code / instructions 3.12 MB / 618,923 1.94 MB / 321,533
RADV mesh stages, spilled SGPRs / VGPRs 2,377 / 19 176 / 34
RADV task stages, code / instructions 637 KB / 126,062 546 KB / 100,786
RADV pipeline compile, sum (largest) 24.1 s (1.87 s) 7.3 s (0.23 s)

(RADV: the Ryzen 7 9800X3D's Radeon iGPU, Mesa 26.0.8. Compile times measured on a shared PC: indicative; the code sizes,
registers and spills are the drivers' own statistics.)

The log lines (Kokiri Forest, round 3):

main:  [hos host] vk: GPU time 6.2 ms a frame (the longest submission 3.7 ms); 0.0 textures made a frame: ...
after: [hos host] vk: GPU time 5.0 ms a frame (the longest submission 2.4 ms); 0.0 textures made a frame: ...

Risks

  • A native task or mesh load reads what the page table gives, as the other stages' loads have since #2103. The check above
    found no load that differs in Kokiri Forest. What could differ is a storage buffer the table does not hold: a binding
    served from a copy, or a bare pointer bound past its game pool (#2103's Risks); none in these runs.
  • NVIDIA gives some mesh stages more registers (the sum +4.8%, 43ec86f35fd937b9 167 -> 254) and a little more local memory:
    fewer warps in flight for those. The GPU time above is the net.
  • After updating: every program is translated again (the translator changed) and the drivers compile the changed stages once;
    that is shorter than before for the mesh programs.
  • RX_VK_GP_TABLE=0 brings the search back for every stage (this PR's and #2103's).

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). (suite.py compare: 22 fail on both sides)
  • Measured against main, or Measurements says why there is nothing to measure. (NVIDIA in game; RADV offline only: its default is the fallback)
  • 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.
  • 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 #2103 sent the vertex, fragment and compute stages' global loads (and the mesh fallback's task and mesh stages') through the guest page table. The native task and mesh stages kept the storage buffer search, and their load helpers are inlined at every load (#994). Native mesh shaders are what NVIDIA runs, and AMD's Windows driver; RADV takes the compute fallback by default (issue 2245), which already reads through the table, so on RADV this changes something only with `RX_VK_MESH_SHADERS=native`. The mesh programs Kokiri Forest and Hyrule Field translate have 2,619 left-global loads in 141 task/mesh stages (up to 144 in one mesh stage), and each one tests every bound storage buffer's range. The drivers turn that into very large shaders: on NVIDIA the largest mesh stages are 560-640 KB of code at 255 registers, and one pipeline (43ec86f35fd937b9) takes 32 s to compile. This makes a native task or mesh stage that reads global memory read through the table alone, as the other stages do. Stores and atomics keep the search, as everywhere else (in these scenes the task and mesh stages leave no store global, and one mesh stage leaves 4 atomics). The result, offline on the same SPIR-V (84 programs, both drivers here): mesh code 54% smaller on NVIDIA and 38% smaller on RADV, RADV's SGPR spills 2,377 -> 176, pipeline compile time down about two thirds. In-game GPU time and frame rate: Measurements. - The constructor asks for the table's push member for a native task or mesh stage that reads global memory (before RX_VK_MESH_FIRST's task block can be made); `DefineGlobalMemoryFunctions` gives it device addresses and the push block (`native_mesh_table`), and `table_stage` takes every task and mesh stage. - `RX_VK_GP_TABLE=2` checks native task and mesh loads against the table too (`translate_program.cpp` gives them the check buffer); only the mesh fallback's task and mesh stages stay out of the check, as before. - The host needs nothing: `push_constants` already pushes the table to every program with a stage that reads global memory, and `gp_table_cover` already covers a virtual pool's binding for any such stage. - No new switch: `RX_VK_GP_TABLE=0` turns this off with the rest of #2103. Read first: `gpu/vk/eden/shader_recompiler/backend/spirv/spirv_emit_context.cpp` (the constructor's native task/mesh block; `DefineGlobalMemoryFunctions`: `native_mesh_table`, `table_stage`, `table_check`). **Coordination, before this leaves WIP:** dyst claimed `perf/mesh-global-helpers` in the team room on 2026-11-21: HeyListen's `RX_VK_MESH_G3`, `RX_VK_MESH_NOINLINE_ABOVE` and `RX_VK_FOLD_PSEUDO`, which make the same inlined native mesh load helpers cheaper while keeping the search (no pull request yet). With this one their loads have no search left; G3's hoisting would still apply to mesh stores and atomics. To be agreed with dyst which goes first, or whether both. And #2144 (dyst, WIP) changes how `translator_stamp` holds switches: this PR adds no switch and moves the stamp only through the translator's sources, so they should not conflict, but whichever lands second rebases and re-checks the stamp. See #2103. The idea came from reading Rekarina's notes (another PC port of this game), whose global-memory lookup was its largest GPU cost; the change here is our own, built on #2103. ## Testing **Tested:** Linux (Ubuntu), RTX 4070 Ti (NVIDIA 595.99.02); Ryzen 7 9800X3D's Radeon iGPU (RADV, Mesa 26.0.8) for the offline compiles. - Kokiri Forest and Hyrule Field (the test save, teleports 0 and 1), three runs each on main and on this branch: the same pictures (foliage, trees, rocks; Link lit by Navi wherever she flies on both sides), and `logdiff` of each pair of logs finds no warning or problem line new, gone or changed in count. - `RX_VK_GP_TABLE=2` (the search kept, every task/mesh/vertex/fragment/compute load compared with the table's answer): Kokiri Forest, 0 loads read otherwise in 273 checked programs; 2,475,150 of 2,475,155 storage buffer bindings held by the table, 5 written (a virtual pool's), none outside its windows or served from a copy. Hyrule Field: 0 in 333 checked programs; 2,537,462 of 2,537,467 bindings held, 5 written. (A first Hyrule Field run in this mode timed out waiting for the game to read the controller: the check's own mesh stages, search and table and comparison inlined at every load, took up to 9 s each to compile in play. The mode is a diagnostic; the second run, with those pipelines cached, passed.) - On main, `RX_VK_MISS_LOG=1` in both scenes: no global access of a native task or mesh stage missed every binding (so the search found a binding for each, which the table maps), and no store or atomic anywhere was lost. - Checks: `tests/global_load_16_ir.cpp` now also emits native task and mesh stages with `RX_VK_GP_TABLE` 0, 1 and 2; with 1 no load helper searches, and the push block has its member at `GUEST_PAGES_PUSH_OFFSET`. All 37 modules pass spirv-val. On main the task stage with 1 fails ("a load helper still searches"). `tests/test_mesh_fallback_pages.py` checks the constructor's condition (and that it comes before RX_VK_MESH_FIRST's block) and the stages the check reaches (g++ and clang++). The suite against the merge base a2dc5385: 904 passed, 22 failed, 26 skipped on both; nothing fails on one side only. **Still to test:** - Windows NVIDIA, and AMD's Windows driver (native mesh shaders there): Kokiri Forest and Hyrule Field, expecting the same pictures and lower GPU time, and a cold "Preparing shaders" expecting it shorter (@Beanstalk) - RADV with `RX_VK_MESH_SHADERS=native` (not the default, issue 2245) on an RX 6000-9000: the same (by hand; offline on this PC's RADV iGPU the mesh stages' code is 38% smaller and SGPR spills 2,377 -> 176) - Steam Deck, RADV at its default and the mesh fallback elsewhere (Intel, GCN, Windows RDNA 2): unchanged, the fallback's SPIR-V is the same as on main (@Beanstalk) - This PR's head (`d19d3b543`) is that commit cherry-picked onto current `main` 67ba729d (it applied cleanly), compiled with the build's flags; `test_mesh_fallback_pages` passes on it. The runs above were made at `main` a2dc5385; the game was not run again on this head. ## Measurements **Verdict:** faster on NVIDIA: +21% fps in Kokiri Forest and +14% in Hyrule Field, 1.20 and 0.90 ms less GPU time a frame; the mesh stages' code half the size, and their pipelines compile in a third of the time. Setup: Linux (Ubuntu), RTX 4070 Ti, NVIDIA 595.99.02, Ryzen 7 9800X3D. Kokiri Forest and Hyrule Field from the test save (tools/gamerun.py: teleports 0 and 1), headless 1280x720 window with the 3D passes at 2560x1440 (the runtime's default options), `HOS_FPS_MAX=1000` (uncapped), 60 s in the scene, the last 45 s measured from the frame trace (`RX_VK_FRAME_TRACE`) and the log's `vk: GPU time` lines; each run a `--mode timing` job of the PC's queue (alone on the GPU: no other game ran during any of them), three interleaved rounds per scene, the median. Baseline: `dev.py ab` needs a base at main's commit, which this PC does not have, so both sides are packs over the shared base 3e4b1faf: main @ a2dc5385 and this branch (0a6d4d65, the same code as 69fc598e: one comment differs). | Kokiri Forest | Before: main @ a2dc5385 | After: this PR @ 69fc598e | Δ | |---|---|---|---| | fps (3 runs) | 136.6 / 70.4* / 136.7 | 165.2 / 164.8 / 166.1 | +20.9% (median) | | 1% low fps (median) | 124.9 | 148.4 | +18.8% | | median frame time | 7.31 ms | 6.05 ms | -1.26 ms | | p99 frame time | 8.01 ms | 6.74 ms | -1.27 ms | | GPU time a frame (every run) | 6.20 ms | 5.00 ms | -1.20 ms | | Hyrule Field | Before: main @ a2dc5385 | After: this PR @ 69fc598e | Δ | |---|---|---|---| | fps (3 runs) | 126.6 / 127.3 / 126.6 | 77.7* / 145.0 / 144.4 | +14.1% (median) | | 1% low fps (median) | 114.9 | 122.5 | +6.6% | | median frame time | 7.86 ms | 6.88 ms | -0.98 ms | | p99 frame time | 8.70 ms | 8.16 ms | -0.54 ms | | GPU time a frame | 6.50 ms (every run) | 5.50 / 5.60 / 5.60 ms | -0.90 ms | \* two runs (one a side) had 400-800 frames over 20 ms in which the game's main thread was blocked (`main_blocked_ms`): other agents' check suites ran beside the timed run on this shared PC. Their GPU time is the same as their side's other runs, and leaving them out changes no median by more than 0.1 fps. Where the GPU time went, one more timed run a side with `RX_VK_PASS_TIMING=2` (a timestamp at each change of program; the spans add up to more than an unprofiled frame): | ms a frame | Kokiri Forest: main | this PR | Hyrule Field: main | this PR | |---|---|---|---|---| | all, timed | 6.64 | 5.41 | 7.09 | 6.13 | | render passes (draws) | 4.129 | 2.913 | 4.091 | 3.132 | | dispatches | 1.082 | 1.080 | 1.348 | 1.349 | | mesh program 43ec86f35fd937b9 | 1.055 | 0.367 | 0.583 | 0.218 | | mesh program 636eed4d5000d1c0 / d8e59341cf4f629c | 0.626 | 0.279 | 0.308 (d8e5) | 0.141 | | a vertex program (1a7482c0ec9991ea), for comparison | 0.259 | 0.260 | 0.259 | 0.259 | Offline, the stored SPIR-V of the 84 mesh programs both scenes translated, compiled with VK_KHR_pipeline_executable_properties statistics and the drivers' disk caches off: | | Before: main @ a2dc5385 | After: this PR @ 69fc598e | |---|---|---| | NVIDIA mesh stages, code | 11.43 MB (largest 638 KB) | 5.25 MB (largest 217 KB) | | NVIDIA mesh stages, registers (sum / median) | 9,381 / 88.5 | 9,833 / 93 | | NVIDIA mesh stages, local memory (spills, sum) | 592 B | 1,328 B | | NVIDIA task stages, code / registers | 2.02 MB / 2,888 | 1.60 MB / 2,766 | | NVIDIA pipeline compile, sum (largest) | 151.9 s (32.1 s) | 49.4 s (2.1 s) | | RADV mesh stages, code / instructions | 3.12 MB / 618,923 | 1.94 MB / 321,533 | | RADV mesh stages, spilled SGPRs / VGPRs | 2,377 / 19 | 176 / 34 | | RADV task stages, code / instructions | 637 KB / 126,062 | 546 KB / 100,786 | | RADV pipeline compile, sum (largest) | 24.1 s (1.87 s) | 7.3 s (0.23 s) | (RADV: the Ryzen 7 9800X3D's Radeon iGPU, Mesa 26.0.8. Compile times measured on a shared PC: indicative; the code sizes, registers and spills are the drivers' own statistics.) The log lines (Kokiri Forest, round 3): ``` main: [hos host] vk: GPU time 6.2 ms a frame (the longest submission 3.7 ms); 0.0 textures made a frame: ... after: [hos host] vk: GPU time 5.0 ms a frame (the longest submission 2.4 ms); 0.0 textures made a frame: ... ``` ## Risks - A native task or mesh load reads what the page table gives, as the other stages' loads have since #2103. The check above found no load that differs in Kokiri Forest. What could differ is a storage buffer the table does not hold: a binding served from a copy, or a bare pointer bound past its game pool (#2103's Risks); none in these runs. - NVIDIA gives some mesh stages more registers (the sum +4.8%, 43ec86f35fd937b9 167 -> 254) and a little more local memory: fewer warps in flight for those. The GPU time above is the net. - After updating: every program is translated again (the translator changed) and the drivers compile the changed stages once; that is shorter than before for the mesh programs. - `RX_VK_GP_TABLE=0` brings the search back for every stage (this PR's and #2103's). ## 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). (suite.py compare: 22 fail on both sides) - [x] Measured against `main`, or Measurements says why there is nothing to measure. (NVIDIA in game; RADV offline only: its default is the fallback) - [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] 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)
perf(shaders): native task and mesh stages read global memory through the guest page table
Some checks failed
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows+nvidia 2/1 pass
beanstalk/windows+amd 1/1 fail
beanstalk/linux+nvidia 1/1 fail
beanstalk/linux+radv 1/1 fail
beanstalk/amd 1/1 fail
beanstalk/intel 0/1 pass, 0 running, 0 queued
beanstalk/steamdeck 1/1 fail
PR description / Description follows the template (pull_request_target) Failing after 24s
d19d3b543a
#2103 moved the vertex, fragment and compute stages' global loads (and the mesh fallback's task and mesh stages') to the
guest page table. Native task and mesh stages kept the storage buffer search, and their load helpers are inlined at every
load (#994): Kokiri Forest's mesh stages have up to 144 left-global loads each, 1,791 in 86 task/mesh stages, each one
testing every bound storage buffer's range.

- A native task or mesh stage that reads global memory asks for the page table's push member in the constructor (before
  RX_VK_MESH_FIRST's block can be made), gets device addresses, and its loads read the table alone (RX_VK_GP_TABLE=1, the
  default where the table holds the pools). Stores and atomics keep the search, as in the other stages.
- RX_VK_GP_TABLE=2 checks native task and mesh loads against the table too: translate_program.cpp gives them the check
  buffer; only the mesh fallback's task and mesh stages stay out of the check.
- The host needs nothing: push_constants already pushes the table to every program with a stage reading global memory,
  and gp_table_cover already covers a virtual pool's binding for any such stage.
- tests/global_load_16_ir.cpp emits native task and mesh stages with RX_VK_GP_TABLE 0, 1 and 2 (no search left in their
  load helpers with 1, the push member at GUEST_PAGES_PUSH_OFFSET); all 37 modules pass spirv-val. On main the task stage
  with 1 fails: "a load helper still searches". tests/test_mesh_fallback_pages.py checks the constructor's condition and
  the stages the check reaches.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 69fc598eb95145aad1bf9d2379037ff6d3e5cacb)
Author
Contributor

Tested in game: Linux 7.0, RTX 4070 Ti (NVIDIA 595.99.02): Kokiri Forest and Hyrule Field. RX_VK_GP_TABLE=2 check: 0 loads read otherwise (273 and 333 checked programs); timing rounds 1-2 of 3: GPU time a frame 6.20 -> 5.00 ms (Kokiri Forest), 6.50 -> 5.5 ms (Hyrule Field). Offline compiles on the RTX and the RADV iGPU: mesh code 54% / 38% smaller. Runs made at main a2dc5385; this head is the same commit cherry-picked onto current main (clean), compiled, not yet run in the game.

Tested in game: Linux 7.0, RTX 4070 Ti (NVIDIA 595.99.02): Kokiri Forest and Hyrule Field. RX_VK_GP_TABLE=2 check: 0 loads read otherwise (273 and 333 checked programs); timing rounds 1-2 of 3: GPU time a frame 6.20 -> 5.00 ms (Kokiri Forest), 6.50 -> 5.5 ms (Hyrule Field). Offline compiles on the RTX and the RADV iGPU: mesh code 54% / 38% smaller. Runs made at main a2dc5385; this head is the same commit cherry-picked onto current main (clean), compiled, not yet run in the game.
Member

Possibly related, for context:

  • PR #1586 perf(vk): defaults of its own for Mesa's Intel driver, 8.3 to 18.2 fps on an Iris Xe — Merged implementation of page-table loads in mesh fallback stages; related precedent.
Possibly related, for context: - PR #1586 perf(vk): defaults of its own for Mesa's Intel driver, 8.3 to 18.2 fps on an Iris Xe — Merged implementation of page-table loads in mesh fallback stages; related precedent.
Owner

@Beanstalk

@Beanstalk
Member

Beanstalk test farm · 🔄 testing (12 of 7 reports so far, a failure already)

Commit d19d3b5 · approved by HumanBean (reviewed) · dashboard

⚠️ Note: Cold driver-cache scenarios are Linux-only; the farm cannot measure the requested cold shader preparation on Windows, and this plan does not separately prime a warm driver cache.
⚠️ Note: RADV is tested at its default fallback, not forced native mesh; the requested RX 6000–9000 native path needs a separate targeted run because forcing it across all targets could exercise unsupported hardware.
⚠️ Note: Shader compile and GPU times are reported, but the plan does not enforce the claimed speedup or measure offline shader code size, register spills, or the diagnostic load-by-load comparison.

Done (started 00:35 UTC, last report 05:24 UTC). Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows+nvidia ✅ pass (an outlier) 2 1 2 9.7 → 9.4 (−4%) — none
windows+amd ❌ fail (an outlier) 2 1 2 17.7 → 20.0 (+13%) — 3 PR runs
linux+nvidia ❌ fail (an outlier) 2 1 2 14.5 → 14.3 (−1%) — none
linux+radv ❌ fail (an outlier) 2 1 2 18.5 → 18.5 (−1%) — none
amd ❌ fail (an outlier) 2 1 2 37.3 → 33.0 (−11%) — none
intel ⏳ queued 0 of 1 — — —
steamdeck ❌ fail (an outlier) 2 1 2 43.2 → 43.4 (+0%) — none

Why it failed

  • windows+amd: gameplay crash: 3 PR runs crashed
  • windows+amd: gameplay screenshot.max_diff: 0.0 → 0.9; limit 0.2
  • linux+nvidia: gameplay screenshot.max_diff: 0.0 → 0.7; limit 0.2
  • linux+radv: gameplay screenshot.max_diff: 0.1 → 0.9; limit 0.2
  • amd: gameplay field.frametime_1pct_low_ms.max_delta_pct: 12.4 → 14.3 (+15.1%); limit 15.0
  • steamdeck: gameplay screenshot.max_diff: 0.6 → 0.9; limit 0.2

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.

  • linux+radv, report 2: no scenario could be judged: the driver's shader cache was not empty at the start (2 MB)
  • amd, report 2: no scenario could be judged: the driver's shader cache was not empty at the start (2 MB)
  • steamdeck, report 2: no scenario could be judged: the driver's shader cache was not empty at the start (2 MB)
What was tested

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

Compare the pull request with main in Kokiri Forest and Hyrule Field on NVIDIA, AMD, Intel and Steam Deck systems, including the named Windows and RADV paths. Three gameplay starts per side measure frame and GPU time and compare still pictures; two additional Linux starts per side measure shader preparation with a cold driver cache. The plan takes about 57 minutes per tester, excluding builds, and fails on crashes, materially slower frame or load times, or significant picture differences.

  • Where: windows+nvidia (1-2 reports), windows+amd (1-2 reports), linux+nvidia (1-2 reports), linux+radv (1-2 reports), amd (1-2 reports), intel (1-2 reports), steamdeck (1-2 reports).
  • gameplay: from the repository's save kokiri-start (settings frame_rate_cap=6), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest for 25 s (after 5 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 25 s (after 5 s warm-up); 3 runs on each side.
  • cold-driver: from the repository's save kokiri-start (each start with an empty driver shader cache, Linux only for now), then teleport to Kokiri Forest, teleport to Hyrule Field; 2 runs on each side.
  • Measured: crashes, frame times, stutters and hitches, GPU time per pass, shader preparation at start, load times.
  • The PR fails if: it crashes; or a picture differs from main by more than 20%; or longest load is more than 30% above main; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main.
  • Time: about 57 min of game runs per tester (10 game starts), plus the two builds.
Measurements on `windows+nvidia`, for the PR description

Verdict: pass on windows+nvidia (2 reports): no rule failed and no PR run crashed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 621.24.0 AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3090, 621.1.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 After: this PR @ d19d3b5
gameplay · longest load (s) 7.0 6.4 (−8%)
gameplay · field · frame time (p99) (ms) 9.7 9.4 (−4%)
gameplay · forest · frame time (p99) (ms) 9.9 9.4 (−6%)
gameplay · field · frame time (worst 1%) (ms) 10.3 9.8 (−5%)
gameplay · forest · frame time (worst 1%) (ms) 10.8 10.2 (−5%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** pass on windows+nvidia (2 reports): no rule failed and no PR run crashed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`  
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 |
|---|---|---|
| gameplay · longest load (s) | 7.0 | 6.4 (−8%) |
| gameplay · field · frame time (p99) (ms) | 9.7 | 9.4 (−4%) |
| gameplay · forest · frame time (p99) (ms) | 9.9 | 9.4 (−6%) |
| gameplay · field · frame time (worst 1%) (ms) | 10.3 | 9.8 (−5%) |
| gameplay · forest · frame time (worst 1%) (ms) | 10.8 | 10.2 (−5%) |

**Flags and settings**

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

Verdict: fail on windows+amd (2 reports): gameplay crash; gameplay screenshot.max_diff failed.

Hardware: 1: windows+amd+amd-proprietary+dgpu AMD Radeon RX 6600 XT, 2.0.353 AMD Ryzen 5 3600 6-Core Processor, 16 GB RAM; 2: windows+amd+amd-proprietary+dgpu AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 After: this PR @ d19d3b5
gameplay · longest load (s) 4.6 3.0 (−34%)
gameplay · forest · frame time (p99) (ms) 18.1 20.0 (+11%)
gameplay · field · frame time (p99) (ms) 10.8 10.5 (−3%)
gameplay · forest · frame time (worst 1%) (ms) 25.3 37.3 (+47%)
gameplay · field · frame time (worst 1%) (ms) 11.4 11.2 (−2%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows+amd (2 reports): `gameplay crash`; `gameplay screenshot.max_diff` failed.

Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 6600 XT, 2.0.353` `AMD Ryzen 5 3600 6-Core Processor, 16 GB RAM`; 2: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`  
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 |
|---|---|---|
| gameplay · longest load (s) | 4.6 | 3.0 (−34%) |
| gameplay · forest · frame time (p99) (ms) | 18.1 | 20.0 (+11%) |
| gameplay · field · frame time (p99) (ms) | 10.8 | 10.5 (−3%) |
| gameplay · forest · frame time (worst 1%) (ms) | 25.3 | 37.3 (+47%) |
| gameplay · field · frame time (worst 1%) (ms) | 11.4 | 11.2 (−2%) |

**Flags and settings**

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

Verdict: fail on linux+nvidia (2 reports): gameplay screenshot.max_diff failed.

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.73.4 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM; 2: linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3080 Ti, 620.73.4 AMD Ryzen 5 5600X 6-Core Processor, 32 GB RAM
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 After: this PR @ d19d3b5
gameplay · longest load (s) 6.8 6.6 (−3%)
gameplay · field · frame time (p99) (ms) 14.5 14.3 (−1%)
gameplay · forest · frame time (p99) (ms) 14.8 14.4 (−2%)
gameplay · field · frame time (worst 1%) (ms) 16.0 15.4 (−4%)
gameplay · forest · frame time (worst 1%) (ms) 16.1 15.6 (−3%)
cold-driver · longest load (s) 7.6 6.4 (−16%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** fail on linux+nvidia (2 reports): `gameplay screenshot.max_diff` failed.

Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.73.4` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 620.73.4` `AMD Ryzen 5 5600X 6-Core Processor, 32 GB RAM`  
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 |
|---|---|---|
| gameplay · longest load (s) | 6.8 | 6.6 (−3%) |
| gameplay · field · frame time (p99) (ms) | 14.5 | 14.3 (−1%) |
| gameplay · forest · frame time (p99) (ms) | 14.8 | 14.4 (−2%) |
| gameplay · field · frame time (worst 1%) (ms) | 16.0 | 15.4 (−4%) |
| gameplay · forest · frame time (worst 1%) (ms) | 16.1 | 15.6 (−3%) |
| cold-driver · longest load (s) | 7.6 | 6.4 (−16%) |

**Flags and settings**

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

Verdict: fail on linux+radv (2 reports): gameplay screenshot.max_diff failed.

Hardware: 1: linux+amd+radv+igpu AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99 AMD Ryzen Z2 Extreme, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.3.1 AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 After: this PR @ d19d3b5
gameplay · longest load (s) 4.3 3.8 (−12%)
gameplay · field · frame time (p99) (ms) 18.5 18.5 (−1%)
gameplay · forest · frame time (p99) (ms) 19.0 19.1 (+1%)
gameplay · field · frame time (worst 1%) (ms) 20.6 20.7 (+0%)
gameplay · forest · frame time (worst 1%) (ms) 20.6 20.4 (−1%)
cold-driver · longest load (s) 4.4 4.4 (+2%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** fail on linux+radv (2 reports): `gameplay screenshot.max_diff` failed.

Hardware: 1: linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM`  
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 |
|---|---|---|
| gameplay · longest load (s) | 4.3 | 3.8 (−12%) |
| gameplay · field · frame time (p99) (ms) | 18.5 | 18.5 (−1%) |
| gameplay · forest · frame time (p99) (ms) | 19.0 | 19.1 (+1%) |
| gameplay · field · frame time (worst 1%) (ms) | 20.6 | 20.7 (+0%) |
| gameplay · forest · frame time (worst 1%) (ms) | 20.6 | 20.4 (−1%) |
| cold-driver · longest load (s) | 4.4 | 4.4 (+2%) |

**Flags and settings**

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

Verdict: fail on amd (2 reports): gameplay field.frametime_1pct_low_ms.max_delta_pct (+15.1%) failed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.0.8 AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7 AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 After: this PR @ d19d3b5
gameplay · longest load (s) 4.6 4.6 (−0%)
gameplay · field · frame time (p99) (ms) 37.3 33.0 (−11%)
gameplay · forest · frame time (p99) (ms) 23.8 25.5 (+7%)
gameplay · field · frame time (worst 1%) (ms) 42.1 37.7 (−11%)
gameplay · forest · frame time (worst 1%) (ms) 26.2 26.8 (+2%)
cold-driver · longest load (s) 4.5 4.7 (+6%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** fail on amd (2 reports): `gameplay field.frametime_1pct_low_ms.max_delta_pct (+15.1%)` failed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM`  
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 |
|---|---|---|
| gameplay · longest load (s) | 4.6 | 4.6 (−0%) |
| gameplay · field · frame time (p99) (ms) | 37.3 | 33.0 (−11%) |
| gameplay · forest · frame time (p99) (ms) | 23.8 | 25.5 (+7%) |
| gameplay · field · frame time (worst 1%) (ms) | 42.1 | 37.7 (−11%) |
| gameplay · forest · frame time (worst 1%) (ms) | 26.2 | 26.8 (+2%) |
| cold-driver · longest load (s) | 4.5 | 4.7 (+6%) |

**Flags and settings**

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

Verdict: fail on steamdeck (2 reports): gameplay screenshot.max_diff failed.

Hardware: 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 12 GB RAM; 2: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 GB RAM
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 After: this PR @ d19d3b5
gameplay · longest load (s) 6.6 6.3 (−5%)
gameplay · field · frame time (p99) (ms) 43.2 43.4 (+0%)
gameplay · forest · frame time (p99) (ms) 42.2 42.6 (+1%)
gameplay · field · frame time (worst 1%) (ms) 47.6 48.6 (+2%)
gameplay · forest · frame time (worst 1%) (ms) 44.6 46.0 (+3%)
cold-driver · longest load (s) 6.6 6.6 (−0%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** fail on steamdeck (2 reports): `gameplay screenshot.max_diff` failed.

Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`; 2: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM`  
Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 |
|---|---|---|
| gameplay · longest load (s) | 6.6 | 6.3 (−5%) |
| gameplay · field · frame time (p99) (ms) | 43.2 | 43.4 (+0%) |
| gameplay · forest · frame time (p99) (ms) | 42.2 | 42.6 (+1%) |
| gameplay · field · frame time (worst 1%) (ms) | 47.6 | 48.6 (+2%) |
| gameplay · forest · frame time (worst 1%) (ms) | 44.6 | 46.0 (+3%) |
| cold-driver · longest load (s) | 6.6 | 6.6 (−0%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
The testers' hardware
Target Report Ran on
windows+nvidia 1 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070, 621.24.0 AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM
windows+nvidia 2 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3090, 621.1.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
windows+amd 1 windows+amd+amd-proprietary+dgpu AMD Radeon RX 6600 XT, 2.0.353 AMD Ryzen 5 3600 6-Core Processor, 16 GB RAM
windows+amd 2 windows+amd+amd-proprietary+dgpu AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
linux+nvidia 1 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.73.4 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM
linux+nvidia 2 linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3080 Ti, 620.73.4 AMD Ryzen 5 5600X 6-Core Processor, 32 GB RAM
linux+radv 1 linux+amd+radv+igpu AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99 AMD Ryzen Z2 Extreme, 32 GB RAM
linux+radv 2 linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.3.1 AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM
amd 1 linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.0.8 AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM
amd 2 linux+amd+radv+dgpu AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7 AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM
steamdeck 1 linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 12 GB RAM
steamdeck 2 linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 GB RAM
<!-- beanstalk:sticky --> ### Beanstalk test farm · 🔄 testing (12 of 7 reports so far, a failure already) Commit `d19d3b5` · approved by HumanBean (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2291) ⚠️ **Note:** Cold driver-cache scenarios are Linux-only; the farm cannot measure the requested cold shader preparation on Windows, and this plan does not separately prime a warm driver cache. ⚠️ **Note:** RADV is tested at its default fallback, not forced native mesh; the requested RX 6000–9000 native path needs a separate targeted run because forcing it across all targets could exercise unsupported hardware. ⚠️ **Note:** Shader compile and GPU times are reported, but the plan does not enforce the claimed speedup or measure offline shader code size, register spills, or the diagnostic load-by-load comparison. Done (started 00:35 UTC, last report 05:24 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows+nvidia` | ✅ pass (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_18f23965684192c3) [2](https://beanstalk.magicbean.dev/reports/rp_cfa523c19bfa1223) | 9.7 → 9.4 (−4%) | — | none | | `windows+amd` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_322d13f1d08edc62) [2](https://beanstalk.magicbean.dev/reports/rp_add2ab594960b38c) | 17.7 → 20.0 (+13%) | — | 3 PR runs | | `linux+nvidia` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_b7e8c6efcadf7c00) [2](https://beanstalk.magicbean.dev/reports/rp_34b557f9d9c94cc3) | 14.5 → 14.3 (−1%) | — | none | | `linux+radv` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_71d75b653100cc86) [2](https://beanstalk.magicbean.dev/reports/rp_cff49478125adb5a) | 18.5 → 18.5 (−1%) | — | none | | `amd` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_85b74722181d8d50) [2](https://beanstalk.magicbean.dev/reports/rp_c88388a346327446) | 37.3 → 33.0 (−11%) | — | none | | `intel` | ⏳ queued | 0 of 1 | — | — | — | | `steamdeck` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_bcb0c664a7814126) [2](https://beanstalk.magicbean.dev/reports/rp_b116e8fc88956b5f) | 43.2 → 43.4 (+0%) | — | none | **Why it failed** - `windows+amd`: `gameplay` `crash`: `3 PR runs crashed` - `windows+amd`: `gameplay` `screenshot.max_diff`: `0.0 → 0.9; limit 0.2` - `linux+nvidia`: `gameplay` `screenshot.max_diff`: `0.0 → 0.7; limit 0.2` - `linux+radv`: `gameplay` `screenshot.max_diff`: `0.1 → 0.9; limit 0.2` - `amd`: `gameplay` `field.frametime_1pct_low_ms.max_delta_pct`: `12.4 → 14.3 (+15.1%); limit 15.0` - `steamdeck`: `gameplay` `screenshot.max_diff`: `0.6 → 0.9; limit 0.2` **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. - `linux+radv`, [report 2](https://beanstalk.magicbean.dev/reports/rp_cff49478125adb5a): `no scenario could be judged: the driver's shader cache was not empty at the start (2 MB)` - `amd`, [report 2](https://beanstalk.magicbean.dev/reports/rp_c88388a346327446): `no scenario could be judged: the driver's shader cache was not empty at the start (2 MB)` - `steamdeck`, [report 2](https://beanstalk.magicbean.dev/reports/rp_b116e8fc88956b5f): `no scenario could be judged: the driver's shader cache was not empty at the start (2 MB)` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) Compare the pull request with main in Kokiri Forest and Hyrule Field on NVIDIA, AMD, Intel and Steam Deck systems, including the named Windows and RADV paths. Three gameplay starts per side measure frame and GPU time and compare still pictures; two additional Linux starts per side measure shader preparation with a cold driver cache. The plan takes about 57 minutes per tester, excluding builds, and fails on crashes, materially slower frame or load times, or significant picture differences. - **Where:** windows+nvidia (1-2 reports), windows+amd (1-2 reports), linux+nvidia (1-2 reports), linux+radv (1-2 reports), amd (1-2 reports), intel (1-2 reports), steamdeck (1-2 reports). - **gameplay:** from the repository's save `kokiri-start` (settings frame_rate_cap=6), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest for 25 s (after 5 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 25 s (after 5 s warm-up); 3 runs on each side. - **cold-driver:** from the repository's save `kokiri-start` (each start with an empty driver shader cache, Linux only for now), then teleport to Kokiri Forest, teleport to Hyrule Field; 2 runs on each side. - **Measured:** crashes, frame times, stutters and hitches, GPU time per pass, shader preparation at start, load times. - **The PR fails if:** it crashes; or a picture differs from main by more than 20%; or longest load is more than 30% above main; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main. - **Time:** about 57 min of game runs per tester (10 game starts), plus the two builds. </details> <details><summary>Measurements on `windows+nvidia`, for the PR description</summary> **Verdict:** pass on windows+nvidia (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 7.0 | 6.4 (−8%) | | gameplay · field · frame time (p99) (ms) | 9.7 | 9.4 (−4%) | | gameplay · forest · frame time (p99) (ms) | 9.9 | 9.4 (−6%) | | gameplay · field · frame time (worst 1%) (ms) | 10.3 | 9.8 (−5%) | | gameplay · forest · frame time (worst 1%) (ms) | 10.8 | 10.2 (−5%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on windows+nvidia (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 7.0 | 6.4 (−8%) | | gameplay · field · frame time (p99) (ms) | 9.7 | 9.4 (−4%) | | gameplay · forest · frame time (p99) (ms) | 9.9 | 9.4 (−6%) | | gameplay · field · frame time (worst 1%) (ms) | 10.3 | 9.8 (−5%) | | gameplay · forest · frame time (worst 1%) (ms) | 10.8 | 10.2 (−5%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `windows+amd`, for the PR description</summary> **Verdict:** fail on windows+amd (2 reports): `gameplay crash`; `gameplay screenshot.max_diff` failed. Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 6600 XT, 2.0.353` `AMD Ryzen 5 3600 6-Core Processor, 16 GB RAM`; 2: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 4.6 | 3.0 (−34%) | | gameplay · forest · frame time (p99) (ms) | 18.1 | 20.0 (+11%) | | gameplay · field · frame time (p99) (ms) | 10.8 | 10.5 (−3%) | | gameplay · forest · frame time (worst 1%) (ms) | 25.3 | 37.3 (+47%) | | gameplay · field · frame time (worst 1%) (ms) | 11.4 | 11.2 (−2%) | **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+amd (2 reports): `gameplay crash`; `gameplay screenshot.max_diff` failed. Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 6600 XT, 2.0.353` `AMD Ryzen 5 3600 6-Core Processor, 16 GB RAM`; 2: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 4.6 | 3.0 (−34%) | | gameplay · forest · frame time (p99) (ms) | 18.1 | 20.0 (+11%) | | gameplay · field · frame time (p99) (ms) | 10.8 | 10.5 (−3%) | | gameplay · forest · frame time (worst 1%) (ms) | 25.3 | 37.3 (+47%) | | gameplay · field · frame time (worst 1%) (ms) | 11.4 | 11.2 (−2%) | **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:** fail on linux+nvidia (2 reports): `gameplay screenshot.max_diff` failed. Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.73.4` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 620.73.4` `AMD Ryzen 5 5600X 6-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 6.8 | 6.6 (−3%) | | gameplay · field · frame time (p99) (ms) | 14.5 | 14.3 (−1%) | | gameplay · forest · frame time (p99) (ms) | 14.8 | 14.4 (−2%) | | gameplay · field · frame time (worst 1%) (ms) | 16.0 | 15.4 (−4%) | | gameplay · forest · frame time (worst 1%) (ms) | 16.1 | 15.6 (−3%) | | cold-driver · longest load (s) | 7.6 | 6.4 (−16%) | **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+nvidia (2 reports): `gameplay screenshot.max_diff` failed. Hardware: 1: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.73.4` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 620.73.4` `AMD Ryzen 5 5600X 6-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 6.8 | 6.6 (−3%) | | gameplay · field · frame time (p99) (ms) | 14.5 | 14.3 (−1%) | | gameplay · forest · frame time (p99) (ms) | 14.8 | 14.4 (−2%) | | gameplay · field · frame time (worst 1%) (ms) | 16.0 | 15.4 (−4%) | | gameplay · forest · frame time (worst 1%) (ms) | 16.1 | 15.6 (−3%) | | cold-driver · longest load (s) | 7.6 | 6.4 (−16%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `linux+radv`, for the PR description</summary> **Verdict:** fail on linux+radv (2 reports): `gameplay screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 4.3 | 3.8 (−12%) | | gameplay · field · frame time (p99) (ms) | 18.5 | 18.5 (−1%) | | gameplay · forest · frame time (p99) (ms) | 19.0 | 19.1 (+1%) | | gameplay · field · frame time (worst 1%) (ms) | 20.6 | 20.7 (+0%) | | gameplay · forest · frame time (worst 1%) (ms) | 20.6 | 20.4 (−1%) | | cold-driver · longest load (s) | 4.4 | 4.4 (+2%) | **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+radv (2 reports): `gameplay screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 4.3 | 3.8 (−12%) | | gameplay · field · frame time (p99) (ms) | 18.5 | 18.5 (−1%) | | gameplay · forest · frame time (p99) (ms) | 19.0 | 19.1 (+1%) | | gameplay · field · frame time (worst 1%) (ms) | 20.6 | 20.7 (+0%) | | gameplay · forest · frame time (worst 1%) (ms) | 20.6 | 20.4 (−1%) | | cold-driver · longest load (s) | 4.4 | 4.4 (+2%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `amd`, for the PR description</summary> **Verdict:** fail on amd (2 reports): `gameplay field.frametime_1pct_low_ms.max_delta_pct (+15.1%)` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 4.6 | 4.6 (−0%) | | gameplay · field · frame time (p99) (ms) | 37.3 | 33.0 (−11%) | | gameplay · forest · frame time (p99) (ms) | 23.8 | 25.5 (+7%) | | gameplay · field · frame time (worst 1%) (ms) | 42.1 | 37.7 (−11%) | | gameplay · forest · frame time (worst 1%) (ms) | 26.2 | 26.8 (+2%) | | cold-driver · longest load (s) | 4.5 | 4.7 (+6%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on amd (2 reports): `gameplay field.frametime_1pct_low_ms.max_delta_pct (+15.1%)` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 4.6 | 4.6 (−0%) | | gameplay · field · frame time (p99) (ms) | 37.3 | 33.0 (−11%) | | gameplay · forest · frame time (p99) (ms) | 23.8 | 25.5 (+7%) | | gameplay · field · frame time (worst 1%) (ms) | 42.1 | 37.7 (−11%) | | gameplay · forest · frame time (worst 1%) (ms) | 26.2 | 26.8 (+2%) | | cold-driver · longest load (s) | 4.5 | 4.7 (+6%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `steamdeck`, for the PR description</summary> **Verdict:** fail on steamdeck (2 reports): `gameplay screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`; 2: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 6.6 | 6.3 (−5%) | | gameplay · field · frame time (p99) (ms) | 43.2 | 43.4 (+0%) | | gameplay · forest · frame time (p99) (ms) | 42.2 | 42.6 (+1%) | | gameplay · field · frame time (worst 1%) (ms) | 47.6 | 48.6 (+2%) | | gameplay · forest · frame time (worst 1%) (ms) | 44.6 | 46.0 (+3%) | | cold-driver · longest load (s) | 6.6 | 6.6 (−0%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on steamdeck (2 reports): `gameplay screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`; 2: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` Scene: gameplay, from the repository's save kokiri-start (frame_rate_cap=6); cold-driver, from the repository's save kokiri-start; 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); gameplay: 3 game starts a side, forest 25 s after 5 s warm-up, field 25 s after 5 s warm-up; cold-driver: 2 game starts a side; 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 @ 67ba729 | After: this PR @ d19d3b5 | |---|---|---| | gameplay · longest load (s) | 6.6 | 6.3 (−5%) | | gameplay · field · frame time (p99) (ms) | 43.2 | 43.4 (+0%) | | gameplay · forest · frame time (p99) (ms) | 42.2 | 42.6 (+1%) | | gameplay · field · frame time (worst 1%) (ms) | 47.6 | 48.6 (+2%) | | gameplay · forest · frame time (worst 1%) (ms) | 44.6 | 46.0 (+3%) | | cold-driver · longest load (s) | 6.6 | 6.6 (−0%) | **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` | [1](https://beanstalk.magicbean.dev/reports/rp_18f23965684192c3) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM` | | `windows+nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_cfa523c19bfa1223) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` | | `windows+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_322d13f1d08edc62) | windows+amd+amd-proprietary+dgpu `AMD Radeon RX 6600 XT, 2.0.353` `AMD Ryzen 5 3600 6-Core Processor, 16 GB RAM` | | `windows+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_add2ab594960b38c) | windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` | | `linux+nvidia` | [1](https://beanstalk.magicbean.dev/reports/rp_b7e8c6efcadf7c00) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.73.4` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM` | | `linux+nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_34b557f9d9c94cc3) | linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3080 Ti, 620.73.4` `AMD Ryzen 5 5600X 6-Core Processor, 32 GB RAM` | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_71d75b653100cc86) | linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM` | | `linux+radv` | [2](https://beanstalk.magicbean.dev/reports/rp_cff49478125adb5a) | linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM` | | `amd` | [1](https://beanstalk.magicbean.dev/reports/rp_85b74722181d8d50) | linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM` | | `amd` | [2](https://beanstalk.magicbean.dev/reports/rp_c88388a346327446) | linux+amd+radv+dgpu `AMD Radeon RX 580 Series (RADV POLARIS10), 26.2.7` `AMD Ryzen 5 5500F 6-Core Processor, 32 GB RAM` | | `steamdeck` | [1](https://beanstalk.magicbean.dev/reports/rp_bcb0c664a7814126) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM` | | `steamdeck` | [2](https://beanstalk.magicbean.dev/reports/rp_b116e8fc88956b5f) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` | </details>
Owner

@beanstalk

@beanstalk
Member

@HumanBean d19d3b5 is already running: see the dashboard.

@HumanBean `d19d3b5` is already running: see the [dashboard](https://beanstalk.magicbean.dev/prs/2291).
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The NVIDIA measurements show a substantial gain on the tested earlier base, but the current head and other affected Tier 1 configurations still need runs. Recommend approval; not approved on the forge.

Native task and mesh global loads use the guest page table instead of searching every bound storage buffer. This substantially reduces shader size and GPU time in the reported NVIDIA scenes, at the cost of relying on table coverage and allocation for those stages.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L1 gpu/vk/eden/shader_recompiler/backend/spirv/spirv_emit_context.cpp:1196: The changed native shader path still needs game and timing runs on the current head and affected Windows drivers. (more on the line) Do: Run the stated scenes on the current head against its base, including NVIDIA and AMD Windows, checking pictures, frame times and cold shader preparation.
  • L2 gpu/vk/eden/shader_recompiler/backend/spirv/spirv_emit_context.cpp:1196: RADV native mesh execution and the Tier 1 fallback configurations remain untested in game. (more on the line) Do: Run the stated scenes on an RX 6000–9000 with RADV native enabled and on Steam Deck or the relevant fallback configuration, checking output and timing.

Checks: Still running: 9 checks.

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

Does it help: Yes on the reported Linux RTX 4070 Ti runs at the earlier base: median FPS rose 136.6 to 165.2 in Kokiri Forest and 126.6 to 145.0 in Hyrule Field; GPU time fell 1.20 ms and 0.90 ms per frame. The current head was compiled but not run in game, and the other affected drivers remain unmeasured.

Other systems: The default affects native mesh shaders on NVIDIA and AMD Windows, and RADV when native mesh shaders are selected. The compute fallback and Steam Deck default are reported to emit unchanged SPIR-V, but their game runs remain outstanding. Stores and atomics retain the search. Table coverage, copied bindings, allocation failure, and driver compilation affect the changed path.

Switches: RX_VK_GP_TABLE remains default 1 where host import and device addresses are available; its scope now includes native task and mesh loads. Mode 0 restores the search and mode 2 compares answers. The default has a measured NVIDIA gain but has not yet been validated on all affected Tier 1 drivers. No switch was added or removed.

Reviewed: d19d3b543a against 67ba729d21: Read AGENTS.md, CONTRIBUTING.md, the PR template, relevant standards, the complete diff and commit message, and the changed shader constructor, global-memory helpers, descriptor setup and tests; traced table allocation, coverage and push constants. Skimmed the remaining portions of the larger changed files and related host code. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance.
  • No game-derived files, generated shader headers, third-party files or renderer API definitions are changed.
  • The existing switch table row is updated, and the test emits native task and mesh modules in all three table modes.
  • The reported NVIDIA comparisons include interleaved runs, frame-time tails and GPU times.

Testing: No code or tests were run during review. The author reports game runs on an earlier base, SPIR-V validation and a suite comparison; CI is still running on this head.

Overlaps and merge order: The description identifies dyst's unsubmitted perf/mesh-global-helpers work and WIP #2144. Their order remains to be agreed; the second change should be rebased and its translator stamp checked.


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

**Recommendation: Approve.** The code is ready: only testing is left. The NVIDIA measurements show a substantial gain on the tested earlier base, but the current head and other affected Tier 1 configurations still need runs. Recommend approval; not approved on the forge. Native task and mesh global loads use the guest page table instead of searching every bound storage buffer. This substantially reduces shader size and GPU time in the reported NVIDIA scenes, at the cost of relying on table coverage and allocation for those stages. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/eden/shader_recompiler/backend/spirv/spirv_emit_context.cpp:1196`: The changed native shader path still needs game and timing runs on the current head and affected Windows drivers. (more on the line) **Do:** Run the stated scenes on the current head against its base, including NVIDIA and AMD Windows, checking pictures, frame times and cold shader preparation. - **L2** `gpu/vk/eden/shader_recompiler/backend/spirv/spirv_emit_context.cpp:1196`: RADV native mesh execution and the Tier 1 fallback configurations remain untested in game. (more on the line) **Do:** Run the stated scenes on an RX 6000–9000 with RADV native enabled and on Steam Deck or the relevant fallback configuration, checking output and timing. **Checks:** Still running: 9 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the reported Linux RTX 4070 Ti runs at the earlier base: median FPS rose 136.6 to 165.2 in Kokiri Forest and 126.6 to 145.0 in Hyrule Field; GPU time fell 1.20 ms and 0.90 ms per frame. The current head was compiled but not run in game, and the other affected drivers remain unmeasured. **Other systems:** The default affects native mesh shaders on NVIDIA and AMD Windows, and RADV when native mesh shaders are selected. The compute fallback and Steam Deck default are reported to emit unchanged SPIR-V, but their game runs remain outstanding. Stores and atomics retain the search. Table coverage, copied bindings, allocation failure, and driver compilation affect the changed path. **Switches:** RX_VK_GP_TABLE remains default 1 where host import and device addresses are available; its scope now includes native task and mesh loads. Mode 0 restores the search and mode 2 compares answers. The default has a measured NVIDIA gain but has not yet been validated on all affected Tier 1 drivers. No switch was added or removed. **Reviewed:** d19d3b543aaa against 67ba729d215b: Read AGENTS.md, CONTRIBUTING.md, the PR template, relevant standards, the complete diff and commit message, and the changed shader constructor, global-memory helpers, descriptor setup and tests; traced table allocation, coverage and push constants. Skimmed the remaining portions of the larger changed files and related host code. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance. - No game-derived files, generated shader headers, third-party files or renderer API definitions are changed. - The existing switch table row is updated, and the test emits native task and mesh modules in all three table modes. - The reported NVIDIA comparisons include interleaved runs, frame-time tails and GPU times. **Testing:** No code or tests were run during review. The author reports game runs on an earlier base, SPIR-V validation and a suite comparison; CI is still running on this head. **Overlaps and merge order:** The description identifies dyst's unsubmitted perf/mesh-global-helpers work and WIP #2144. Their order remains to be agreed; the second change should be rebased and its translator stamp checked. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -1182,2 +1193,4 @@
// every bound storage buffer's range tested at every load
const bool table_stage{graphics_stage || stage == Stage::Compute || stage == Stage::Task || stage == Stage::Mesh};
const bool graphics_table{graphics_table_loads != 0 && table_stage && wants_guest_pages &&
rescaling_push_constants.value != 0 && profile.supported_spirv >= 0x00010400};
Member

L1 (should fix): The changed native shader path still needs game and timing runs on the current head and affected Windows drivers.

When: The reported game runs used an earlier base; NVIDIA Windows and AMD Windows use the changed native stages but have no reported in-game correctness or performance result.

Do: Run the stated scenes on the current head against its base, including NVIDIA and AMD Windows, checking pictures, frame times and cold shader preparation.

**L1** (should fix): The changed native shader path still needs game and timing runs on the current head and affected Windows drivers. *When:* The reported game runs used an earlier base; NVIDIA Windows and AMD Windows use the changed native stages but have no reported in-game correctness or performance result. **Do:** Run the stated scenes on the current head against its base, including NVIDIA and AMD Windows, checking pictures, frame times and cold shader preparation.
Member

L2 (should fix): RADV native mesh execution and the Tier 1 fallback configurations remain untested in game.

When: RADV native mode takes the changed path, while Steam Deck and other fallback configurations must continue to work; offline compilation and unchanged fallback SPIR-V do not exercise those game paths.

Do: Run the stated scenes on an RX 6000–9000 with RADV native enabled and on Steam Deck or the relevant fallback configuration, checking output and timing.

**L2** (should fix): RADV native mesh execution and the Tier 1 fallback configurations remain untested in game. *When:* RADV native mode takes the changed path, while Steam Deck and other fallback configurations must continue to work; offline compilation and unchanged fallback SPIR-V do not exercise those game paths. **Do:** Run the stated scenes on an RX 6000–9000 with RADV native enabled and on Steam Deck or the relevant fallback configuration, checking output and timing.
HumanBean changed title from WIP: perf(shaders): native task and mesh stages read global memory through the guest page table to perf(shaders): native task and mesh stages read global memory through the guest page table 2026-11-23 16:06:29 +00:00
HumanBean deleted branch perf/mesh-global-table 2026-11-23 16:06:51 +00:00
Some checks failed
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows+nvidia 2/1 pass
beanstalk/windows+amd 1/1 fail
beanstalk/linux+nvidia 1/1 fail
beanstalk/linux+radv 1/1 fail
beanstalk/amd 1/1 fail
beanstalk/intel 0/1 pass, 0 running, 0 queued
beanstalk/steamdeck 1/1 fail
PR description / Description follows the template (pull_request_target) Failing after 24s
Some workflows are waiting to be reviewed.
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!2291
No description provided.