fix(vk): map local and shared loads across the reserved register boundary #3039

Merged
HumanBean merged 2 commits from cuecuemoar/Longshot:fix/ldl-reserved-regs into main 2026-12-05 19:21:26 +00:00
Contributor

Summary

Four of the game's mesh shaders for the depth-only and shadow-depth passes load 128 bits from local memory (LDL) into R184-R187, while their reserved registers start at R186. The Ampere-to-Maxwell lowering decides whether an instruction reaches the reserved registers from its destination's width, and it counted that width only for the global loads (#2179). It took the local load for one register, so its four 32-bit loads wrote plain R186 and R187 instead of the extended registers 442 and 443. What this did on screen is not known: the issue's author did not see it, and I did not find a scene that draws these four shaders.

What this changes: the local and shared loads (LDL 0x983, LDS 0x984) count their full width as the global loads do. They keep their size at the same bits (73-75), as the call-link code (writes_link) already reads it. No shader in the game has a shared load that crosses the boundary (the issue counted 38 with 64- or 128-bit shared loads, none crossing). The shared load is included because a synthetic one had the same fault.

Read first: the load_dest line in gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h, then check_scalar_load_width in gpu/vk/tests/regmap_marker_test.cpp.

Fixes #2243

Testing

Tested: Windows 10, RTX 4090, NVIDIA 617.42, native mesh shaders. Builds of main @ b40214d2b and of this fix @ 99210a71e. The head, adb7b13d4, has the same fix on d0164fae4: main changed nothing in the lowering between the two, and the head's only other change is to the test.

  • Every shader the game has, lowered on both: I lowered all 42,856 shader stages of the game's shader file with main's lowering and with this PR's, and compared the output. Exactly four stages change, and they are the four the issue names (stage keys 3af1ac7c868ebee8, 18341da39b21edb5, 11a1afbd0c6737e0, 4170159071412496). Each gains one register-map run: in 3af1ac7c868ebee8, for example, the 128-bit LDL R184 writes 184 185 186 187 on main and 184 185 [R186-R187 mapped to 442-443] here. Each of the four grows by four words. Every other stage lowers to the same words; 42,785 of 42,856 lower on both.
  • In the game: headless runs of both builds from the repository's kokiri-start save: the Kokiri Forest entrance, then into Hyrule Field past its event. The draw statistics (RX_VK_DRAW_STATS, three frames a side) list 36 to 41 mesh stages a frame, but none of the four, so these runs show that nothing else broke, not the fix. Both logs report no lowering failure and no refused program. Screenshots of the same spots differ only in moving things (fireflies, Navi, fog).

The checks:

  • The new test in gpu/vk/tests/regmap_marker_test.cpp lowers a 32-, 64- and 128-bit LDL and LDS into R204 with the reserved registers from R206 (the UR36 setup from #2179), reads every lowered load's destinations through the prefixes before it, and asserts that the 32- and 64-bit loads get no prefix. On the test commit it fails for the bug's reason: LDL R204 (128-bit) wrote: 204 205 206 207 and LDS R204 (128-bit) wrote: 204 205 206 207. It passes on the fix. Taking out 0x983 alone fails only the LDL case, and 0x984 alone only the LDS case; counting every local and shared load as four registers fails the 32- and 64-bit LDS cases. The 32- and 64-bit cases and the existing global-load cases pass on both.
  • The checks that read the lowering, on main, on the test commit and on the head (clang 23 on Linux): lower_test.cpp, ldsm_address_test.cpp and the twelve Python tests that read lower_to_maxwell.h pass on all three; regmap_marker_test.cpp fails only on the test commit.
  • Linux, WSL (Ubuntu 22.04), tests/run_all.py --strict: on the head adb7b13d4, 836 passed, 95 failed and 10 skipped, and the same on main d0164fae4. The failing files are the same 95 on both, named in a comment below; no check was skipped for a missing tool. The renderer builds on both, and host/nn_hid.c compiles, with the same 65 warnings (checked on 69b6983a6, whose code is the head's; only the test differs). The game was not run on Linux.

Still to test:

  • Any PC with native mesh shaders: a scene that draws one of the four stages above (its depth-only or shadow pass), main against this PR, expecting no difference or a correct shadow/depth where main had a wrong one (by hand; which scene is not known).

Measurements

Nothing to measure: four words more in four shaders that the measured scenes did not draw; every other shader lowers to the same words.

Risks

Only the four stages above change, each by one register-map prefix before two of its loads, so they write the extended registers 442-443 for R186-R187, as the global loads have done since #2179. If it went wrong, those four shaders' depth or shadow output would be wrong; a revert is enough.

One case is now refused instead of lowered: without a uniform register bank the reserved registers start at R246, so a 128-bit LDL R244 reaches the lowering's own scratch registers and the program is refused ("native program uses lowering scratch registers"), where main lowered it and silently wrote R246-R247. No shader in the game is affected: 42,785 of the 42,856 stages lower on main and here alike. The shader translator's stamp covers eden/, so the program caches are prepared again after updating, as for any translator change.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • 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 fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01VxeaZk9YYKvW5r88gQGguW

## Summary Four of the game's mesh shaders for the depth-only and shadow-depth passes load 128 bits from local memory (`LDL`) into R184-R187, while their reserved registers start at R186. The Ampere-to-Maxwell lowering decides whether an instruction reaches the reserved registers from its destination's width, and it counted that width only for the global loads (#2179). It took the local load for one register, so its four 32-bit loads wrote plain R186 and R187 instead of the extended registers 442 and 443. What this did on screen is not known: the issue's author did not see it, and I did not find a scene that draws these four shaders. **What this changes:** the local and shared loads (`LDL` 0x983, `LDS` 0x984) count their full width as the global loads do. They keep their size at the same bits (73-75), as the call-link code (`writes_link`) already reads it. No shader in the game has a shared load that crosses the boundary (the issue counted 38 with 64- or 128-bit shared loads, none crossing). The shared load is included because a synthetic one had the same fault. **Read first:** the `load_dest` line in `gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h`, then `check_scalar_load_width` in `gpu/vk/tests/regmap_marker_test.cpp`. Fixes #2243 ## Testing **Tested:** Windows 10, RTX 4090, NVIDIA 617.42, native mesh shaders. Builds of main @ `b40214d2b` and of this fix @ `99210a71e`. The head, `adb7b13d4`, has the same fix on `d0164fae4`: main changed nothing in the lowering between the two, and the head's only other change is to the test. - **Every shader the game has, lowered on both:** I lowered all 42,856 shader stages of the game's shader file with main's lowering and with this PR's, and compared the output. Exactly four stages change, and they are the four the issue names (stage keys `3af1ac7c868ebee8`, `18341da39b21edb5`, `11a1afbd0c6737e0`, `4170159071412496`). Each gains one register-map run: in `3af1ac7c868ebee8`, for example, the 128-bit `LDL R184` writes `184 185 186 187` on main and `184 185 [R186-R187 mapped to 442-443]` here. Each of the four grows by four words. Every other stage lowers to the same words; 42,785 of 42,856 lower on both. - **In the game:** headless runs of both builds from the repository's `kokiri-start` save: the Kokiri Forest entrance, then into Hyrule Field past its event. The draw statistics (`RX_VK_DRAW_STATS`, three frames a side) list 36 to 41 mesh stages a frame, but none of the four, so these runs show that nothing else broke, not the fix. Both logs report no lowering failure and no refused program. Screenshots of the same spots differ only in moving things (fireflies, Navi, fog). The checks: - **The new test** in `gpu/vk/tests/regmap_marker_test.cpp` lowers a 32-, 64- and 128-bit `LDL` and `LDS` into R204 with the reserved registers from R206 (the UR36 setup from #2179), reads every lowered load's destinations through the prefixes before it, and asserts that the 32- and 64-bit loads get no prefix. On the test commit it fails for the bug's reason: `LDL R204 (128-bit) wrote: 204 205 206 207` and `LDS R204 (128-bit) wrote: 204 205 206 207`. It passes on the fix. Taking out `0x983` alone fails only the `LDL` case, and `0x984` alone only the `LDS` case; counting every local and shared load as four registers fails the 32- and 64-bit `LDS` cases. The 32- and 64-bit cases and the existing global-load cases pass on both. - **The checks that read the lowering**, on main, on the test commit and on the head (clang 23 on Linux): `lower_test.cpp`, `ldsm_address_test.cpp` and the twelve Python tests that read `lower_to_maxwell.h` pass on all three; `regmap_marker_test.cpp` fails only on the test commit. - **Linux, WSL (Ubuntu 22.04), `tests/run_all.py --strict`:** on the head `adb7b13d4`, 836 passed, 95 failed and 10 skipped, and the same on main `d0164fae4`. The failing files are the same 95 on both, named in a comment below; no check was skipped for a missing tool. The renderer builds on both, and `host/nn_hid.c` compiles, with the same 65 warnings (checked on `69b6983a6`, whose code is the head's; only the test differs). The game was not run on Linux. **Still to test:** - Any PC with native mesh shaders: a scene that draws one of the four stages above (its depth-only or shadow pass), main against this PR, expecting no difference or a correct shadow/depth where main had a wrong one (by hand; which scene is not known). ## Measurements Nothing to measure: four words more in four shaders that the measured scenes did not draw; every other shader lowers to the same words. ## Risks Only the four stages above change, each by one register-map prefix before two of its loads, so they write the extended registers 442-443 for R186-R187, as the global loads have done since #2179. If it went wrong, those four shaders' depth or shadow output would be wrong; a revert is enough. One case is now refused instead of lowered: without a uniform register bank the reserved registers start at R246, so a 128-bit `LDL R244` reaches the lowering's own scratch registers and the program is refused ("native program uses lowering scratch registers"), where main lowered it and silently wrote R246-R247. No shader in the game is affected: 42,785 of the 42,856 stages lower on main and here alike. The shader translator's stamp covers `eden/`, so the program caches are prepared again after updating, as for any translator change. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [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 fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxeaZk9YYKvW5r88gQGguW
With UR36 the reserved registers start at R206. A 128-bit LDL or LDS into R204 writes R204-R207, so the lowering must
map R206 and R207 to extended registers 462 and 463. The check reads every lowered load's destinations through the
prefixes just before it (LDL becomes four 32-bit loads, and a prefix covers the next word only). The 32- and 64-bit
loads into R204 stay below the reserved registers and get no prefix.

On main the 128-bit LDL writes plain R204-R207 and the 128-bit LDS does the same, so both cases fail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZk9YYKvW5r88gQGguW
fix(vk): map local and shared loads across the reserved register boundary (#2243)
Some checks reported errors
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 7s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows+nvidia 2/1 fail
beanstalk/linux+radv 0/1 pass, 2 error
beanstalk/steamdeck 0/1 pass, 2 error
adb7b13d4c
The lowering decided whether an instruction writes a reserved register from its destination's width, and counted
that width for the global loads only. Four of the game's depth and shadow mesh shaders load 128 bits from local memory
(LDL) into R184, with the reserved registers starting at R186: the load was taken for one register, and its four
32-bit loads wrote plain R184-R187 where R186 and R187 should be the extended registers 442 and 443.

The local and shared loads (LDL and LDS) keep their size at the same bits as the global ones, so they now count their
full width as well. The test's synthetic 128-bit LDL and LDS into R204, with the reserved registers from R206, had the
same fault and now map R206-R207 to 462-463.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZk9YYKvW5r88gQGguW
Author
Contributor

Tested in game: Windows 10, RTX 4090, NVIDIA 617.42, native mesh shaders: main b40214d2b and this fix (99210a71e, same code as the head adb7b13d4). All 42,856 of the game's shader stages lowered with both: only the four stages the issue names change, each gaining the R186-R187 -> 442-443 map before its 128-bit LDL. Headless runs from kokiri-start (Kokiri Forest entrance, Hyrule Field) on both builds: no lowering failures or refused programs; the draw statistics list none of the four stages there, so these runs show no regression, not the fix itself.

Tested in game: Windows 10, RTX 4090, NVIDIA 617.42, native mesh shaders: main b40214d2b and this fix (99210a71e, same code as the head adb7b13d4). All 42,856 of the game's shader stages lowered with both: only the four stages the issue names change, each gaining the R186-R187 -> 442-443 map before its 128-bit LDL. Headless runs from kokiri-start (Kokiri Forest entrance, Hyrule Field) on both builds: no lowering failures or refused programs; the draw statistics list none of the four stages there, so these runs show no regression, not the fix itself.
Author
Contributor

Linux (WSL, Ubuntu 22.04), tests/run_all.py --strict on the head adb7b13d4 and on main d0164fae4: 836 passed, 95 failed, 10 skipped on both. The 95 failing files are the same on both:

The 95 files that fail on main too
  • tests/global_load_16
  • tests/test_astc_upload_chunking.py
  • tests/test_async_astc_upload_chunks.py
  • tests/test_bind_memo.py
  • tests/test_blocks_at_start.py
  • tests/test_bug_report.py
  • tests/test_check_cache.py
  • tests/test_cloth_loops.py
  • tests/test_cloth_sphere.py
  • tests/test_cloth_step12.py
  • tests/test_cloth_step8.py
  • tests/test_cloth_step9.py
  • tests/test_compute_warm_apart.py
  • tests/test_control_picture.py
  • tests/test_coop_spirv.py
  • tests/test_crash_record.py
  • tests/test_crt_options.py
  • tests/test_damage_debug_menu.py
  • tests/test_dav1d_av1.py
  • tests/test_dev_update.py
  • tests/test_dlss5_menu.py
  • tests/test_dlss_actor.py
  • tests/test_dlss_pre_bloom.py
  • tests/test_dlssg_hud_ui.py
  • tests/test_dlssg_hudless_pq.py
  • tests/test_draw_stream_visibility.py
  • tests/test_drawn_page_map.py
  • tests/test_early_split_before_draw.py
  • tests/test_fallback_pipeline_state.py
  • tests/test_flat_map.py
  • tests/test_framegen_hdr.py
  • tests/test_framegen_resources.py
  • tests/test_fsr3_math.py
  • tests/test_fsr3_shaders.py
  • tests/test_fsr3fi_hud_layer.py
  • tests/test_fsr3fi_hudless_colour.py
  • tests/test_fsr_image_retirement.py
  • tests/test_fsr_uniform_ownership.py
  • tests/test_game_boundary.py
  • tests/test_game_font.py
  • tests/test_guest_holes.py
  • tests/test_image_reaper_threads.py
  • tests/test_image_view_retry.py
  • tests/test_import_reach.py
  • tests/test_input_background.py
  • tests/test_keyboard_menu_option.py
  • tests/test_keyboard_option.py
  • tests/test_late_fix_build.py
  • tests/test_late_fix_shaders.py
  • tests/test_lifter.py
  • tests/test_linux_pressure.py
  • tests/test_loaded_modules_drop.py
  • tests/test_log_levels.py
  • tests/test_menu_keys.py
  • tests/test_menu_save_atomic.py
  • tests/test_mesh_unreachable_outputs.py
  • tests/test_mirror_bookkeeping.py
  • tests/test_native_zstd.py
  • tests/test_oot_cloth.py
  • tests/test_oot_occ_raster.py
  • tests/test_option_ids.py
  • tests/test_pass_barrier.py
  • tests/test_perf_send.py
  • tests/test_pipeline_tour.py
  • tests/test_prepare_stall.py
  • tests/test_present_acquire_ahead.py
  • tests/test_present_image_free.py
  • tests/test_present_source_crop.py
  • tests/test_prof_clock.py
  • tests/test_program_cache_cleanup.py
  • tests/test_program_cache_one_variant.py
  • tests/test_reactive_mask.py
  • tests/test_readback_timeout_reuse.py
  • tests/test_recorder_sync.py
  • tests/test_recording_admission.py
  • tests/test_report_words.py
  • tests/test_screensaver.py
  • tests/test_staging_burst.py
  • tests/test_switch_table.py
  • tests/test_target_retention.py
  • tests/test_temporal_present_bandwidth.py
  • tests/test_tex_desc_memo.py
  • tests/test_text_keyboard_policy.py
  • tests/test_ub_snapshot_default.py
  • tests/test_ub_snapshot_gpu_writes.py
  • tests/test_upscaler_round_trip.py
  • tests/test_upscaler_rows.py
  • tests/test_vk_wb_cpu_words_fast.py
  • tests/test_vram_compact.py
  • tests/test_wb_diff_stale_shadow.py
  • tests/test_wb_pending_capture.py
  • tests/test_windows_display_startup.py
  • tests/test_windows_on_linux.py
  • tests/test_wmma16_spirv_val.py
  • tests/test_wrote_regions.py
Linux (WSL, Ubuntu 22.04), `tests/run_all.py --strict` on the head `adb7b13d4` and on main `d0164fae4`: 836 passed, 95 failed, 10 skipped on both. The 95 failing files are the same on both: <details><summary>The 95 files that fail on main too</summary> - `tests/global_load_16` - `tests/test_astc_upload_chunking.py` - `tests/test_async_astc_upload_chunks.py` - `tests/test_bind_memo.py` - `tests/test_blocks_at_start.py` - `tests/test_bug_report.py` - `tests/test_check_cache.py` - `tests/test_cloth_loops.py` - `tests/test_cloth_sphere.py` - `tests/test_cloth_step12.py` - `tests/test_cloth_step8.py` - `tests/test_cloth_step9.py` - `tests/test_compute_warm_apart.py` - `tests/test_control_picture.py` - `tests/test_coop_spirv.py` - `tests/test_crash_record.py` - `tests/test_crt_options.py` - `tests/test_damage_debug_menu.py` - `tests/test_dav1d_av1.py` - `tests/test_dev_update.py` - `tests/test_dlss5_menu.py` - `tests/test_dlss_actor.py` - `tests/test_dlss_pre_bloom.py` - `tests/test_dlssg_hud_ui.py` - `tests/test_dlssg_hudless_pq.py` - `tests/test_draw_stream_visibility.py` - `tests/test_drawn_page_map.py` - `tests/test_early_split_before_draw.py` - `tests/test_fallback_pipeline_state.py` - `tests/test_flat_map.py` - `tests/test_framegen_hdr.py` - `tests/test_framegen_resources.py` - `tests/test_fsr3_math.py` - `tests/test_fsr3_shaders.py` - `tests/test_fsr3fi_hud_layer.py` - `tests/test_fsr3fi_hudless_colour.py` - `tests/test_fsr_image_retirement.py` - `tests/test_fsr_uniform_ownership.py` - `tests/test_game_boundary.py` - `tests/test_game_font.py` - `tests/test_guest_holes.py` - `tests/test_image_reaper_threads.py` - `tests/test_image_view_retry.py` - `tests/test_import_reach.py` - `tests/test_input_background.py` - `tests/test_keyboard_menu_option.py` - `tests/test_keyboard_option.py` - `tests/test_late_fix_build.py` - `tests/test_late_fix_shaders.py` - `tests/test_lifter.py` - `tests/test_linux_pressure.py` - `tests/test_loaded_modules_drop.py` - `tests/test_log_levels.py` - `tests/test_menu_keys.py` - `tests/test_menu_save_atomic.py` - `tests/test_mesh_unreachable_outputs.py` - `tests/test_mirror_bookkeeping.py` - `tests/test_native_zstd.py` - `tests/test_oot_cloth.py` - `tests/test_oot_occ_raster.py` - `tests/test_option_ids.py` - `tests/test_pass_barrier.py` - `tests/test_perf_send.py` - `tests/test_pipeline_tour.py` - `tests/test_prepare_stall.py` - `tests/test_present_acquire_ahead.py` - `tests/test_present_image_free.py` - `tests/test_present_source_crop.py` - `tests/test_prof_clock.py` - `tests/test_program_cache_cleanup.py` - `tests/test_program_cache_one_variant.py` - `tests/test_reactive_mask.py` - `tests/test_readback_timeout_reuse.py` - `tests/test_recorder_sync.py` - `tests/test_recording_admission.py` - `tests/test_report_words.py` - `tests/test_screensaver.py` - `tests/test_staging_burst.py` - `tests/test_switch_table.py` - `tests/test_target_retention.py` - `tests/test_temporal_present_bandwidth.py` - `tests/test_tex_desc_memo.py` - `tests/test_text_keyboard_policy.py` - `tests/test_ub_snapshot_default.py` - `tests/test_ub_snapshot_gpu_writes.py` - `tests/test_upscaler_round_trip.py` - `tests/test_upscaler_rows.py` - `tests/test_vk_wb_cpu_words_fast.py` - `tests/test_vram_compact.py` - `tests/test_wb_diff_stale_shadow.py` - `tests/test_wb_pending_capture.py` - `tests/test_windows_display_startup.py` - `tests/test_windows_on_linux.py` - `tests/test_wmma16_spirv_val.py` - `tests/test_wrote_regions.py` </details>
cuecuemoar changed title from WIP: fix(vk): map local and shared loads across the reserved register boundary to fix(vk): map local and shared loads across the reserved register boundary 2026-12-02 22:24:54 +00:00
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The synthetic regression test demonstrates the register-mapping fix, but none of the reported game runs drew an affected shader. The affected depth and shadow paths still need an in-game run, and CI is pending. Recommend approval; not approved on the forge.

The change maps local and shared load destinations that cross the reserved-register boundary to extended registers. It fixes the demonstrated lowering error with a small increase in generated code for affected shaders; its visible effect in the game remains unknown.

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

  • L1 gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:254: The affected shader stages have not been exercised in the game, so their resulting depth and shadow output is still unverified. (more on the line) Do: Find a scene that draws an affected stage and compare the base and this change on native mesh-shader hardware; cover the Tier 1 systems the path can affect.

Checks: Still running: 10 checks.

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

Does it help: Unproven in the game. The reported synthetic 128-bit LDL and LDS cases fail on the base and pass with the fix; four of 42,856 surveyed shader stages change, but none was drawn in the reported scenes.

Other systems: The lowering feeds the Maxwell translator on supported GPUs and operating systems. The author reports identical lowered words for the other surveyed stages and a Windows RTX 4090 run through unaffected stages; the affected stages and Linux, AMD and Steam Deck game runs are not demonstrated.

Switches: None added, changed or removed.

Reviewed: adb7b13d4c against d0164fae43: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, both diffs, the complete regression test, the register-map translator and local/shared-load translator. Read the changed header's register survey, load lowering, prefix emission and retry paths; skimmed the rest of the 3,638-line header. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No generated files or translations changed.; nothing run (a code review).

Checked and fine:

  • Both commits record AI assistance in trailers.
  • The added synthetic cases cover both opcodes and 32-, 64- and 128-bit loads, and the reported base comparison fails for the intended reason.
  • No game-derived output, generated file, API version or switch table is changed.

Testing: Read-only review; no code or tests were run. The supplied CI checks are still running.

Overlaps and merge order: Not checked; network access 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 synthetic regression test demonstrates the register-mapping fix, but none of the reported game runs drew an affected shader. The affected depth and shadow paths still need an in-game run, and CI is pending. Recommend approval; not approved on the forge. The change maps local and shared load destinations that cross the reserved-register boundary to extended registers. It fixes the demonstrated lowering error with a small increase in generated code for affected shaders; its visible effect in the game remains unknown. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:254`: The affected shader stages have not been exercised in the game, so their resulting depth and shadow output is still unverified. (more on the line) **Do:** Find a scene that draws an affected stage and compare the base and this change on native mesh-shader hardware; cover the Tier 1 systems the path can affect. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven in the game. The reported synthetic 128-bit LDL and LDS cases fail on the base and pass with the fix; four of 42,856 surveyed shader stages change, but none was drawn in the reported scenes. **Other systems:** The lowering feeds the Maxwell translator on supported GPUs and operating systems. The author reports identical lowered words for the other surveyed stages and a Windows RTX 4090 run through unaffected stages; the affected stages and Linux, AMD and Steam Deck game runs are not demonstrated. **Switches:** None added, changed or removed. **Reviewed:** adb7b13d4c5c against d0164fae4325: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, both diffs, the complete regression test, the register-map translator and local/shared-load translator. Read the changed header's register survey, load lowering, prefix emission and retry paths; skimmed the rest of the 3,638-line header. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No generated files or translations changed.; nothing run (a code review). **Checked and fine:** - Both commits record AI assistance in trailers. - The added synthetic cases cover both opcodes and 32-, 64- and 128-bit loads, and the reported base comparison fails for the intended reason. - No game-derived output, generated file, API version or switch table is changed. **Testing:** Read-only review; no code or tests were run. The supplied CI checks are still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -252,0 +251,4 @@
// (longshot) the local and shared loads too (LDL 0x983, LDS 0x984: their size at the same bits): a
// 128-bit LDL into R204 with the reserved registers from R206 wrote plain R206-R207 (issue 2243)
const bool load_dest =
f == 0 && (opcode == 0x381 || opcode == 0x981 || opcode == 0x983 || opcode == 0x984);
Member

L1 (should fix): The affected shader stages have not been exercised in the game, so their resulting depth and shadow output is still unverified.

When: A scene that draws one of the four changed mesh stages executes a newly mapped local load; the reported Kokiri Forest and Hyrule Field runs did not draw any of them.

Do: Find a scene that draws an affected stage and compare the base and this change on native mesh-shader hardware; cover the Tier 1 systems the path can affect.

**L1** (should fix): The affected shader stages have not been exercised in the game, so their resulting depth and shadow output is still unverified. *When:* A scene that draws one of the four changed mesh stages executes a newly mapped local load; the reported Kokiri Forest and Hyrule Field runs did not draw any of them. **Do:** Find a scene that draws an affected stage and compare the base and this change on native mesh-shader hardware; cover the Tier 1 systems the path can affect.
Owner

@beanstalk

@beanstalk
Member

Beanstalk test farm · ❌ failed on windows+nvidia

Commit adb7b13 · approved by HumanBean (reviewed) · dashboard

⚠️ Note: No known scene draws an affected stage; the tour is exploratory, and missing stage keys leave that coverage check unjudged. Draw statistics may not expose the keys on every renderer, and a matching run does not by itself prove which screenshot contains the affected draw.
⚠️ Note: The farm cannot run the synthetic register-mapping unit test through this plan, so it cannot directly verify the LDL and LDS destination mappings.

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

The change failed on Windows NVIDIA; Linux RADV and Steam Deck could not be judged. Windows screenshot differences were 0.27 on the RTX 4070 and 0.35 on the GTX 980, both above the 0.2 limit. The expected log line was missing on all completed runs, so the fix's coverage could not be established; Linux RADV and Steam Deck also lacked sufficient frame-time evidence. One Steam Deck run separately failed in the PR runtime with exit code 1.

Done (started 2026-12-04 00:17 UTC, last report 2026-12-04 10:05 UTC). Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows+nvidia ❌ fail 2 1 2 — — none
linux+radv ⚠️ couldn't be judged 2 1 2 — — none
steamdeck ⚠️ couldn't be judged 2 1 2 — — none

Why it failed

  • windows+nvidia: depth-shadow-tour screenshot.max_diff: 0.6 → 0.4; 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 1: Insufficient frame-time evidence for 1 required comparison(s). See rule results.
  • linux+radv, report 2: Insufficient frame-time evidence for 1 required comparison(s). See rule results.
  • steamdeck, report 1: the pr runtime failed (exit 1): …ne 70, in <module>
  • steamdeck, report 2: Insufficient frame-time evidence for 1 required comparison(s). See rule results.
What was tested

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

The farm will compare main and the PR on Windows NVIDIA, Linux RADV and Steam Deck, sampling shadow and depth scenes in Hyrule Field, the Market and Kakariko Village. Each side gets three starts, with stationary screenshots and shader draw-statistics logs collected at each location, taking roughly 35 minutes per tester. A crash or a screenshot difference above the allowed threshold fails the PR; the logs will also be searched for the four affected stage keys. If none appears, the run cannot establish that the fix was exercised.

  • Where: windows+nvidia (1-2 reports), linux+radv (1-2 reports), steamdeck (1-2 reports).
  • depth-shadow-tour: from the repository's save kokiri-start (switches HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1), then teleport to Hyrule Field, take the picture field to compare with main, teleport to Market, take the picture market to compare with main, teleport to Kakariko Village, take the picture kakariko to compare with main; 3 runs on each side.
  • Measured: crashes, the game's log (an expected line that never appears: could not be judged).
  • The PR fails if: it crashes; or a picture differs from main by more than 20%; or expected log lines missing is above 0.
  • Time: about 37 min of game runs per tester (6 game starts), plus the two builds.
Measurements on `windows+nvidia`, for the PR description

Verdict: fail on windows+nvidia (2 reports): depth-shadow-tour screenshot.max_diff failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window NVIDIA GeForce RTX 4070, 621.24.0 AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu+window+xess NVIDIA GeForce GTX 980, 582.78.0 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM
Scene: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa After: this PR @ adb7b13
depth-shadow-tour · expected log lines missing 1.0 1.0 (+0%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows+nvidia (2 reports): `depth-shadow-tour screenshot.max_diff` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM`  
Scene: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 |
|---|---|---|
| depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+0%) |

**Flags and settings**

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

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

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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa After: this PR @ adb7b13
depth-shadow-tour · expected log lines missing 1.0 1.0 (+0%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

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

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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 |
|---|---|---|
| depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+0%) |

**Flags and settings**

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

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

Hardware: 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa After: this PR @ adb7b13
depth-shadow-tour · expected log lines missing 1.0 1.0 (+0%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

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

Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 |
|---|---|---|
| depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+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+window 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+window+xess NVIDIA GeForce GTX 980, 582.78.0 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 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
steamdeck 1 linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 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 · ❌ failed on windows+nvidia Commit `adb7b13` · approved by HumanBean (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/3039) ⚠️ **Note:** No known scene draws an affected stage; the tour is exploratory, and missing stage keys leave that coverage check unjudged. Draw statistics may not expose the keys on every renderer, and a matching run does not by itself prove which screenshot contains the affected draw. ⚠️ **Note:** The farm cannot run the synthetic register-mapping unit test through this plan, so it cannot directly verify the LDL and LDS destination mappings. > **Summary**, written by AI (`gpt-6.1-terra`) from the numbers below: > > The change failed on Windows NVIDIA; Linux RADV and Steam Deck could not be judged. Windows screenshot differences were 0.27 on the RTX 4070 and 0.35 on the GTX 980, both above the 0.2 limit. The expected log line was missing on all completed runs, so the fix's coverage could not be established; Linux RADV and Steam Deck also lacked sufficient frame-time evidence. One Steam Deck run separately failed in the PR runtime with exit code 1. Done (started 2026-12-04 00:17 UTC, last report 2026-12-04 10:05 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows+nvidia` | ❌ fail | 2 [1](https://beanstalk.magicbean.dev/reports/rp_8a2e696f795797f6) [2](https://beanstalk.magicbean.dev/reports/rp_ed4a9bbfaa1b670e) | — | — | none | | `linux+radv` | ⚠️ couldn't be judged | 2 [1](https://beanstalk.magicbean.dev/reports/rp_6f1db747d29bf549) [2](https://beanstalk.magicbean.dev/reports/rp_fdaaca24895feb46) | — | — | none | | `steamdeck` | ⚠️ couldn't be judged | 2 [1](https://beanstalk.magicbean.dev/reports/rp_b6ea211498e1e601) [2](https://beanstalk.magicbean.dev/reports/rp_bdc7104f8079064d) | — | — | none | **Why it failed** - `windows+nvidia`: `depth-shadow-tour` `screenshot.max_diff`: `0.6 → 0.4; 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 1](https://beanstalk.magicbean.dev/reports/rp_6f1db747d29bf549): `Insufficient frame-time evidence for 1 required comparison(s). See rule results.` - `linux+radv`, [report 2](https://beanstalk.magicbean.dev/reports/rp_fdaaca24895feb46): `Insufficient frame-time evidence for 1 required comparison(s). See rule results.` - `steamdeck`, [report 1](https://beanstalk.magicbean.dev/reports/rp_b6ea211498e1e601): `the pr runtime failed (exit 1): …ne 70, in <module>` - `steamdeck`, [report 2](https://beanstalk.magicbean.dev/reports/rp_bdc7104f8079064d): `Insufficient frame-time evidence for 1 required comparison(s). See rule results.` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) The farm will compare main and the PR on Windows NVIDIA, Linux RADV and Steam Deck, sampling shadow and depth scenes in Hyrule Field, the Market and Kakariko Village. Each side gets three starts, with stationary screenshots and shader draw-statistics logs collected at each location, taking roughly 35 minutes per tester. A crash or a screenshot difference above the allowed threshold fails the PR; the logs will also be searched for the four affected stage keys. If none appears, the run cannot establish that the fix was exercised. - **Where:** windows+nvidia (1-2 reports), linux+radv (1-2 reports), steamdeck (1-2 reports). - **depth-shadow-tour:** from the repository's save `kokiri-start` (switches `HOS_FPS_MAX=30`, `HOS_OUTPUT_RES=1280x720`, `RX_VK_DRAW_STATS=1`), then teleport to Hyrule Field, take the picture field to compare with main, teleport to Market, take the picture market to compare with main, teleport to Kakariko Village, take the picture kakariko to compare with main; 3 runs on each side. - **Measured:** crashes, the game's log (an expected line that never appears: could not be judged). - **The PR fails if:** it crashes; or a picture differs from main by more than 20%; or expected log lines missing is above 0. - **Time:** about 37 min of game runs per tester (6 game starts), plus the two builds. </details> <details><summary>Measurements on `windows+nvidia`, for the PR description</summary> **Verdict:** fail on windows+nvidia (2 reports): `depth-shadow-tour screenshot.max_diff` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM` Scene: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 | |---|---|---| | depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+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 windows+nvidia (2 reports): `depth-shadow-tour screenshot.max_diff` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070, 621.24.0` `AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM` Scene: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 | |---|---|---| | depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+0%) | **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:** could not be judged on linux+radv (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side). 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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 | |---|---|---| | depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+0%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** could not be judged on linux+radv (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side). 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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 | |---|---|---| | depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+0%) | **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:** could not be judged on steamdeck (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side). Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 | |---|---|---| | depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+0%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** could not be judged on steamdeck (2 reports): required frame-time comparison inconclusive (fewer than two usable starts per side). Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 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: depth-shadow-tour, from the repository's save kokiri-start (HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1); 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); depth-shadow-tour: 3 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 @ d0164fa | After: this PR @ adb7b13 | |---|---|---| | depth-shadow-tour · expected log lines missing | 1.0 | 1.0 (+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_8a2e696f795797f6) | windows+nvidia+nvidia-proprietary+dgpu+window `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_ed4a9bbfaa1b670e) | windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM` | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_6f1db747d29bf549) | 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_fdaaca24895feb46) | linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM` | | `steamdeck` | [1](https://beanstalk.magicbean.dev/reports/rp_b6ea211498e1e601) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` | | `steamdeck` | [2](https://beanstalk.magicbean.dev/reports/rp_bdc7104f8079064d) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` | </details>
Author
Contributor

The farm's Kakariko failure looks like scene noise: re-run on my PC. Windows 10, RTX 4090, driver 617.42; the farm's plan for Kakariko alone: save kokiri-start, HOS_FPS_MAX=30, HOS_OUTPUT_RES=1280x720, RX_VK_DRAW_STATS=1, headless, teleport to Kakariko Village, 150 frames after arriving, one picture; 6 game starts ABBA (main, PR, PR, main, main, PR). Runtimes: main b40214d2b and this fix on it (99210a71e). Its lower_to_maxwell.h change is identical to this head's (git range-diff: only the test's extra assertion and the commit message differ).

Pairs Mean abs diff, median [range] Pixels >10% off, median [range]
main vs main (3) 0.072 [0.058–0.075] 0.296 [0.232–0.315]
PR vs PR (3) 0.048 [0.032–0.054] 0.183 [0.099–0.214]
main vs PR (9) 0.069 [0.032–0.076] 0.284 [0.110–0.316]
  • main against the PR sits inside main against itself; the closest pair of all six is a main and a PR start.
  • What differs between any two pictures: the windmill's blades, Navi's place, the torch flames, swaying leaves and edges. Link's and the cliffs' shadows, the geometry, the time of day and the people are the same in all six (picture below: main's three starts on top, the PR's below).
  • Draw stats, 18 frames a start: none of the four changed stage keys drawn on either side (3af1ac7c868ebee8, 18341da39b21edb5, 11a1afbd0c6737e0, 4170159071412496), the same as the farm's "expected line missing" on every run. No lowering failure or refused program in any log.

The farm's own numbers say the same for its Market and Field pictures (main against itself 0.61–0.64 in the Market, above the PR's 0.27–0.38). Its Kakariko PR diff was above main's own spread on both of its PCs, with three starts a side; here, with the same pair of runtimes, it is not. With no changed stage drawn, the PR's lowered programs are word for word main's (the offline lowering of all 42,856 stages, in the description), so the pictures can't differ by it. The scene that draws the four stages is still unknown (Still to test).

grid-labelled.png

**The farm's Kakariko failure looks like scene noise: re-run on my PC.** Windows 10, RTX 4090, driver 617.42; the farm's plan for Kakariko alone: save `kokiri-start`, `HOS_FPS_MAX=30`, `HOS_OUTPUT_RES=1280x720`, `RX_VK_DRAW_STATS=1`, headless, teleport to Kakariko Village, 150 frames after arriving, one picture; 6 game starts ABBA (main, PR, PR, main, main, PR). Runtimes: main b40214d2b and this fix on it (99210a71e). Its `lower_to_maxwell.h` change is identical to this head's (`git range-diff`: only the test's extra assertion and the commit message differ). | Pairs | Mean abs diff, median [range] | Pixels >10% off, median [range] | |---|---|---| | main vs main (3) | 0.072 [0.058–0.075] | 0.296 [0.232–0.315] | | PR vs PR (3) | 0.048 [0.032–0.054] | 0.183 [0.099–0.214] | | main vs PR (9) | 0.069 [0.032–0.076] | 0.284 [0.110–0.316] | - main against the PR sits inside main against itself; the closest pair of all six is a main and a PR start. - What differs between any two pictures: the windmill's blades, Navi's place, the torch flames, swaying leaves and edges. Link's and the cliffs' shadows, the geometry, the time of day and the people are the same in all six (picture below: main's three starts on top, the PR's below). - Draw stats, 18 frames a start: none of the four changed stage keys drawn on either side (`3af1ac7c868ebee8`, `18341da39b21edb5`, `11a1afbd0c6737e0`, `4170159071412496`), the same as the farm's "expected line missing" on every run. No lowering failure or refused program in any log. The farm's own numbers say the same for its Market and Field pictures (main against itself 0.61–0.64 in the Market, above the PR's 0.27–0.38). Its Kakariko PR diff was above main's own spread on both of its PCs, with three starts a side; here, with the same pair of runtimes, it is not. With no changed stage drawn, the PR's lowered programs are word for word main's (the offline lowering of all 42,856 stages, in the description), so the pictures can't differ by it. The scene that draws the four stages is still unknown (Still to test). ![grid-labelled.png](https://git.magicbean.dev/attachments/e19ad4e1-f52f-43c3-a7f3-2d434ed519c2)
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The regression test and offline shader comparison support the register mapping fix, but the four affected stages have not been exercised in the game. Their depth and shadow output remains unverified. Recommend approval; not approved on the forge.

The change maps local and shared load destinations across the reserved register boundary, preventing affected loads from writing the wrong registers. It adds a focused game-free regression test and changes four recorded game shader stages, each by four words.

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

  • L1 gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:254: The affected shader stages have not been exercised in the game, so their resulting depth and shadow output is still unverified. When: A scene that draws one of the four changed mesh stages executes a newly mapped local load; the reported Kokiri Forest and Hyrule Field runs did not draw any of them. Do: Find a scene that draws an affected stage and compare the base and this change on native mesh-shader hardware; cover the Tier 1 systems the path can affect.

Since the last review (on adb7b13d4c)
Still open: L1 (The affected shader stages have not been exercised in the game, so their resulting depth a…)

Checks: Still running: 10 checks.

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

Does it help: Unproven in game: the author reports that the test fails on main and passes with the fix, and that four of 42,856 shader stages change as intended. None of those four stages appeared in the recorded game runs.

Other systems: The lowering is shared across platforms and GPUs. The author reports a Windows NVIDIA game run and Linux checks, but no Linux game run or in-game exercise of the affected stages; a synthetic shared load also exercises the fix.

Switches: None added, changed or removed.

Reviewed: adb7b13d4c against d0164fae43: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full diff and regmap_marker_test.cpp; read the relevant portions of lower_to_maxwell.h and searched its load and call-link paths. The rest of the 3,638-line lowering header was not read in full. The referenced Tooling AGENTS.md and docs/review-checklist.md were unavailable.; nothing run (a code review).

Checked and fine:

  • The new test checks 32-, 64- and 128-bit local and shared loads, including the mapped destinations at the boundary.
  • The author reports that the same 95 checks fail on both the head and base, and that the affected shader stages are the only ones whose lowering changes.

Testing: No commands that build or run code were executed. The author reports game-free regression results, Windows NVIDIA game runs that did not draw the affected stages, and matching Linux check results on head and base. CI is still running.

Overlaps and merge order: Not checked; network access 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 regression test and offline shader comparison support the register mapping fix, but the four affected stages have not been exercised in the game. Their depth and shadow output remains unverified. Recommend approval; not approved on the forge. The change maps local and shared load destinations across the reserved register boundary, preventing affected loads from writing the wrong registers. It adds a focused game-free regression test and changes four recorded game shader stages, each by four words. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/eden/shader_recompiler/frontend/ampere/lower_to_maxwell.h:254`: The affected shader stages have not been exercised in the game, so their resulting depth and shadow output is still unverified. *When:* A scene that draws one of the four changed mesh stages executes a newly mapped local load; the reported Kokiri Forest and Hyrule Field runs did not draw any of them. **Do:** Find a scene that draws an affected stage and compare the base and this change on native mesh-shader hardware; cover the Tier 1 systems the path can affect. **Since the last review** (on adb7b13d4c5c) Still open: L1 (The affected shader stages have not been exercised in the game, so their resulting depth a…) **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven in game: the author reports that the test fails on main and passes with the fix, and that four of 42,856 shader stages change as intended. None of those four stages appeared in the recorded game runs. **Other systems:** The lowering is shared across platforms and GPUs. The author reports a Windows NVIDIA game run and Linux checks, but no Linux game run or in-game exercise of the affected stages; a synthetic shared load also exercises the fix. **Switches:** None added, changed or removed. **Reviewed:** adb7b13d4c5c against d0164fae4325: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full diff and regmap_marker_test.cpp; read the relevant portions of lower_to_maxwell.h and searched its load and call-link paths. The rest of the 3,638-line lowering header was not read in full. The referenced Tooling AGENTS.md and docs/review-checklist.md were unavailable.; nothing run (a code review). **Checked and fine:** - The new test checks 32-, 64- and 128-bit local and shared loads, including the mapped destinations at the boundary. - The author reports that the same 95 checks fail on both the head and base, and that the affected shader stages are the only ones whose lowering changes. **Testing:** No commands that build or run code were executed. The author reports game-free regression results, Windows NVIDIA game runs that did not draw the affected stages, and matching Linux check results on head and base. CI is still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/ldl-reserved-regs 2026-12-05 19:21:27 +00:00
Some checks reported errors
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 7s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows+nvidia 2/1 fail
beanstalk/linux+radv 0/1 pass, 2 error
beanstalk/steamdeck 0/1 pass, 2 error
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!3039
No description provided.