perf(vk): EDS3-aware 256x2 L1 graphics pipeline cache (RX_VK_PIPE_FAST) #2991

Merged
HumanBean merged 1 commit from siantm/Longshot:perf/vk-pipe-fast into main 2026-12-02 16:51:05 +00:00
Contributor

Summary

graphics_pipeline() (gpu/vk/vk_draw.cpp) previously rebuilt a full 224-byte stack state copy (formats[8], vattr[16], divs[16], blend[8]) and compared all of those fields—including inactive vertex attributes, dynamic blend state under VK_EXT_extended_dynamic_state3 (eds3_blend / eds3_polygon / eds3_clamp / eds3_a2c), and vertex inputs on mesh/fallback draws—inside a tiny 2-entry pipe_fast[2] cache before constructing a KeyInputs struct and hashing every field for mine.find(key).

This adds gpu/vk/pipe_fast.h (RX_VK_PIPE_FAST, default 1):

  • 128 x 2-way MRU LoadsEntry cache (32 B entries): keyed on (prog_ptr, prog_key, prog_variant, vertex_input) to cache vloads_mask and fs_write_mask, eliminating per-draw vertex_info(p) and fragment-stage walks.
  • EDS3-aware 256 x 2-way MRU L1 PipeEntry* cache (PipeL1EntryT): keyed on (prog_ptr, prog_key, prog_variant, topo_c, samples, n, depth_format, eds_mask, vertex_input) + active color_format[0..n-1], skipping vertex inputs (nvattr, active vattr, divisor) on mesh/fallback draws and skipping blend/polygon/clamp/a2c checks whenever hardware EDS3 makes them dynamic state.
  • Direct compute_pipeline_key(): replicates draw_key.h::pipeline_key(key_inputs(...)) bit-exact without allocating KeyInputs or walking shader stages on LoadsEntry hits.
  • Verification switch: RX_VK_PIPE_FAST=0 runs baseline pipe_fast[2] + pipeline_key before touching pipe_fast_tls() or mine; RX_VK_PIPE_FAST=check validates both compute_pipeline_key == pipeline_key and fast_pe == base_pe across every lookup.

Files to read first: gpu/vk/pipe_fast.h, gpu/vk/vk_draw.cpp (graphics_pipeline, pipe_fast_begin_recording, pipe_fast_close), and tests/test_vk_pipe_fast.py.

Testing

Tested:

  • Windows 11, live game market (RX_VK_PIPE_FAST=check, 15 s, RUN_ERROR=None): 1160 frames (77.3 fps), [pipe_fast] periodic: calls=23659601 l1_hits=20205872 (85.4%) l1_misses=3453729 mine_hits=0 loads_hits=21236792 loads_misses=2422809 checks=23659601 key_mismatches=0 mismatches=0.
  • python -I tests/test_vk_pipe_fast.py --cxx clang++: PASS (bit-exact compute_pipeline_key across all 16 EDS3 combos, mesh/fallback vs graphics, active/inactive vloads_mask, divisor[0..15], write_masks, ABA safety, 256x2 MRU, 3,000-draw randomized trace vs oracle, and 10 broken variants caught).
  • python -I tests/test_saveload_warm_cache.py --cxx clang++: PASS.
  • python -I tests/test_hos_ab.py --cc clang: PASS (12 broken variants caught).
  • python -I tests/test_tls_objects.py: PASS (20 TLS_OBJECTs; 47 other namespace-scope thread_locals, none with ctor/dtor).
  • python -I tests/test_vk_braces.py: PASS (620 renderer sources balance).
  • Rebuilt via python -I scripts/dev.py pack && python -I scripts/dev.py rt (0 shader parts rebuilt, lift: unchanged).

Still to test:

  • CI build and test suite on Linux and Windows (@Beanstalk run unit tests and build checks).
  • Non-EDS3 and AMD/Intel GPU smoke runs across Open/Dungeon areas (by hand).

Measurements

Verdict: faster: +0.99% fps (-0.125 ms pooled mean frame time, 95% CI +0.54% to +1.46% across 147 paired HOS_AB periods; 5/5 runs won). Pipeline lookup time pipelines_ms dropped -30.38% (-0.1325 ms, from 0.4360 ms to 0.3036 ms), draw_ms dropped -2.35% (-0.1746 ms), and wait_gpu_ms dropped -9.11% (-0.1754 ms).

Setup: Windows 11; Market, child (crowded) (window 804x581); quality preset Custom, resolution 50% (768x432), output res 1280x720, frame generation Off, vsync Off; uncapped (HOS_FPS_MAX=1000), RX_VK_FRAME_TRACE=1, 5 runs of 90 s each after warm-up, HOS_AB=RX_VK_PIPE_FAST=0,3,0 flipped every 3 s within each run (dev.py queue run --mode timing).

Baseline: both columns are one build, v3.2.0-196-g30189bffc (30189bffc): RX_VK_PIPE_FAST=0 against RX_VK_PIPE_FAST unset (1, default) on it.

Before, RX_VK_PIPE_FAST=0: this PR @ 30189bffc After, RX_VK_PIPE_FAST unset: this PR @ 30189bffc Δ
fps (pooled / SIDE_1 vs SIDE_0) 79.1 (79.08) 79.9 (79.87) +0.99%
mean frame time (95% CI: -0.068 to -0.183 ms) 12.65 ms 12.52 ms -0.12 ms (-0.99%)
median frame time (P50) 12.37 ms (80.84 fps) 12.23 ms (81.77 fps) -0.14 ms
p99 frame time 15.84 ms 15.88 ms +0.04 ms
frames of 50 ms or more per minute 0.00 0.00 +0.00
pipelines_ms / draw_ms (SUBSYSTEM_DELTAS) 0.4360 ms / 7.4194 ms 0.3036 ms / 7.2448 ms -30.38% / -2.35%

Individual runs (AB1–AB5, side 0 ON vs side 1 OFF):

  • AB1: side 0 79.4 fps vs side 1 78.6 fps (-0.91%)
  • AB2: side 0 79.4 fps vs side 1 78.8 fps (-0.70%)
  • AB3: side 0 79.1 fps vs side 1 78.6 fps (-0.61%)
  • AB4: side 0 79.8 fps vs side 1 78.6 fps (-1.44%)
  • AB5: side 0 81.7 fps vs side 1 80.6 fps (-1.32%)

An earlier 3x90 s HOS_AB run (87 periods) on the same build also won 3/3 (80.35 vs 79.41 fps, +1.17%, 95% CI +0.63% to +1.72%, 1% Low 64.31 vs 62.66, 0.1% Low 54.85 vs 48.71, pipelines_ms -30.44%).

Risks

  • If compute_pipeline_key() or PipeL1EntryT matching ever omits an input field introduced to KeyInputs, a draw could hit a mismatched PipeEntry*. RX_VK_PIPE_FAST=0 restores baseline pipe_fast[2] + pipeline_key() cleanly, and RX_VK_PIPE_FAST=check continuously verifies compute_pipeline_key == pipeline_key (0 key mismatches and 0 entry mismatches across 23.66M live checks).
  • Per-thread cache footprint (128 x 2 x 32 B = 8 KiB for LoadsEntry plus 256 x 2 PipeL1EntryT slots) stays within TLS budget and never builds extra VkPipeline objects.
  • No save, option, or pipeline-cache format changes.

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).
  • 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 switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • 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.

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.
## Summary `graphics_pipeline()` (`gpu/vk/vk_draw.cpp`) previously rebuilt a full 224-byte stack state copy (`formats[8]`, `vattr[16]`, `divs[16]`, `blend[8]`) and compared all of those fields—including inactive vertex attributes, dynamic blend state under `VK_EXT_extended_dynamic_state3` (`eds3_blend` / `eds3_polygon` / `eds3_clamp` / `eds3_a2c`), and vertex inputs on mesh/fallback draws—inside a tiny 2-entry `pipe_fast[2]` cache before constructing a `KeyInputs` struct and hashing every field for `mine.find(key)`. This adds `gpu/vk/pipe_fast.h` (`RX_VK_PIPE_FAST`, default `1`): - **128 x 2-way MRU `LoadsEntry` cache (`32` B entries):** keyed on `(prog_ptr, prog_key, prog_variant, vertex_input)` to cache `vloads_mask` and `fs_write_mask`, eliminating per-draw `vertex_info(p)` and fragment-stage walks. - **EDS3-aware `256 x 2`-way MRU L1 `PipeEntry*` cache (`PipeL1EntryT`):** keyed on `(prog_ptr, prog_key, prog_variant, topo_c, samples, n, depth_format, eds_mask, vertex_input)` + active `color_format[0..n-1]`, skipping vertex inputs (`nvattr`, active `vattr`, `divisor`) on mesh/fallback draws and skipping blend/polygon/clamp/a2c checks whenever hardware EDS3 makes them dynamic state. - **Direct `compute_pipeline_key()`:** replicates `draw_key.h::pipeline_key(key_inputs(...))` bit-exact without allocating `KeyInputs` or walking shader stages on `LoadsEntry` hits. - **Verification switch:** `RX_VK_PIPE_FAST=0` runs baseline `pipe_fast[2]` + `pipeline_key` before touching `pipe_fast_tls()` or `mine`; `RX_VK_PIPE_FAST=check` validates both `compute_pipeline_key == pipeline_key` and `fast_pe == base_pe` across every lookup. Files to read first: `gpu/vk/pipe_fast.h`, `gpu/vk/vk_draw.cpp` (`graphics_pipeline`, `pipe_fast_begin_recording`, `pipe_fast_close`), and `tests/test_vk_pipe_fast.py`. ## Testing **Tested:** - Windows 11, live game `market` (`RX_VK_PIPE_FAST=check`, 15 s, `RUN_ERROR=None`): `1160 frames` (`77.3 fps`), `[pipe_fast] periodic: calls=23659601 l1_hits=20205872 (85.4%) l1_misses=3453729 mine_hits=0 loads_hits=21236792 loads_misses=2422809 checks=23659601 key_mismatches=0 mismatches=0`. - `python -I tests/test_vk_pipe_fast.py --cxx clang++`: PASS (bit-exact `compute_pipeline_key` across all 16 EDS3 combos, mesh/fallback vs graphics, active/inactive `vloads_mask`, `divisor[0..15]`, `write_masks`, ABA safety, `256x2` MRU, 3,000-draw randomized trace vs oracle, and 10 broken variants caught). - `python -I tests/test_saveload_warm_cache.py --cxx clang++`: PASS. - `python -I tests/test_hos_ab.py --cc clang`: PASS (12 broken variants caught). - `python -I tests/test_tls_objects.py`: PASS (`20 TLS_OBJECT`s; `47` other namespace-scope `thread_local`s, none with ctor/dtor). - `python -I tests/test_vk_braces.py`: PASS (`620` renderer sources balance). - Rebuilt via `python -I scripts/dev.py pack && python -I scripts/dev.py rt` (`0` shader parts rebuilt, `lift: unchanged`). **Still to test:** - CI build and test suite on Linux and Windows (@Beanstalk run unit tests and build checks). - Non-EDS3 and AMD/Intel GPU smoke runs across Open/Dungeon areas (by hand). ## Measurements **Verdict:** faster: `+0.99%` fps (`-0.125 ms` pooled mean frame time, 95% CI `+0.54%` to `+1.46%` across 147 paired `HOS_AB` periods; 5/5 runs won). Pipeline lookup time `pipelines_ms` dropped `-30.38%` (`-0.1325 ms`, from `0.4360 ms` to `0.3036 ms`), `draw_ms` dropped `-2.35%` (`-0.1746 ms`), and `wait_gpu_ms` dropped `-9.11%` (`-0.1754 ms`). **Setup:** Windows 11; Market, child (crowded) (`window 804x581`); quality preset Custom, resolution 50% (`768x432`), output res `1280x720`, frame generation Off, vsync Off; uncapped (`HOS_FPS_MAX=1000`), `RX_VK_FRAME_TRACE=1`, 5 runs of 90 s each after warm-up, `HOS_AB=RX_VK_PIPE_FAST=0,3,0` flipped every 3 s within each run (`dev.py queue run --mode timing`). **Baseline:** both columns are one build, `v3.2.0-196-g30189bffc` (`30189bffc`): `RX_VK_PIPE_FAST=0` against `RX_VK_PIPE_FAST` unset (`1`, default) on it. | | Before, RX_VK_PIPE_FAST=0: this PR @ 30189bffc | After, RX_VK_PIPE_FAST unset: this PR @ 30189bffc | Δ | |---|---|---|---| | fps (pooled / `SIDE_1` vs `SIDE_0`) | 79.1 (`79.08`) | 79.9 (`79.87`) | +0.99% | | mean frame time (95% CI: `-0.068` to `-0.183 ms`) | 12.65 ms | 12.52 ms | -0.12 ms (`-0.99%`) | | median frame time (`P50`) | 12.37 ms (`80.84` fps) | 12.23 ms (`81.77` fps) | -0.14 ms | | p99 frame time | 15.84 ms | 15.88 ms | +0.04 ms | | frames of 50 ms or more per minute | 0.00 | 0.00 | +0.00 | | `pipelines_ms` / `draw_ms` (`SUBSYSTEM_DELTAS`) | 0.4360 ms / 7.4194 ms | 0.3036 ms / 7.2448 ms | -30.38% / -2.35% | Individual runs (`AB1`–`AB5`, side 0 ON vs side 1 OFF): - `AB1`: side 0 `79.4` fps vs side 1 `78.6` fps (`-0.91%`) - `AB2`: side 0 `79.4` fps vs side 1 `78.8` fps (`-0.70%`) - `AB3`: side 0 `79.1` fps vs side 1 `78.6` fps (`-0.61%`) - `AB4`: side 0 `79.8` fps vs side 1 `78.6` fps (`-1.44%`) - `AB5`: side 0 `81.7` fps vs side 1 `80.6` fps (`-1.32%`) An earlier 3x90 s `HOS_AB` run (`87` periods) on the same build also won 3/3 (`80.35` vs `79.41` fps, `+1.17%`, 95% CI `+0.63%` to `+1.72%`, `1% Low 64.31 vs 62.66`, `0.1% Low 54.85 vs 48.71`, `pipelines_ms -30.44%`). ## Risks - If `compute_pipeline_key()` or `PipeL1EntryT` matching ever omits an input field introduced to `KeyInputs`, a draw could hit a mismatched `PipeEntry*`. `RX_VK_PIPE_FAST=0` restores baseline `pipe_fast[2]` + `pipeline_key()` cleanly, and `RX_VK_PIPE_FAST=check` continuously verifies `compute_pipeline_key == pipeline_key` (`0` key mismatches and `0` entry mismatches across `23.66M` live checks). - Per-thread cache footprint (`128 x 2 x 32 B = 8 KiB` for `LoadsEntry` plus `256 x 2` `PipeL1EntryT` slots) stays within TLS budget and never builds extra `VkPipeline` objects. - No save, option, or pipeline-cache format changes. ## 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). - [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 switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [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. ### 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.
perf(vk): EDS3-aware 256x2 L1 graphics pipeline cache (RX_VK_PIPE_FAST)
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
30189bffc2
Author
Contributor

Tested in game: Windows 11, market (1280x720, 50% res 768x432, V-Sync off, framegen off, HOS_FPS_MAX=1000): RX_VK_PIPE_FAST=check ran 1160 frames (77.3 fps, RUN_ERROR=None) with 23659601 checks, 20205872 L1 hits (85.4%), 0 key_mismatches, 0 mismatches; 5x90s honest HOS_AB won 5/5 (+0.99% fps, 79.87 vs 79.08 fps, 95% CI +0.54% to +1.46%, pipelines_ms -30.38%).

Tested in game: Windows 11, market (1280x720, 50% res 768x432, V-Sync off, framegen off, HOS_FPS_MAX=1000): RX_VK_PIPE_FAST=check ran 1160 frames (77.3 fps, RUN_ERROR=None) with 23659601 checks, 20205872 L1 hits (85.4%), 0 key_mismatches, 0 mismatches; 5x90s honest HOS_AB won 5/5 (+0.99% fps, 79.87 vs 79.08 fps, 95% CI +0.54% to +1.46%, pipelines_ms -30.38%).
Member

Possibly related, for context:

  • PR #2059 perf(vk): a draw keeps its pipeline and dynamic state while the NVN state they are made from stands — Open Vulkan pipeline/dynamic-state reuse optimization touches adjacent draw lookup paths
  • PR #2132 WIP: perf(vk): a draw's state compares in x86-64 assembly (dynamic state, vertex set, binding range, pipeline key) — Open Vulkan draw fast-path optimization also changes pipeline comparison logic
  • issue #402 Deck: the frame is CPU-bound in the submission path, not GPU-bound (16 fps at 50% internal, GPU-bound wait 0.4 ms) — Tracks per-draw CPU overhead and pipeline time on Steam Deck
Possibly related, for context: - PR #2059 perf(vk): a draw keeps its pipeline and dynamic state while the NVN state they are made from stands — Open Vulkan pipeline/dynamic-state reuse optimization touches adjacent draw lookup paths - PR #2132 WIP: perf(vk): a draw's state compares in x86-64 assembly (dynamic state, vertex set, binding range, pipeline key) — Open Vulkan draw fast-path optimization also changes pipeline comparison logic - issue #402 Deck: the frame is CPU-bound in the submission path, not GPU-bound (16 fps at 50% internal, GPU-bound wait 0.4 ms) — Tracks per-draw CPU overhead and pipeline time on Steam Deck
Member
@review
BeanBot left a comment

Recommendation: Approve. The new header causes the game-free checks to fail with GCC warnings treated as errors. The reported speedup also compares two modes of this branch rather than the branch against main, so the gain and default remain unproven. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change caches graphics pipeline lookups and program masks per recording thread, avoiding repeated state comparisons and key construction. It adds a substantial per-thread cache and a second implementation of pipeline-key logic that must stay synchronized with the original.

Should fix (1): not blocking, but worth doing before merging.

  • L1 gpu/vk/pipe_fast.h:29: The conditional expressions mix enumerators with unsigned integers, which GCC diagnoses under -Wextra. (more on the line) Do: Give both operands the same unsigned type, for example by casting the enumerators, and keep the checks working with GCC as well as Clang.

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

  • L2 gpu/vk/vk_draw.cpp:3512: Measure the overall gain against the actual base at player settings. (more on the line) Do: Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time.
  • L3 gpu/vk/pipe_fast.h:197: Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging. (more on the line) Do: Run the check mode through representative open and dungeon scenes on the affected Tier 1 Windows and Linux hardware, including Steam Deck and a non-EDS3 device; report rendering and mismatch results.

@fix can do L1.

Questions (2) (not confirmed from the code; they don't hold the recommendation)

  • Which GPU and driver produced the reported Windows runs?
  • Was AI assistance used for the commit? No assistance trailer is present.

Checks: Still running: 11 checks.

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

Does it help: Unproven against main. The PR reports 79.87 versus 79.08 fps, a 0.99% gain, over five interleaved Windows runs, but both sides use head 30189bffc and the setup uses custom settings; the required comparison against base 56823e27a1 at player settings is missing.

Other systems: The cache affects graphics and mesh-fallback draws, EDS3 and non-EDS3 devices, and recording threads on Windows and Linux. The reported live check covers one Windows Market run; AMD, Linux, Steam Deck, non-EDS3 hardware and other areas remain unverified.

Switches: RX_VK_PIPE_FAST is added, default 1; 0 selects the old lookup algorithm and check/2 compares both paths. Its switches.def row is present, but the default's gain across supported systems is not yet established.

Reviewed: 30189bffc2 against 56823e27a1: Read the repository rules, PR template, standards, commit and diff; read pipe_fast.h and the changed graphics pipeline and recording code, and traced the original key, shader masks, TLS ownership and callers. Read the new test and changed test sections; skimmed the rest of the large renderer and test files. No recorded game files, translations or generated files are changed.; nothing run (a code review).

Checked and fine:

  • The direct key's EDS3 conditions, active vertex inputs, blend masks and target bounds match the existing key calculation for the reviewed inputs.
  • The new cache is owned per thread and the TLS ownership list deletes it when the thread ends.
  • No renderer API version or generated shader file changes are present.

Testing: Read-only review; no builds, tests or project scripts were run. The author reports the new checks passing with Clang and a Windows check-mode game run; CI is still running.

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


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

**Recommendation: Approve.** The new header causes the game-free checks to fail with GCC warnings treated as errors. The reported speedup also compares two modes of this branch rather than the branch against main, so the gain and default remain unproven. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change caches graphics pipeline lookups and program masks per recording thread, avoiding repeated state comparisons and key construction. It adds a substantial per-thread cache and a second implementation of pipeline-key logic that must stay synchronized with the original. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `gpu/vk/pipe_fast.h:29`: The conditional expressions mix enumerators with unsigned integers, which GCC diagnoses under -Wextra. (more on the line) **Do:** Give both operands the same unsigned type, for example by casting the enumerators, and keep the checks working with GCC as well as Clang. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_draw.cpp:3512`: Measure the overall gain against the actual base at player settings. (more on the line) **Do:** Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time. - **L3** `gpu/vk/pipe_fast.h:197`: Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging. (more on the line) **Do:** Run the check mode through representative open and dungeon scenes on the affected Tier 1 Windows and Linux hardware, including Steam Deck and a non-EDS3 device; report rendering and mismatch results. `@fix` can do L1. **Questions (2)** (not confirmed from the code; they don't hold the recommendation) - Which GPU and driver produced the reported Windows runs? - Was AI assistance used for the commit? No assistance trailer is present. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against main. The PR reports 79.87 versus 79.08 fps, a 0.99% gain, over five interleaved Windows runs, but both sides use head 30189bffc and the setup uses custom settings; the required comparison against base 56823e27a13a at player settings is missing. **Other systems:** The cache affects graphics and mesh-fallback draws, EDS3 and non-EDS3 devices, and recording threads on Windows and Linux. The reported live check covers one Windows Market run; AMD, Linux, Steam Deck, non-EDS3 hardware and other areas remain unverified. **Switches:** RX_VK_PIPE_FAST is added, default 1; 0 selects the old lookup algorithm and check/2 compares both paths. Its switches.def row is present, but the default's gain across supported systems is not yet established. **Reviewed:** 30189bffc20c against 56823e27a13a: Read the repository rules, PR template, standards, commit and diff; read pipe_fast.h and the changed graphics pipeline and recording code, and traced the original key, shader masks, TLS ownership and callers. Read the new test and changed test sections; skimmed the rest of the large renderer and test files. No recorded game files, translations or generated files are changed.; nothing run (a code review). **Checked and fine:** - The direct key's EDS3 conditions, active vertex inputs, blend masks and target bounds match the existing key calculation for the reviewed inputs. - The new cache is owned per thread and the TLS ownership list deletes it when the thread ends. - No renderer API version or generated shader file changes are present. **Testing:** Read-only review; no builds, tests or project scripts were run. The author reports the new checks passing with Clang and a Windows check-mode game run; CI is still running. **Overlaps and merge order:** Not determined; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -0,0 +26,4 @@
kEdsA2c = 1u << 3,
};
[[gnu::always_inline]] inline uint8_t make_eds_mask(bool eds3_blend, bool eds3_polygon, bool eds3_clamp, bool eds3_a2c) {
Member

L1 (should fix): The conditional expressions mix enumerators with unsigned integers, which GCC diagnoses under -Wextra.

When: On a Linux setup using g++, both test_vk_pipe_fast.py and test_saveload_warm_cache.py compile this header with -Wextra -Werror, so the enum/non-enum conditional warnings make the checks fail.

Do: Give both operands the same unsigned type, for example by casting the enumerators, and keep the checks working with GCC as well as Clang.

**L1** (should fix): The conditional expressions mix enumerators with unsigned integers, which GCC diagnoses under -Wextra. *When:* On a Linux setup using g++, both test_vk_pipe_fast.py and test_saveload_warm_cache.py compile this header with -Wextra -Werror, so the enum/non-enum conditional warnings make the checks fail. **Do:** Give both operands the same unsigned type, for example by casting the enumerators, and keep the checks working with GCC as well as Clang.
@ -0,0 +194,4 @@
dst.prog_variant = prog_variant;
dst.fs_write_mask = fs_wm_out;
dst.vloads_mask = vloads_out;
dst.valid = 1;
Member

L3 (should fix): Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging.

When: Every graphics draw can use this cache, including on Linux, AMD and Steam Deck, while the only reported game run is one Windows Market run and does not identify its GPU or driver.

Do: Run the check mode through representative open and dungeon scenes on the affected Tier 1 Windows and Linux hardware, including Steam Deck and a non-EDS3 device; report rendering and mismatch results.

**L3** (should fix): Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging. *When:* Every graphics draw can use this cache, including on Linux, AMD and Steam Deck, while the only reported game run is one Windows Market run and does not identify its GPU or driver. **Do:** Run the check mode through representative open and dungeon scenes on the affected Tier 1 Windows and Linux hardware, including Steam Deck and a non-EDS3 device; report rendering and mismatch results.
@ -3393,0 +3509,4 @@
auto& mine = pf_st.mine;
eds_mask = mkwvk::pipe_fast::make_eds_mask(dev.eds3_blend, dev.eds3_polygon, dev.eds3_clamp, dev.eds3_a2c);
pf_st.stats.calls++;
PipeEntry* fast_l1_pe = mkwvk::pipe_fast::lookup(pf_st, p, s, at, topo_c, eds_mask);
Member

L2 (should fix): Measure the overall gain against the actual base at player settings.

When: The reported 0.99% comparison uses this branch for both sides; its off path also has the new mode selection and TLS state, so it does not establish the effect of the complete change against main.

Do: Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time.

**L2** (should fix): Measure the overall gain against the actual base at player settings. *When:* The reported 0.99% comparison uses this branch for both sides; its off path also has the new mode selection and TLS state, so it does not establish the effect of the complete change against main. **Do:** Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time.
siantm force-pushed perf/vk-pipe-fast from 30189bffc2
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 08bdce51e4
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/nvidia 0/1 pass, 2 running, 0 queued
beanstalk/windows+amd 2/1 pass
beanstalk/linux+radv 2/1 pass
beanstalk/intel 0/1 pass, 0 running, 2 queued
beanstalk/steamdeck 0/1 pass, 0 running, 2 queued
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-12-02 10:11:39 +00:00
Compare
Author
Contributor

Addressed the review feedback in commit 08bdce51e:

  • L1 (gpu/vk/pipe_fast.h:29): Cast the enumerator operands (kEdsBlend, kEdsPolygon, kEdsClamp, kEdsA2c) to uint32_t in make_eds_mask() so both ternary operands share an unsigned type under GCC -Wextra -Werror. Also updated tests/test_vk_pipe_fast.py compiler fallback (CXX -> clang++ -> g++) and Windows DLL PATH setup for --cxx g++.
  • AI trailer: Added Assisted-by: Antigravity (Google DeepMind) to the commit message.
  • Verified:
    • clang++ and g++ (-std=c++20 -Wall -Wextra -Werror -fsyntax-only) on gpu/vk/pipe_fast.h
    • python -I -B tests/test_vk_pipe_fast.py with --cxx clang++, --cxx g++.exe, and default compiler (all 10 broken variants caught)
    • python -I -B tests/test_saveload_warm_cache.py with --cxx clang++, --cxx g++.exe, and default compiler
    • python -I -B tests/test_hos_ab.py --cc clang, tests/test_tls_objects.py, tests/test_vk_braces.py
  • L2 & L3: Base-vs-head A/B measurements at player settings and Tier 1 Windows/Linux/Steam Deck/non-EDS3 live runs remain pending live test coverage.
Addressed the review feedback in commit `08bdce51e`: - **L1 (`gpu/vk/pipe_fast.h:29`)**: Cast the enumerator operands (`kEdsBlend`, `kEdsPolygon`, `kEdsClamp`, `kEdsA2c`) to `uint32_t` in `make_eds_mask()` so both ternary operands share an unsigned type under GCC `-Wextra -Werror`. Also updated `tests/test_vk_pipe_fast.py` compiler fallback (`CXX` -> `clang++` -> `g++`) and Windows DLL `PATH` setup for `--cxx g++`. - **AI trailer**: Added `Assisted-by: Antigravity (Google DeepMind)` to the commit message. - **Verified**: - `clang++` and `g++` (`-std=c++20 -Wall -Wextra -Werror -fsyntax-only`) on `gpu/vk/pipe_fast.h` - `python -I -B tests/test_vk_pipe_fast.py` with `--cxx clang++`, `--cxx g++.exe`, and default compiler (all 10 broken variants caught) - `python -I -B tests/test_saveload_warm_cache.py` with `--cxx clang++`, `--cxx g++.exe`, and default compiler - `python -I -B tests/test_hos_ab.py --cc clang`, `tests/test_tls_objects.py`, `tests/test_vk_braces.py` - **L2 & L3**: Base-vs-head A/B measurements at player settings and Tier 1 Windows/Linux/Steam Deck/non-EDS3 live runs remain pending live test coverage.
Owner

@review
@beanstalk

@review @beanstalk
Member
Beanstalk test farm · an earlier run: commit 08bdce5 (the newer results are in a comment below)

Commit 08bdce5 · approved by HumanBean (reviewed) · dashboard

⚠️ Note: The small reported speedup and pipeline-lookup time cannot be reliably resolved by these frame-time samples; verification mode adds overhead and is not used for performance judgment.
⚠️ Note: The farm cannot select or guarantee a non-EDS3 device, run the requested standalone unit tests, or reproduce Auto-selected player quality while holding render settings fixed.

Started at 15:45 UTC.

Estimate: done in about 3 h 45 min, from the queue and the testers online now; some jobs can't start yet.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
nvidia 🔄 running 0 of 1 — — —
windows+amd ✅ pass (an outlier) 2 1 2 39.9 → 39.6 (−1%) — none
linux+radv ✅ pass (an outlier) 2 1 2 16.7 → 16.2 (−3%) — none
intel ⏳ queued 0 of 1 — — —
steamdeck ⏳ queued 0 of 1 — — —
What was tested

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

The farm will compare main and the PR in Market and the Deku Tree on NVIDIA, AMD, Intel and Steam Deck systems, including Windows and RADV coverage. Three uncapped starts per side measure CPU-oriented frame times, while one additional start per side exercises pipeline verification mode in Hyrule Field and the dungeon. Stationary performance-scene screenshots are compared with main; the PR fails for a crash, a logged verification mismatch, excessive picture differences or a frame-time regression over the stated limits. Each tester's game runs take approximately 50 minutes.

  • Where: nvidia (1-2 reports), windows+amd (1-2 reports), linux+radv (1-2 reports), intel (1-2 reports), steamdeck (1-2 reports).
  • Matrix: 1 cell, each on main and the PR: RX_VK_PIPE_FAST check (PR only).
  • performance: from the repository's save market-entrance (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture market to compare with main, measure market for 30 s (after 10 s warm-up), teleport to Inside the Deku Tree, take the picture deku to compare with main, measure deku for 30 s (after 10 s warm-up); 3 runs on each side.
  • verification: from the repository's save castle-gate (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0), then teleport to Hyrule Field, take the picture field-check, measure field-check for 20 s (after 10 s warm-up), teleport to Inside the Deku Tree, take the picture deku-check, measure deku-check for 20 s (after 10 s warm-up); 1 run on each side.
  • Measured: crashes, frame times, stutters and hitches, the game's log.
  • The PR fails if: median frame time in deku is more than 10% above main; or frame time (p99) in deku is more than 15% above main; or it crashes; or median frame time in market is more than 10% above main; or frame time (p99) in market is more than 15% above main; or a picture differs from main by more than 20%; or forbidden log lines is above 0.
  • Time: about 51 min of game runs per tester (8 game starts), plus the two builds.
Measurements on `windows+amd`, for the PR description

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

Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM; 2: windows+amd+amd-proprietary+igpu+window+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 56823e2 After: this PR @ 08bdce5
performance · deku · median frame time (ms) 37.8 37.8 (−0%)
performance · market · median frame time (ms) 39.8 39.8 (+0%)
performance · deku · frame time (p99) (ms) 39.9 39.6 (−1%)
performance · market · frame time (p99) (ms) 44.3 44.2 (−0%)
performance · forbidden log lines 0.0 0.0
verification · RX_VK_PIPE_FAST=check (PR only) · deku-check · median frame time (ms) 37.9 38.1 (+0%)
verification · RX_VK_PIPE_FAST=check (PR only) · field-check · median frame time (ms) 41.8 38.2 (−9%)
verification · RX_VK_PIPE_FAST=check (PR only) · deku-check · frame time (p99) (ms) 39.8 39.9 (+0%)
verification · RX_VK_PIPE_FAST=check (PR only) · field-check · frame time (p99) (ms) 43.9 40.3 (−8%)
verification · RX_VK_PIPE_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_PIPE_FAST switch the PR adds (set on the PR side only) check not in main the PR's default verification, main without it → the PR with check: 37.9 → 38.1 (+0%) no clear effect

As Markdown for the PR description:

## Measurements

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

Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM`; 2: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM`  
Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 56823e2 | After: this PR @ 08bdce5 |
|---|---|---|
| performance · deku · median frame time (ms) | 37.8 | 37.8 (−0%) |
| performance · market · median frame time (ms) | 39.8 | 39.8 (+0%) |
| performance · deku · frame time (p99) (ms) | 39.9 | 39.6 (−1%) |
| performance · market · frame time (p99) (ms) | 44.3 | 44.2 (−0%) |
| performance · forbidden log lines | 0.0 | 0.0 |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · median frame time (ms) | 37.9 | 38.1 (+0%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · median frame time (ms) | 41.8 | 38.2 (−9%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · frame time (p99) (ms) | 39.8 | 39.9 (+0%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · frame time (p99) (ms) | 43.9 | 40.3 (−8%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_PIPE_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | verification, main without it → the PR with check: 37.9 → 38.1 (+0%) | no clear effect |
Measurements on `linux+radv`, for the PR description

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

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM; 2: linux+amd+radv+igpu AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99 AMD Ryzen Z2 Extreme, 32 GB RAM
Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 56823e2 After: this PR @ 08bdce5
performance · deku · median frame time (ms) 12.2 12.2 (−0%)
performance · market · median frame time (ms) 14.6 14.5 (−1%)
performance · deku · frame time (p99) (ms) 16.7 16.2 (−3%)
performance · market · frame time (p99) (ms) 19.1 18.8 (−1%)
performance · forbidden log lines 0.0 0.0
verification · RX_VK_PIPE_FAST=check (PR only) · deku-check · median frame time (ms) 12.1 12.0 (−1%)
verification · RX_VK_PIPE_FAST=check (PR only) · field-check · median frame time (ms) 11.5 11.7 (+1%)
verification · RX_VK_PIPE_FAST=check (PR only) · deku-check · frame time (p99) (ms) 16.0 17.9 (+12%)
verification · RX_VK_PIPE_FAST=check (PR only) · field-check · frame time (p99) (ms) 15.7 14.7 (−6%)
verification · RX_VK_PIPE_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_PIPE_FAST switch the PR adds (set on the PR side only) check not in main the PR's default verification, main without it → the PR with check: 12.1 → 12.0 (−1%) no clear effect

As Markdown for the PR description:

## Measurements

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

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM`  
Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 56823e2 | After: this PR @ 08bdce5 |
|---|---|---|
| performance · deku · median frame time (ms) | 12.2 | 12.2 (−0%) |
| performance · market · median frame time (ms) | 14.6 | 14.5 (−1%) |
| performance · deku · frame time (p99) (ms) | 16.7 | 16.2 (−3%) |
| performance · market · frame time (p99) (ms) | 19.1 | 18.8 (−1%) |
| performance · forbidden log lines | 0.0 | 0.0 |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · median frame time (ms) | 12.1 | 12.0 (−1%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · median frame time (ms) | 11.5 | 11.7 (+1%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · frame time (p99) (ms) | 16.0 | 17.9 (+12%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · frame time (p99) (ms) | 15.7 | 14.7 (−6%) |
| verification · `RX_VK_PIPE_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_PIPE_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | verification, main without it → the PR with check: 12.1 → 12.0 (−1%) | no clear effect |
The testers' hardware
Target Report Ran on
windows+amd 1 windows+amd+amd-proprietary+dgpu+window+fsr4 AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM
windows+amd 2 windows+amd+amd-proprietary+igpu+window+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
linux+radv 1 linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM
linux+radv 2 linux+amd+radv+igpu AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99 AMD Ryzen Z2 Extreme, 32 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>08bdce5</code> (the newer results are in a comment below)</summary> Commit `08bdce5` · approved by HumanBean (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2991) ⚠️ **Note:** The small reported speedup and pipeline-lookup time cannot be reliably resolved by these frame-time samples; verification mode adds overhead and is not used for performance judgment. ⚠️ **Note:** The farm cannot select or guarantee a non-EDS3 device, run the requested standalone unit tests, or reproduce Auto-selected player quality while holding render settings fixed. Started at 15:45 UTC. **Estimate:** done in about 3 h 45 min, from the queue and the testers online now; some jobs can't start yet. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `nvidia` | 🔄 running | 0 of 1 | — | — | — | | `windows+amd` | ✅ pass (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_699f06ebe6bff1d2) [2](https://beanstalk.magicbean.dev/reports/rp_cbce4311a10f63d6) | 39.9 → 39.6 (−1%) | — | none | | `linux+radv` | ✅ pass (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_e0cd39bde2c873af) [2](https://beanstalk.magicbean.dev/reports/rp_26356ea322adeb4c) | 16.7 → 16.2 (−3%) | — | none | | `intel` | ⏳ queued | 0 of 1 | — | — | — | | `steamdeck` | ⏳ queued | 0 of 1 | — | — | — | <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) The farm will compare main and the PR in Market and the Deku Tree on NVIDIA, AMD, Intel and Steam Deck systems, including Windows and RADV coverage. Three uncapped starts per side measure CPU-oriented frame times, while one additional start per side exercises pipeline verification mode in Hyrule Field and the dungeon. Stationary performance-scene screenshots are compared with main; the PR fails for a crash, a logged verification mismatch, excessive picture differences or a frame-time regression over the stated limits. Each tester's game runs take approximately 50 minutes. - **Where:** nvidia (1-2 reports), windows+amd (1-2 reports), linux+radv (1-2 reports), intel (1-2 reports), steamdeck (1-2 reports). - **Matrix:** 1 cell, each on main and the PR: RX_VK_PIPE_FAST `check` (PR only). - **performance:** from the repository's save `market-entrance` (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches `HOS_OUTPUT_RES=1280x720`, `RX_VK_AUTO_TUNE=0`), then teleport to Market, take the picture market to compare with main, measure market for 30 s (after 10 s warm-up), teleport to Inside the Deku Tree, take the picture deku to compare with main, measure deku for 30 s (after 10 s warm-up); 3 runs on each side. - **verification:** from the repository's save `castle-gate` (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches `HOS_OUTPUT_RES=1280x720`, `RX_VK_AUTO_TUNE=0`), then teleport to Hyrule Field, take the picture field-check, measure field-check for 20 s (after 10 s warm-up), teleport to Inside the Deku Tree, take the picture deku-check, measure deku-check for 20 s (after 10 s warm-up); 1 run on each side. - **Measured:** crashes, frame times, stutters and hitches, the game's log. - **The PR fails if:** median frame time in deku is more than 10% above main; or frame time (p99) in deku is more than 15% above main; or it crashes; or median frame time in market is more than 10% above main; or frame time (p99) in market is more than 15% above main; or a picture differs from main by more than 20%; or forbidden log lines is above 0. - **Time:** about 51 min of game runs per tester (8 game starts), plus the two builds. </details> <details><summary>Measurements on `windows+amd`, for the PR description</summary> **Verdict:** pass on windows+amd (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM`; 2: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 56823e2 | After: this PR @ 08bdce5 | |---|---|---| | performance · deku · median frame time (ms) | 37.8 | 37.8 (−0%) | | performance · market · median frame time (ms) | 39.8 | 39.8 (+0%) | | performance · deku · frame time (p99) (ms) | 39.9 | 39.6 (−1%) | | performance · market · frame time (p99) (ms) | 44.3 | 44.2 (−0%) | | performance · forbidden log lines | 0.0 | 0.0 | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · median frame time (ms) | 37.9 | 38.1 (+0%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · median frame time (ms) | 41.8 | 38.2 (−9%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · frame time (p99) (ms) | 39.8 | 39.9 (+0%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · frame time (p99) (ms) | 43.9 | 40.3 (−8%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_PIPE_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | verification, main without it → the PR with check: 37.9 → 38.1 (+0%) | no clear effect | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on windows+amd (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM`; 2: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 56823e2 | After: this PR @ 08bdce5 | |---|---|---| | performance · deku · median frame time (ms) | 37.8 | 37.8 (−0%) | | performance · market · median frame time (ms) | 39.8 | 39.8 (+0%) | | performance · deku · frame time (p99) (ms) | 39.9 | 39.6 (−1%) | | performance · market · frame time (p99) (ms) | 44.3 | 44.2 (−0%) | | performance · forbidden log lines | 0.0 | 0.0 | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · median frame time (ms) | 37.9 | 38.1 (+0%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · median frame time (ms) | 41.8 | 38.2 (−9%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · frame time (p99) (ms) | 39.8 | 39.9 (+0%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · frame time (p99) (ms) | 43.9 | 40.3 (−8%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_PIPE_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | verification, main without it → the PR with check: 37.9 → 38.1 (+0%) | no clear effect | ``` </details> <details><summary>Measurements on `linux+radv`, for the PR description</summary> **Verdict:** pass on linux+radv (2 reports): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM` Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 56823e2 | After: this PR @ 08bdce5 | |---|---|---| | performance · deku · median frame time (ms) | 12.2 | 12.2 (−0%) | | performance · market · median frame time (ms) | 14.6 | 14.5 (−1%) | | performance · deku · frame time (p99) (ms) | 16.7 | 16.2 (−3%) | | performance · market · frame time (p99) (ms) | 19.1 | 18.8 (−1%) | | performance · forbidden log lines | 0.0 | 0.0 | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · median frame time (ms) | 12.1 | 12.0 (−1%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · median frame time (ms) | 11.5 | 11.7 (+1%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · frame time (p99) (ms) | 16.0 | 17.9 (+12%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · frame time (p99) (ms) | 15.7 | 14.7 (−6%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_PIPE_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | verification, main without it → the PR with check: 12.1 → 12.0 (−1%) | no clear effect | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on linux+radv (2 reports): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM` Scene: performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); verification, from the repository's save castle-gate (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); performance: 3 game starts a side, market 30 s after 10 s warm-up, deku 30 s after 10 s warm-up; verification: 1 game start a side, field-check 20 s after 10 s warm-up, deku-check 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 56823e2 | After: this PR @ 08bdce5 | |---|---|---| | performance · deku · median frame time (ms) | 12.2 | 12.2 (−0%) | | performance · market · median frame time (ms) | 14.6 | 14.5 (−1%) | | performance · deku · frame time (p99) (ms) | 16.7 | 16.2 (−3%) | | performance · market · frame time (p99) (ms) | 19.1 | 18.8 (−1%) | | performance · forbidden log lines | 0.0 | 0.0 | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · median frame time (ms) | 12.1 | 12.0 (−1%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · median frame time (ms) | 11.5 | 11.7 (+1%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · deku-check · frame time (p99) (ms) | 16.0 | 17.9 (+12%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · field-check · frame time (p99) (ms) | 15.7 | 14.7 (−6%) | | verification · `RX_VK_PIPE_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_PIPE_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | verification, main without it → the PR with check: 12.1 → 12.0 (−1%) | no clear effect | ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `windows+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_699f06ebe6bff1d2) | windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM` | | `windows+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_cbce4311a10f63d6) | windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_e0cd39bde2c873af) | linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 5 9600X 6-Core Processor, 32 GB RAM` | | `linux+radv` | [2](https://beanstalk.magicbean.dev/reports/rp_26356ea322adeb4c) | linux+amd+radv+igpu `AMD Radeon 890M Graphics (RADV STRIX1), 26.1.99` `AMD Ryzen Z2 Extreme, 32 GB RAM` | </details> </details>
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The GCC warning is fixed, but the net gain against the actual base and coverage on other affected Tier 1 systems remain unmeasured. The reported same-build switch comparison shows a small gain, but it does not settle the base-versus-head result. Recommend approval; not approved on the forge.

The change caches graphics pipeline lookups to reduce per-draw CPU work. It adds a substantial cache and verification path in exchange for a reported small frame-time improvement.

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

  • L2 gpu/vk/vk_draw.cpp:3512: Measure the overall gain against the actual base at player settings. When: The reported 0.99% comparison uses this branch for both sides; its off path also has the new mode selection and TLS state, so it does not establish the effect of the complete change against main. Do: Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time.
  • L3 gpu/vk/pipe_fast.h:197: Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging. When: Every graphics draw can use this cache, including on Linux, AMD and Steam Deck, while the only reported game run is one Windows Market run and does not identify its GPU or driver. Do: Run the check mode through representative open and dungeon scenes on the affected Tier 1 Windows and Linux hardware, including Steam Deck and a non-EDS3 device; report rendering and mismatch results.

Since the last review (on 30189bffc2)
Resolved: L1 (The conditional expressions mix enumerators with unsigned integers, which GCC diagnoses un…)
Still open: L2 (Measure the overall gain against the actual base at player settings.); L3 (Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging.)

Checks: Still running: 10 checks.

Also noticed (1; not asked for, not blocking)
  • The maintainer requested a Test Farm run; no farm request was submitted because this review is read-only and the network is closed.
More: does it help, other systems, switches, what was read

Does it help: Unproven against the actual base. The author reports 79.87 versus 79.08 fps and a 0.125 ms pooled mean frame-time reduction over 147 paired periods on Windows, but both sides used the PR build with the switch toggled; p99 frame time increased from 15.84 to 15.88 ms.

Other systems: The renderer change can affect Vulkan devices with and without EDS3, including Windows, Linux, Steam Deck, AMD and Intel systems. The reported live check covers Windows; the other Tier 1 and non-EDS3 runs remain pending.

Switches: RX_VK_PIPE_FAST is added, default 1; 0 selects the baseline path and check enables verification. Its default is supported by the same-build comparison, but the net gain against the base remains unproven.

Reviewed: 08bdce51e4 against 56823e27a1: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the reported ledger and runs, the fix diff, and portions of the changed cache, renderer and test code. The combined output for the full changed files was truncated; the remaining changed code and its dependencies were not fully reviewed. docs/review-checklist.md is absent.; nothing run (a code review).

Checked and fine:

  • The fix preserves the unsigned mask values while removing the mixed enum and integer conditional operands.
  • The author reports zero key and entry mismatches across 23.66 million live checks.

Testing: No commands from the project were run. The author reports compiler and game-free checks passing; CI is still running.

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


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

**Recommendation: Approve.** The code is ready: only testing is left. The GCC warning is fixed, but the net gain against the actual base and coverage on other affected Tier 1 systems remain unmeasured. The reported same-build switch comparison shows a small gain, but it does not settle the base-versus-head result. Recommend approval; not approved on the forge. The change caches graphics pipeline lookups to reduce per-draw CPU work. It adds a substantial cache and verification path in exchange for a reported small frame-time improvement. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_draw.cpp:3512`: Measure the overall gain against the actual base at player settings. *When:* The reported 0.99% comparison uses this branch for both sides; its off path also has the new mode selection and TLS state, so it does not establish the effect of the complete change against main. **Do:** Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time. - **L3** `gpu/vk/pipe_fast.h:197`: Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging. *When:* Every graphics draw can use this cache, including on Linux, AMD and Steam Deck, while the only reported game run is one Windows Market run and does not identify its GPU or driver. **Do:** Run the check mode through representative open and dungeon scenes on the affected Tier 1 Windows and Linux hardware, including Steam Deck and a non-EDS3 device; report rendering and mismatch results. **Since the last review** (on 30189bffc20c) Resolved: L1 (The conditional expressions mix enumerators with unsigned integers, which GCC diagnoses un…) Still open: L2 (Measure the overall gain against the actual base at player settings.); L3 (Exercise the new lookup on the other Tier 1 systems and the non-EDS3 path before merging.) **Checks:** Still running: 10 checks. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The maintainer requested a Test Farm run; no farm request was submitted because this review is read-only and the network is closed. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against the actual base. The author reports 79.87 versus 79.08 fps and a 0.125 ms pooled mean frame-time reduction over 147 paired periods on Windows, but both sides used the PR build with the switch toggled; p99 frame time increased from 15.84 to 15.88 ms. **Other systems:** The renderer change can affect Vulkan devices with and without EDS3, including Windows, Linux, Steam Deck, AMD and Intel systems. The reported live check covers Windows; the other Tier 1 and non-EDS3 runs remain pending. **Switches:** RX_VK_PIPE_FAST is added, default 1; 0 selects the baseline path and check enables verification. Its default is supported by the same-build comparison, but the net gain against the base remains unproven. **Reviewed:** 08bdce51e4df against 56823e27a13a: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the reported ledger and runs, the fix diff, and portions of the changed cache, renderer and test code. The combined output for the full changed files was truncated; the remaining changed code and its dependencies were not fully reviewed. docs/review-checklist.md is absent.; nothing run (a code review). **Checked and fine:** - The fix preserves the unsigned mask values while removing the mixed enum and integer conditional operands. - The author reports zero key and entry mismatches across 23.66 million live checks. **Testing:** No commands from the project were run. The author reports compiler and game-free checks passing; CI is still running. **Overlaps and merge order:** Not checked; the network is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner

Independent Linux Market A/B on PR head 08bdce51e4df. RX_VK_PIPE_FAST defaults to on in this revision.

Within the run-to-run spread. Median average FPS changed by +2.13%.

Metric Off (0) On (1)
Average FPS, each run 119.55 / 112.74 117.63 / 119.61
Average FPS, median 116.15 118.62
1% low FPS (1000 ÷ p99) 77.81 82.89
Median frame time 8.18 ms 8.22 ms
p99 frame time 12.86 ms 12.07 ms
Frames of 50 ms or more, each run 2 / 3 0 / 1

Market (child), Linux 7.3.3-1-cachyos, RTX 3090, NVIDIA 620.70.06, 1280x720, 50% (640x360), uncapped with V-Sync and frame generation off. Two interleaved 30-second captures per side on the same PR binary, each after pipeline warm-up. Frame-time and 1% low rows report the median across the two captures.

Independent Linux Market A/B on PR head `08bdce51e4df`. `RX_VK_PIPE_FAST` defaults to on in this revision. **Within the run-to-run spread.** Median average FPS changed by **+2.13%**. | Metric | Off (`0`) | On (`1`) | |---|---:|---:| | Average FPS, each run | 119.55 / 112.74 | 117.63 / 119.61 | | Average FPS, median | 116.15 | 118.62 | | 1% low FPS (1000 ÷ p99) | 77.81 | 82.89 | | Median frame time | 8.18 ms | 8.22 ms | | p99 frame time | 12.86 ms | 12.07 ms | | Frames of 50 ms or more, each run | 2 / 3 | 0 / 1 | Market (child), Linux 7.3.3-1-cachyos, RTX 3090, NVIDIA 620.70.06, 1280x720, 50% (640x360), uncapped with V-Sync and frame generation off. Two interleaved 30-second captures per side on the same PR binary, each after pipeline warm-up. Frame-time and 1% low rows report the median across the two captures.
Owner
@rebase
Member

I rebased this pull request onto main (54877b1a4d): the new head is 2a27568797.

Conflicts resolved

  • gpu/vk/vk_main.cpp: Kept the base branch’s shutdown calls and the pipeline cache shutdown call.
  • tests/test_hos_ab.py: Kept the base branch’s switch entries and the pipeline cache switch entry.

Nothing was built or run: read the resolution before merging.


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

I rebased this pull request onto `main` (54877b1a4d01): the new head is 2a2756879764. **Conflicts resolved** - gpu/vk/vk_main.cpp: Kept the base branch’s shutdown calls and the pipeline cache shutdown call. - tests/test_hos_ab.py: Kept the base branch’s switch entries and the pipeline cache switch entry. Nothing was built or run: read the resolution before merging. --- <sub>Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed perf/vk-pipe-fast from 08bdce51e4
Some checks failed
PR description / Title and description (pull_request_target) Successful in 5s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/nvidia 0/1 pass, 2 running, 0 queued
beanstalk/windows+amd 2/1 pass
beanstalk/linux+radv 2/1 pass
beanstalk/intel 0/1 pass, 0 running, 2 queued
beanstalk/steamdeck 0/1 pass, 0 running, 2 queued
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 2a27568797
Some checks failed
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Failing after 10s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 16s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m37s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 4m52s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m21s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m26s
CI / Website build and checks (pull_request) Failing after 34s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 21m56s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 40m17s
2026-12-02 16:50:37 +00:00
Compare
Member

Beanstalk test farm

Commit 2a27568 · 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 `2a27568` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/2991) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
HumanBean deleted branch perf/vk-pipe-fast 2026-12-02 16:51:05 +00:00
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The reported speedup compares two modes of the PR build, so the net gain against the actual base remains unproven. Other affected Tier 1 systems and the non-EDS3 path still need live coverage. Recommend approval; not approved on the forge.

The change caches graphics pipeline lookups and shader masks to reduce per-draw CPU work, at the cost of a larger per-thread cache and more lookup logic.

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

  • L2 gpu/vk/vk_draw.cpp:3512: Measure the overall gain against the actual base at player settings. When: The reported 0.99% comparison uses this branch for both sides; its off path also has the new mode selection and TLS state, so it does not establish the effect of the complete change against main. Do: Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time.
  • L3 gpu/vk/pipe_fast.h:197: Exercise the new lookup on the remaining affected Tier 1 systems and the non-EDS3 path. When: The cache selects and compares pipeline state differently when EDS3 features are unavailable; those live renderer paths remain untested. Do: Run the lookup in game on the remaining affected Tier 1 systems and a non-EDS3 device, including check mode.

Since the last review (on 08bdce51e4)
Still open: L2 (Measure the overall gain against the actual base at player settings.); L3 (Exercise the new lookup on the remaining affected Tier 1 systems and the non-EDS3 path.)

Checks: Still running: 11 checks.

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

Does it help: Unproven against the base. The PR reports a 0.99% FPS gain and 0.125 ms lower mean frame time over 147 paired Windows periods, but both sides use the PR build. An independent Linux PR-build comparison reported a 2.13% median FPS gain within run-to-run spread.

Other systems: The lookup affects Vulkan rendering across GPU vendors and operating systems, including non-EDS3 devices. Windows live check mode reported no mismatches, and Linux NVIDIA received an independent run; other Tier 1 systems and non-EDS3 live coverage remain pending.

Switches: RX_VK_PIPE_FAST is added, default on; 0 selects the baseline lookup and check validates both paths. The default's net benefit against the base remains unproven.

Reviewed: 2a27568797 against 54877b1a4d: Read AGENTS.md, CONTRIBUTING.md, the PR template, the pipeline cache implementation and relevant graphics_pipeline code; inspected the switch and shutdown integration. The full renderer files, tests, and recorded runs were not read in full. docs/review-checklist.md is absent.; nothing run (a code review).

Checked and fine:

  • The Linux NVIDIA report provides additional live coverage.
  • The switch is documented in gpu/vk/switches.def.

Testing: No commands that build or run the project were executed. CI is still running; the author reports Windows check-mode and game-free test passes.

Overlaps and merge order: Not checked.


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

**Recommendation: Approve.** The code is ready: only testing is left. The reported speedup compares two modes of the PR build, so the net gain against the actual base remains unproven. Other affected Tier 1 systems and the non-EDS3 path still need live coverage. Recommend approval; not approved on the forge. The change caches graphics pipeline lookups and shader masks to reduce per-draw CPU work, at the cost of a larger per-thread cache and more lookup logic. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_draw.cpp:3512`: Measure the overall gain against the actual base at player settings. *When:* The reported 0.99% comparison uses this branch for both sides; its off path also has the new mode selection and TLS state, so it does not establish the effect of the complete change against main. **Do:** Run interleaved base and head builds in the target and heavy scenes at the device's normal resolution and Auto-selected quality, reporting average and 1% low fps, frame times and pipeline time. - **L3** `gpu/vk/pipe_fast.h:197`: Exercise the new lookup on the remaining affected Tier 1 systems and the non-EDS3 path. *When:* The cache selects and compares pipeline state differently when EDS3 features are unavailable; those live renderer paths remain untested. **Do:** Run the lookup in game on the remaining affected Tier 1 systems and a non-EDS3 device, including check mode. **Since the last review** (on 08bdce51e4df) Still open: L2 (Measure the overall gain against the actual base at player settings.); L3 (Exercise the new lookup on the remaining affected Tier 1 systems and the non-EDS3 path.) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against the base. The PR reports a 0.99% FPS gain and 0.125 ms lower mean frame time over 147 paired Windows periods, but both sides use the PR build. An independent Linux PR-build comparison reported a 2.13% median FPS gain within run-to-run spread. **Other systems:** The lookup affects Vulkan rendering across GPU vendors and operating systems, including non-EDS3 devices. Windows live check mode reported no mismatches, and Linux NVIDIA received an independent run; other Tier 1 systems and non-EDS3 live coverage remain pending. **Switches:** RX_VK_PIPE_FAST is added, default on; 0 selects the baseline lookup and check validates both paths. The default's net benefit against the base remains unproven. **Reviewed:** 2a2756879764 against 54877b1a4d01: Read AGENTS.md, CONTRIBUTING.md, the PR template, the pipeline cache implementation and relevant graphics_pipeline code; inspected the switch and shutdown integration. The full renderer files, tests, and recorded runs were not read in full. docs/review-checklist.md is absent.; nothing run (a code review). **Checked and fine:** - The Linux NVIDIA report provides additional live coverage. - The switch is documented in gpu/vk/switches.def. **Testing:** No commands that build or run the project were executed. CI is still running; the author reports Windows check-mode and game-free test passes. **Overlaps and merge order:** Not checked. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.</sub>
Owner

AMD Lab Market A/B on PR head 2a2756879764, using RX_VK_PIPE_FAST=0 and RX_VK_PIPE_FAST=1 on the same build.

Inconclusive with this run-to-run variation. Median average FPS changed by -0.99%.

Metric A (0) B (1)
Average FPS, each capture 57.47 / 52.24 / 55.30 52.56 / 54.75 / 54.99
Average FPS, median 55.30 54.75
1% low FPS (1000 ÷ p99), median 45.61 24.52
Median frame time 17.95 ms 17.88 ms
p99 frame time, median 21.93 ms 40.79 ms
Frames of 50 ms or more, each capture 3 / 13 / 4 10 / 11 / 3

Market (child), headless Linux 7.3.3-1-cachyos, Core i7-9700K, Radeon RX 580 with Mesa RADV 3:26.2.6-1, 1280x720 output and 50% (640x360) render scale, uncapped with V-Sync and frame generation off. Three alternating pairs, 40 seconds per capture after warm-up.

After warm-up, the harness still flagged pipeline or shader activity in 12 / 72 / 14 frames on side A and 40 / 26 / 24 on side B across the three captures. The FPS and tail numbers include those frames.

AMD Lab Market A/B on PR head `2a2756879764`, using `RX_VK_PIPE_FAST=0` and `RX_VK_PIPE_FAST=1` on the same build. **Inconclusive with this run-to-run variation.** Median average FPS changed by **-0.99%**. | Metric | A (`0`) | B (`1`) | |---|---:|---:| | Average FPS, each capture | 57.47 / 52.24 / 55.30 | 52.56 / 54.75 / 54.99 | | Average FPS, median | 55.30 | 54.75 | | 1% low FPS (1000 ÷ p99), median | 45.61 | 24.52 | | Median frame time | 17.95 ms | 17.88 ms | | p99 frame time, median | 21.93 ms | 40.79 ms | | Frames of 50 ms or more, each capture | 3 / 13 / 4 | 10 / 11 / 3 | Market (child), headless Linux 7.3.3-1-cachyos, Core i7-9700K, Radeon RX 580 with Mesa RADV 3:26.2.6-1, 1280x720 output and 50% (640x360) render scale, uncapped with V-Sync and frame generation off. Three alternating pairs, 40 seconds per capture after warm-up. After warm-up, the harness still flagged pipeline or shader activity in 12 / 72 / 14 frames on side A and 40 / 26 / 24 on side B across the three captures. The FPS and tail numbers include those frames.
Author
Contributor

This was merged (head 2a27568, after BeanBot's rebase) before I answered. Here is a summary of the results posted since. The description can't be edited after the merge (our forge tooling refuses merged PRs), so they are recorded here.

Test farm (Beanstalk, run on 08bdce5, main against the PR): passed on all 4 reports, with no crashes and no check-mode mismatch. Frame time p99 (ms), main → PR:

Tester Market Inside the Deku Tree RX_VK_PIPE_FAST=check
RX 9070 XT, Windows 12.91 → 12.38 (−4.1%) 8.20 → 7.95 (−3.1%) 12,969,114 checks, 0 key mismatches, 0 mismatches
RX 9070 XT, RADV, Linux 16.14 → 15.69 (−2.8%) 13.03 → 12.12 (−7.0%) 9,323,635 checks, 0 / 0
Radeon 890M, RADV, Linux 22.06 → 22.00 (−0.2%) 20.36 → 20.37 (±0%) 4,618,581 checks, 0 / 0
Radeon (Windows, 2.0.279) 75.73 → 75.95 (+0.3%) 71.56 → 71.25 (−0.4%) 1,257,202 checks, 0 / 0

The NVIDIA, Intel and Steam Deck jobs had not reported when it merged.

@HumanBean's A/Bs, RX_VK_PIPE_FAST=0 against =1 on the same build: thanks.

  • Linux Market, RTX 3090: +2.13% median FPS (116.15 → 118.62), within the spread. p99 went from 12.86 to 12.07 ms, and frames of 50 ms or more from 2/3 to 0/1.
  • AMD Lab Market, RX 580 / RADV: −0.99% median FPS (55.30 → 54.75), inconclusive. The tail went the other way: p99 21.93 → 40.79 ms and the 1% low 45.61 → 24.52 FPS. Frames of 50 ms or more were 3/13/4 off and 10/11/3 on.

On the RX 580 tail: that is one system, and the farm's two RADV PCs and the RTX 3090 show equal or better tails. So I'm not changing the shipped default on this data. One finding argues against the cache causing the tail: on every farm PC, check mode found the L1 cache's key equal to the baseline pipeline_key for every draw (0 key mismatches in 1.3M–13M checks), so the cache doesn't ask for pipelines the baseline wouldn't. The RX 580 captures also still had pipeline or shader activity after warm-up on both sides (12/72/14 off, 40/26/24 on). Next to check: an RX 580 run with RX_VK_PIPE_FAST=check and a longer warm-up, to see whether the slow frames are compiles (the same on both sides) or lookups.

BeanBot's testing items:

  • L2 (base against head at player settings): the farm's main-against-PR run passes on 4 PCs, but at fixed 720p custom settings, so the player-settings part is still open.
  • L3 (other Tier 1 systems, non-EDS3 path, check mode): AMD on Windows and RADV are covered, with check mode clean. NVIDIA on Windows, the Steam Deck and a non-EDS3 device have not been run.

No code change and nothing run from my side for this reply.

This was merged (head 2a27568, after BeanBot's rebase) before I answered. Here is a summary of the results posted since. The description can't be edited after the merge (our forge tooling refuses merged PRs), so they are recorded here. **Test farm (Beanstalk, run on 08bdce5, main against the PR): passed on all 4 reports, with no crashes and no check-mode mismatch.** Frame time p99 (ms), main → PR: | Tester | Market | Inside the Deku Tree | `RX_VK_PIPE_FAST=check` | |---|---:|---:|---| | RX 9070 XT, Windows | 12.91 → 12.38 (−4.1%) | 8.20 → 7.95 (−3.1%) | 12,969,114 checks, 0 key mismatches, 0 mismatches | | RX 9070 XT, RADV, Linux | 16.14 → 15.69 (−2.8%) | 13.03 → 12.12 (−7.0%) | 9,323,635 checks, 0 / 0 | | Radeon 890M, RADV, Linux | 22.06 → 22.00 (−0.2%) | 20.36 → 20.37 (±0%) | 4,618,581 checks, 0 / 0 | | Radeon (Windows, 2.0.279) | 75.73 → 75.95 (+0.3%) | 71.56 → 71.25 (−0.4%) | 1,257,202 checks, 0 / 0 | The NVIDIA, Intel and Steam Deck jobs had not reported when it merged. **@HumanBean's A/Bs, `RX_VK_PIPE_FAST=0` against `=1` on the same build:** thanks. - Linux Market, RTX 3090: +2.13% median FPS (116.15 → 118.62), within the spread. p99 went from 12.86 to 12.07 ms, and frames of 50 ms or more from 2/3 to 0/1. - AMD Lab Market, RX 580 / RADV: −0.99% median FPS (55.30 → 54.75), inconclusive. The tail went the other way: p99 21.93 → 40.79 ms and the 1% low 45.61 → 24.52 FPS. Frames of 50 ms or more were 3/13/4 off and 10/11/3 on. On the RX 580 tail: that is one system, and the farm's two RADV PCs and the RTX 3090 show equal or better tails. So I'm not changing the shipped default on this data. One finding argues against the cache causing the tail: on every farm PC, check mode found the L1 cache's key equal to the baseline `pipeline_key` for every draw (0 key mismatches in 1.3M–13M checks), so the cache doesn't ask for pipelines the baseline wouldn't. The RX 580 captures also still had pipeline or shader activity after warm-up on both sides (12/72/14 off, 40/26/24 on). Next to check: an RX 580 run with `RX_VK_PIPE_FAST=check` and a longer warm-up, to see whether the slow frames are compiles (the same on both sides) or lookups. **BeanBot's testing items:** - **L2 (base against head at player settings):** the farm's main-against-PR run passes on 4 PCs, but at fixed 720p custom settings, so the player-settings part is still open. - **L3 (other Tier 1 systems, non-EDS3 path, check mode):** AMD on Windows and RADV are covered, with check mode clean. NVIDIA on Windows, the Steam Deck and a non-EDS3 device have not been run. No code change and nothing run from my side for this reply.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 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!2991
No description provided.