fix(vk): a fragment program that asks for early fragment tests runs after them, so the fence behind the Forest Temple's warp stays in the fog #2796

Merged
HumanBean merged 2 commits from llun/Longshot:fix/early-fragment-tests into main 2026-11-29 19:26:26 +00:00
Member

Summary

In Phantom Ganon's room, after the fight, the fence behind the blue warp "pops": at some camera pitches the fence pieces behind the warp are drawn crisp and dark over the warp's light, and they're back in the fog a little higher or lower. On the Switch the fence stays dark in the fog at every angle (reported on an RX 9070 XT with FSR 4 in #1463, an RTX 5060 Ti in a later report on the issue; seen here on an RTX 5080). Adult Link shows it best; child Link is affected too.

The cause. The game fades whatever stands between the camera and Link (its camera fade, game::activecameraalpha). It finds those objects on the GPU:

  1. It draws Link's depth into a small 80x44 target.
  2. It draws each candidate object once against that depth (depth test LEQUAL, no depth write).
  3. That draw's fragment program counts the object's fragments with atomics into a buffer the CPU reads back a frame later.
  4. An object with fragments in front of Link gets a fade target from those counts, and while its alpha is below 1 the game draws it in its pass after the fog.

The counting program asks for early fragment tests (GLSL's layout(early_fragment_tests)): byte +0x5b of NVN2's control section. On the Switch the hardware then runs the depth test first, and the fragments behind Link are never counted. Longshot's translation never read that byte. In Vulkan a fragment program that stores runs before its depth test unless it has EarlyFragmentTests, so every fragment of every candidate was counted, behind Link or not. At those pitches the fence pieces behind the warp counted as in front of Link: the game faded them (alpha 0.76) and drew them after the fog, crisp against the warp's light.

How it was traced, in game:

  • Frame dumps: the crisp fence is the fence's own faded draws (programs d6dcafdb…, 10d347d4…; their alpha is c4[24] * c5[107], and c5[107] = 0.76 in the broken frames).
  • A write watch on that value led to the material parameter upload, then to the camera fade's update (f_800cdbe0, from f_82c43780), whose target comes from f_8034f440.
  • f_8034f440 reads the GPU's per-object counters after invalidating the cache.
  • The counters come from atomics in the occluder test's fragment program (bc3ae540…).
  • A census of the game's 21,413 fragment stages: +0x5b is set in 711, never in one that writes depth. The 114 stages that write depth set +0x58, +0x59 and +0x5f, so +0x5b is the early-tests flag, as early tests can't go with depth writes.

The fix.

  • parse_code reads +0x5b of a fragment stage's control section into Code::early_fragment_tests.
  • Both fragment translations (after a vertex program and after a mesh program) set RuntimeInfo::force_early_z from it. The SPIR-V back end already turns that into the EarlyFragmentTests execution mode.
  • A program that writes depth never gets it.
  • RX_VK_EARLY_FRAGMENT_TESTS=0 turns it off (a kill switch); off, the program cache keeps a stamp of its own.

The camera fade still works where the game wants it: with a fence section near the camera, the same pieces fade with and without the fix.

To see it on main: beat Phantom Ganon (or load a save from after the fight), stand as adult between the start and the warp, and tilt the camera up slowly with the warp ahead. The fence behind the warp turns crisp over the light from a few steps up, and stays crisp the higher you go.

Read first: fragment_tests_early and Code::early_fragment_tests in gpu/vk/vk_shader.cpp, then tests/test_early_fragment_tests.py.

Fixes #1463. See #956 (the fishing pond's log vanishing as the camera turns): a false camera fade looks just like that, so this likely fixes it too; not checked here.

Testing

Tested: Windows 11 (build 26300), RTX 5080 (NVIDIA 621.40). This branch's game was built as a pack over the shared base and run through the job queue. Settings: the run profile's defaults, 1280x720 windowless, the Quality preset Auto picks. The save is from after the fight; Link is made adult and placed in the boss room with a local teleport override that isn't in this branch. The camera was driven through the control bridge.

  • Pitch sweep at the broken spot: Link between the start and the warp, the camera tilted up in 12 steps through the broken range, a frame dump at each, counting the fence's faded draws.
    • With RX_VK_EARLY_FRAGMENT_TESTS=0 (main's translation): 0, 0, then 6 at steps 2 to 8 and 14 at steps 9 to 11; the shots show the fence crisp over the light.
    • With this branch: 0 at every step; the fence stays in the fog.
    • Before that, the same spot on main's translation with frame dumps: 6 faded fence draws in the broken frames, 0 in the good ones.
  • The camera fade still works: Link at the fence ring, the camera swung round in 12 yaw steps so a fence section comes close to the camera. Both sides fade the same pieces (1, 1, 1, 1, 1, 1, 2 at steps 4 to 10).
  • Occlusion queries ruled out: RX_VK_OCC_QUERIES=0 and RX_VK_OCC_FIXED=0 leave the bug as it is; so do full buffer write-backs and every readback waiting.
  • Checks:
    • tests/test_early_fragment_tests.py fails on main ("vk_shader.cpp never sets the fragment runtime's force_early_z…") and passes here (clang++ from llvm-mingw).
    • Undoing the parse line, or one of the two force_early_z lines, makes it fail.
    • test_program_stamp_knobs, test_compute_local_memory and test_live_shader_stage pass.
    • test_switch_table reports only LONGSHOT_LAUNCHER_STARTUP, which fails the same way on main.
    • mise run test (llvm-mingw on PATH, CC=clang, CXX=clang++): 626 passed, 224 failed, 46 skipped here; on main @ 01d6878b3, 625 passed and the same 224 failed (tools this PC lacks: gcc, glslang, spirv-val and others). The one more pass is the new check; nothing fails here that passes on main.
    • Rebased onto main @ 01539efd2 (the same two commits): mise run test -- --exact tests/test_early_fragment_tests.py passes, and the pack builds (llvm-mingw).
    • gpu/vk/vk_shader.cpp compiles for Linux (WSL Ubuntu 24.04, clang++, -std=c++20 -fsyntax-only -Wall -Wextra, the build's include paths with host/posix) with no error or warning, on this branch and on main; on Windows the pack built it (llvm-mingw).

Still to test:

  • AMD on Windows (the reporter's RX 9070 XT, FSR 4): the boss room after Phantom Ganon, adult, tilt the camera up slowly in front of the warp. Expecting the fence behind the warp to stay in the fog. (@Beanstalk)
  • AMD on Linux (RADV) and the Steam Deck: the same, plus a walk through Kokiri Forest and Hyrule Field. Expecting no change elsewhere: 748 of the game's 41,739 fragment programs ask for early tests. In the boss room only the occluder test's two programs drawn in the frame ask; the rest draw in other areas. (@Beanstalk)
  • NVIDIA on Linux (its own driver): the boss-room sweep as above, with the switch unset and at RX_VK_EARLY_FRAGMENT_TESTS=0, plus a walk through Hyrule Field. Expecting the fence to stay in the fog with it unset, and no change elsewhere. (@Beanstalk)

Measurements

Verdict: no measurable difference. In the three scenes measured the two sides' runs overlap (dev.py ab's rule: within the spread). The medians differ by -1.6% (Hyrule Field) to +2.7% (Market). The tails go both ways within their spreads: in the Market the 1% lows are steadier with the fix (100 to 103 fps against 89 to 104), and in Inside the Deku Tree the p99 median is higher with it (7.37 ms against 6.97 ms, the runs 6.73 to 7.71 against 6.88 to 7.17). Only the 748 programs that ask for early tests change, and early tests let the GPU skip fragments the depth test rejects.

Setup:

  • Hardware: Windows 11 (build 26300), RTX 5080, NVIDIA 621.40.
  • Command: mise run dev -- ab --env RX_VK_EARLY_FRAGMENT_TESTS=0 --scene <scene>: one build of this branch, the switch unset (this PR) against =0 (main's translation: no program gets early fragment tests).
  • Runs: 3 interleaved runs a side (A1 B1 A2 B2 A3 B3), 60 s each after the warm-up, uncapped (HOS_FPS_MAX=1000), the Render resolution pinned at 67% (1280x720), the Quality preset Auto picks.
  • Tooling: dev.py ab can't measure on current main; the runs used the fixes in the tooling pull request (#2797), on top of this branch's two commits.
  • Write-up: ab wrote no write-up of its own, because it read the menu before the area had loaded its simulated-turf rows (fixed there too). The numbers below are its per-run lines.
  • Kokiri Forest is left out. Its runs split by whether the area's simulated-turf settings had been applied (about 159 against 195 fps, whichever side), which left one or two runs a side in each state: too few for a spread (review). Measuring it again needs a fixed turf state on both sides and more runs.
fps per run (median) Before: main @ 01d6878b3 (its translation: this build, RX_VK_EARLY_FRAGMENT_TESTS=0) After: this PR @ d96bb1061
Inside the Deku Tree 167.7, 164.5, 168.7 (167.7) 170.3, 166.6, 170.3 (170.3)
Market 127.3, 132.1, 123.5 (127.3) 130.4, 130.8, 130.8 (130.8)
Hyrule Field 169.9, 174.9, 174.5 (174.5) 162.1, 171.7, 171.8 (171.7)
1% low, Market 93.1, 103.7, 89.3 103.2, 102.5, 100.2
p99, Inside the Deku Tree 6.88, 6.97, 7.17 ms 6.73, 7.71, 7.37 ms

The switch ships on (unset): it fixes the fence and costs nothing measurable. (The frame rates are from d96bb1061 on 01d6878b3; the branch is now the same two commits on main @ 01539efd2, and nothing between changes the renderer's frame.)

First start after the update: the shader preparation and its caches

Verdict: the update costs one preparation of about 3.5 to 4.5 minutes on this PC instead of the usual 2, the same as any change to the translator. The early tests themselves add nothing to it, and nothing to a new installation's time or to the caches' size.

  • What ran: longshot-builder dev prepare <runtime> --compile-shaders most, what a build and an update run before the first start (a profile with prepare_shaders off does the same at the game's first start). 16 runs, through the job queue in timing mode.
  • Hardware and runtimes: the RTX 5080 above (NVIDIA 621.40). Two runtimes on the same shared base, built the same way: main @ 01539efd2 and this branch @ 6dd8c7f96.
  • Isolation: every state had its own cache/, its own SPIR-V store (LONGSHOT_SHADER_STORE) and its own NVIDIA cache (__GL_SHADER_DISK_CACHE_PATH). Nothing was read from the PC's own caches.
  • Cold: a folder whose cache/ held only the pipeline notes (the shipped list; a new installation's first preparation writes the same 1052.4 MB), with an empty store and an empty NVIDIA cache. Both sides prepared 268,075 entries, all built (0 failed, faulted or cold).
  • Warm: the same folder again: 164,674 entries, all from the caches.
  • Upgrade: this branch over a copy of main's caches after its cold and warm runs, as an installed game's first start after the update.
  • Control: the same upgrade with RX_VK_EARLY_FRAGMENT_TESTS=0. Its stamp differs from main's (the switch is part of it), but its SPIR-V is main's, so it shows what a translator change costs without the early tests.
Seconds per run main This PR
Cold 462.9, 391.9, 383.9 (new installation) 404.0, 386.8, 389.5 (new installation)
Warm 113.0, 110.0 114.9, 111.5
Upgrade: this PR over main's caches 219.8, 263.6; warm after it 109.0, 117.4
Control: the same with the switch off 261.1, 210.8
Size after the cold run main This PR
cache/ 2.54 GB: programs 149.6 MB, pipeline cache 1,332.5 to 1,334.3 MB, notes 1,052.4 MB 2.54 GB: programs 149.6 MB, pipeline cache 1,332.9 to 1,333.6 MB, notes 1,052.4 MB
SPIR-V store 3.85 GB 3.85 GB
NVIDIA's cache 1.08 GB (1.33 GB after the warm run) 1.08 GB (1.33 GB after the warm run)
  • After the upgrade: cache/ stays 2.54 GB (the pipeline cache 1,337.4 and 1,339.5 MB). The store grows by 0.17 GB to 4.02 GB, as this stamp's programs are added beside main's; with the switch off it grows by 0.15 GB, to 4.00 to 4.01 GB. NVIDIA's cache grows by 5 to 9 MB.
  • In the build's own path (the shared store and the queue's NVIDIA cache, as a player's update), this branch's runtime prepared over main's caches in about 2 minutes: 39,564 noted pipelines and 5,087 compute pipelines in 71.5 s.
  • Spread: the upgrade's two runs (219.8, 263.6 s) and the control's (261.1, 210.8 s) overlap, as do the cold runs (383.9 to 462.9 s on main, 386.8 to 404.0 s here).

Risks

  • Every fragment program the game asks to test early now is (748 of 41,739 programs). That matches the Switch. If +0x5b meant something else for some program, that program's discards would no longer keep its depth out, or its stores would skip occluded fragments.
  • Turning it off: RX_VK_EARLY_FRAGMENT_TESTS=0; a revert is enough too.
  • After updating: the shader translation changed, so the program cache and the prepared shaders are made again once, as with any translator change (any code change to vk_shader.cpp does it: docs/dev/developing.md, The shader preparation). Measured above: one preparation of 220 to 264 s on this PC instead of about 110 s, the same as a translator change without the early tests (211 to 261 s), with the same cache sizes. Nothing in saves or longshot_options.ini 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 fix: a game-free test that fails on main and passes here.
  • 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. (None needed a change: every check that reads vk_shader.cpp or switches.def passes as on main.)
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

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

🤖 Generated with Claude Code

## Summary In Phantom Ganon's room, after the fight, the fence behind the blue warp "pops": at some camera pitches the fence pieces behind the warp are drawn crisp and dark over the warp's light, and they're back in the fog a little higher or lower. On the Switch the fence stays dark in the fog at every angle (reported on an RX 9070 XT with FSR 4 in #1463, an RTX 5060 Ti in a later report on the issue; seen here on an RTX 5080). Adult Link shows it best; child Link is affected too. **The cause.** The game fades whatever stands between the camera and Link (its camera fade, `game::activecameraalpha`). It finds those objects on the GPU: 1. It draws Link's depth into a small 80x44 target. 2. It draws each candidate object once against that depth (depth test LEQUAL, no depth write). 3. That draw's fragment program counts the object's fragments with atomics into a buffer the CPU reads back a frame later. 4. An object with fragments in front of Link gets a fade target from those counts, and while its alpha is below 1 the game draws it in its pass after the fog. The counting program asks for **early fragment tests** (GLSL's `layout(early_fragment_tests)`): byte `+0x5b` of NVN2's control section. On the Switch the hardware then runs the depth test first, and the fragments behind Link are never counted. Longshot's translation never read that byte. In Vulkan a fragment program that stores runs before its depth test unless it has `EarlyFragmentTests`, so every fragment of every candidate was counted, behind Link or not. At those pitches the fence pieces behind the warp counted as in front of Link: the game faded them (alpha 0.76) and drew them after the fog, crisp against the warp's light. How it was traced, in game: - Frame dumps: the crisp fence is the fence's own faded draws (programs `d6dcafdb…`, `10d347d4…`; their alpha is `c4[24] * c5[107]`, and `c5[107]` = 0.76 in the broken frames). - A write watch on that value led to the material parameter upload, then to the camera fade's update (`f_800cdbe0`, from `f_82c43780`), whose target comes from `f_8034f440`. - `f_8034f440` reads the GPU's per-object counters after invalidating the cache. - The counters come from atomics in the occluder test's fragment program (`bc3ae540…`). - A census of the game's 21,413 fragment stages: `+0x5b` is set in 711, never in one that writes depth. The 114 stages that write depth set `+0x58`, `+0x59` and `+0x5f`, so `+0x5b` is the early-tests flag, as early tests can't go with depth writes. **The fix.** - `parse_code` reads `+0x5b` of a fragment stage's control section into `Code::early_fragment_tests`. - Both fragment translations (after a vertex program and after a mesh program) set `RuntimeInfo::force_early_z` from it. The SPIR-V back end already turns that into the `EarlyFragmentTests` execution mode. - A program that writes depth never gets it. - `RX_VK_EARLY_FRAGMENT_TESTS=0` turns it off (a kill switch); off, the program cache keeps a stamp of its own. The camera fade still works where the game wants it: with a fence section near the camera, the same pieces fade with and without the fix. To see it on `main`: beat Phantom Ganon (or load a save from after the fight), stand as adult between the start and the warp, and tilt the camera up slowly with the warp ahead. The fence behind the warp turns crisp over the light from a few steps up, and stays crisp the higher you go. Read first: `fragment_tests_early` and `Code::early_fragment_tests` in `gpu/vk/vk_shader.cpp`, then `tests/test_early_fragment_tests.py`. Fixes #1463. See #956 (the fishing pond's log vanishing as the camera turns): a false camera fade looks just like that, so this likely fixes it too; not checked here. ## Testing **Tested:** Windows 11 (build 26300), RTX 5080 (NVIDIA 621.40). This branch's game was built as a pack over the shared base and run through the job queue. Settings: the run profile's defaults, 1280x720 windowless, the Quality preset Auto picks. The save is from after the fight; Link is made adult and placed in the boss room with a local teleport override that isn't in this branch. The camera was driven through the control bridge. - **Pitch sweep at the broken spot:** Link between the start and the warp, the camera tilted up in 12 steps through the broken range, a frame dump at each, counting the fence's faded draws. - With `RX_VK_EARLY_FRAGMENT_TESTS=0` (main's translation): 0, 0, then 6 at steps 2 to 8 and 14 at steps 9 to 11; the shots show the fence crisp over the light. - With this branch: 0 at every step; the fence stays in the fog. - Before that, the same spot on `main`'s translation with frame dumps: 6 faded fence draws in the broken frames, 0 in the good ones. - **The camera fade still works:** Link at the fence ring, the camera swung round in 12 yaw steps so a fence section comes close to the camera. Both sides fade the same pieces (1, 1, 1, 1, 1, 1, 2 at steps 4 to 10). - **Occlusion queries ruled out:** `RX_VK_OCC_QUERIES=0` and `RX_VK_OCC_FIXED=0` leave the bug as it is; so do full buffer write-backs and every readback waiting. - **Checks:** - `tests/test_early_fragment_tests.py` fails on `main` ("vk_shader.cpp never sets the fragment runtime's force_early_z…") and passes here (clang++ from llvm-mingw). - Undoing the parse line, or one of the two `force_early_z` lines, makes it fail. - `test_program_stamp_knobs`, `test_compute_local_memory` and `test_live_shader_stage` pass. - `test_switch_table` reports only `LONGSHOT_LAUNCHER_STARTUP`, which fails the same way on `main`. - `mise run test` (llvm-mingw on PATH, `CC=clang`, `CXX=clang++`): 626 passed, 224 failed, 46 skipped here; on `main` @ `01d6878b3`, 625 passed and the same 224 failed (tools this PC lacks: gcc, glslang, spirv-val and others). The one more pass is the new check; nothing fails here that passes on `main`. - Rebased onto `main` @ `01539efd2` (the same two commits): `mise run test -- --exact tests/test_early_fragment_tests.py` passes, and the pack builds (llvm-mingw). - `gpu/vk/vk_shader.cpp` compiles for Linux (WSL Ubuntu 24.04, clang++, `-std=c++20 -fsyntax-only -Wall -Wextra`, the build's include paths with `host/posix`) with no error or warning, on this branch and on `main`; on Windows the pack built it (llvm-mingw). **Still to test:** - AMD on Windows (the reporter's RX 9070 XT, FSR 4): the boss room after Phantom Ganon, adult, tilt the camera up slowly in front of the warp. Expecting the fence behind the warp to stay in the fog. (@Beanstalk) - AMD on Linux (RADV) and the Steam Deck: the same, plus a walk through Kokiri Forest and Hyrule Field. Expecting no change elsewhere: 748 of the game's 41,739 fragment programs ask for early tests. In the boss room only the occluder test's two programs drawn in the frame ask; the rest draw in other areas. (@Beanstalk) - NVIDIA on Linux (its own driver): the boss-room sweep as above, with the switch unset and at `RX_VK_EARLY_FRAGMENT_TESTS=0`, plus a walk through Hyrule Field. Expecting the fence to stay in the fog with it unset, and no change elsewhere. (@Beanstalk) ## Measurements **Verdict:** no measurable difference. In the three scenes measured the two sides' runs overlap (`dev.py ab`'s rule: within the spread). The medians differ by -1.6% (Hyrule Field) to +2.7% (Market). The tails go both ways within their spreads: in the Market the 1% lows are steadier with the fix (100 to 103 fps against 89 to 104), and in Inside the Deku Tree the p99 median is higher with it (7.37 ms against 6.97 ms, the runs 6.73 to 7.71 against 6.88 to 7.17). Only the 748 programs that ask for early tests change, and early tests let the GPU skip fragments the depth test rejects. Setup: - **Hardware:** Windows 11 (build 26300), RTX 5080, NVIDIA 621.40. - **Command:** `mise run dev -- ab --env RX_VK_EARLY_FRAGMENT_TESTS=0 --scene <scene>`: one build of this branch, the switch unset (this PR) against `=0` (main's translation: no program gets early fragment tests). - **Runs:** 3 interleaved runs a side (A1 B1 A2 B2 A3 B3), 60 s each after the warm-up, uncapped (HOS_FPS_MAX=1000), the Render resolution pinned at 67% (1280x720), the Quality preset Auto picks. - **Tooling:** `dev.py ab` can't measure on current `main`; the runs used the fixes in the tooling pull request (#2797), on top of this branch's two commits. - **Write-up:** `ab` wrote no write-up of its own, because it read the menu before the area had loaded its simulated-turf rows (fixed there too). The numbers below are its per-run lines. - **Kokiri Forest is left out.** Its runs split by whether the area's simulated-turf settings had been applied (about 159 against 195 fps, whichever side), which left one or two runs a side in each state: too few for a spread (review). Measuring it again needs a fixed turf state on both sides and more runs. | fps per run (median) | Before: main @ `01d6878b3` (its translation: this build, `RX_VK_EARLY_FRAGMENT_TESTS=0`) | After: this PR @ `d96bb1061` | |---|---|---| | Inside the Deku Tree | 167.7, 164.5, 168.7 (167.7) | 170.3, 166.6, 170.3 (170.3) | | Market | 127.3, 132.1, 123.5 (127.3) | 130.4, 130.8, 130.8 (130.8) | | Hyrule Field | 169.9, 174.9, 174.5 (174.5) | 162.1, 171.7, 171.8 (171.7) | | 1% low, Market | 93.1, 103.7, 89.3 | 103.2, 102.5, 100.2 | | p99, Inside the Deku Tree | 6.88, 6.97, 7.17 ms | 6.73, 7.71, 7.37 ms | The switch ships on (unset): it fixes the fence and costs nothing measurable. (The frame rates are from `d96bb1061` on `01d6878b3`; the branch is now the same two commits on `main` @ `01539efd2`, and nothing between changes the renderer's frame.) ### First start after the update: the shader preparation and its caches **Verdict:** the update costs one preparation of about 3.5 to 4.5 minutes on this PC instead of the usual 2, the same as any change to the translator. The early tests themselves add nothing to it, and nothing to a new installation's time or to the caches' size. - **What ran:** `longshot-builder dev prepare <runtime> --compile-shaders most`, what a build and an update run before the first start (a profile with `prepare_shaders` off does the same at the game's first start). 16 runs, through the job queue in `timing` mode. - **Hardware and runtimes:** the RTX 5080 above (NVIDIA 621.40). Two runtimes on the same shared base, built the same way: `main` @ `01539efd2` and this branch @ `6dd8c7f96`. - **Isolation:** every state had its own `cache/`, its own SPIR-V store (`LONGSHOT_SHADER_STORE`) and its own NVIDIA cache (`__GL_SHADER_DISK_CACHE_PATH`). Nothing was read from the PC's own caches. - **Cold:** a folder whose `cache/` held only the pipeline notes (the shipped list; a new installation's first preparation writes the same 1052.4 MB), with an empty store and an empty NVIDIA cache. Both sides prepared 268,075 entries, all built (0 failed, faulted or cold). - **Warm:** the same folder again: 164,674 entries, all from the caches. - **Upgrade:** this branch over a copy of `main`'s caches after its cold and warm runs, as an installed game's first start after the update. - **Control:** the same upgrade with `RX_VK_EARLY_FRAGMENT_TESTS=0`. Its stamp differs from `main`'s (the switch is part of it), but its SPIR-V is `main`'s, so it shows what a translator change costs without the early tests. | Seconds per run | `main` | This PR | |---|---|---| | Cold | 462.9, 391.9, 383.9 (new installation) | 404.0, 386.8, 389.5 (new installation) | | Warm | 113.0, 110.0 | 114.9, 111.5 | | Upgrade: this PR over `main`'s caches | | 219.8, 263.6; warm after it 109.0, 117.4 | | Control: the same with the switch off | | 261.1, 210.8 | | Size after the cold run | `main` | This PR | |---|---|---| | `cache/` | 2.54 GB: programs 149.6 MB, pipeline cache 1,332.5 to 1,334.3 MB, notes 1,052.4 MB | 2.54 GB: programs 149.6 MB, pipeline cache 1,332.9 to 1,333.6 MB, notes 1,052.4 MB | | SPIR-V store | 3.85 GB | 3.85 GB | | NVIDIA's cache | 1.08 GB (1.33 GB after the warm run) | 1.08 GB (1.33 GB after the warm run) | - **After the upgrade:** `cache/` stays 2.54 GB (the pipeline cache 1,337.4 and 1,339.5 MB). The store grows by 0.17 GB to 4.02 GB, as this stamp's programs are added beside `main`'s; with the switch off it grows by 0.15 GB, to 4.00 to 4.01 GB. NVIDIA's cache grows by 5 to 9 MB. - **In the build's own path** (the shared store and the queue's NVIDIA cache, as a player's update), this branch's runtime prepared over `main`'s caches in about 2 minutes: 39,564 noted pipelines and 5,087 compute pipelines in 71.5 s. - **Spread:** the upgrade's two runs (219.8, 263.6 s) and the control's (261.1, 210.8 s) overlap, as do the cold runs (383.9 to 462.9 s on `main`, 386.8 to 404.0 s here). ## Risks - **Every fragment program the game asks to test early now is** (748 of 41,739 programs). That matches the Switch. If `+0x5b` meant something else for some program, that program's discards would no longer keep its depth out, or its stores would skip occluded fragments. - **Turning it off:** `RX_VK_EARLY_FRAGMENT_TESTS=0`; a revert is enough too. - **After updating:** the shader translation changed, so the program cache and the prepared shaders are made again once, as with any translator change (any code change to `vk_shader.cpp` does it: `docs/dev/developing.md`, *The shader preparation*). Measured above: one preparation of 220 to 264 s on this PC instead of about 110 s, the same as a translator change without the early tests (211 to 261 s), with the same cache sizes. Nothing in saves or `longshot_options.ini` 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 fix: a game-free test that fails on `main` and passes here. - [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. (None needed a change: every check that reads `vk_shader.cpp` or `switches.def` passes as on `main`.) - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Screenshots of the same spot on `main` and here, for a change that shows on screen. - [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)
NVN2's control section says a fragment program wants its depth and stencil tests
first (GLSL's layout(early_fragment_tests)) at +0x5b. The translation never reads it,
so no program gets EarlyFragmentTests and Vulkan runs a program that stores before
its tests. The check cuts parse_code's head, Code and the choice the translation
makes out of vk_shader.cpp, compiles them with stand-ins, and checks a program that
asks, one that does not, one that writes depth and a vertex control with the same
byte, with RX_VK_EARLY_FRAGMENT_TESTS unset and at 0. It fails on main: nothing sets
force_early_z.

Refs #1463

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(vk): a fragment program that asks for early fragment tests runs after them, so the fence behind the Forest Temple's warp stays in the fog
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m2s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m57s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m16s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m38s
CI / Website build and checks (pull_request) Failing after 1m36s
PR description / Title and description (pull_request_target) Successful in 8s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 16m39s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 37m9s
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+amd+gpu-rx-9070-xt 0/1 pass, 0 running, 2 queued
beanstalk/linux+radv 1/1 pass
beanstalk/steamdeck 1/1 pass
d96bb1061c
The camera fade (game::activecameraalpha) fades what stands between the camera
and Link. It finds those objects on the GPU: Link's depth in an 80x44 pass, then
one draw an object with LEQUAL against it, whose fragment program counts the
object's fragments with atomics. The program asks for early fragment tests
(control section +0x5b), so on the Switch the fragments behind Link fail the depth
test before they are counted. The translation never read the flag: Vulkan ran the
program first and counted every fragment. At some camera pitches the fence pieces
behind the warp in Phantom Ganon's room then read as in front of Link, the game
faded them (alpha 0.76) into its pass after the fog, and they showed crisp against
the warp's light.

parse_code reads +0x5b into Code::early_fragment_tests, and both fragment
translations (after a vertex and after a mesh program) set force_early_z from it,
which the SPIR-V back end already turns into EarlyFragmentTests. Not for a program
that writes depth, which cannot be tested first: +0x5b is set only in programs
that write none (711 of 21,413 fragment programs; the 114 that write depth set
+0x58, +0x59 and +0x5f). RX_VK_EARLY_FRAGMENT_TESTS=0 turns it off, a kill switch;
off, the program cache keeps a stamp of its own.

Fixes #1463

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

Tested in game: Windows 11 (build 26300), RTX 5080, NVIDIA 621.40, this branch as a pack over the shared base, through the job queue. Phantom Ganon's room after the fight, adult Link between the start and the warp, the camera tilted up in 12 steps through the range where the fence popped, a frame dump at each. With RX_VK_EARLY_FRAGMENT_TESTS=0 (main's translation) 6 to 14 of the fence's faded draws from step 2 up, the fence crisp over the warp's light in the shots; with this branch 0 at every step and the fence stays in the fog. The camera fade still fades a fence section near the camera the same way on both sides. Timing A/B in Inside the Deku Tree, the Market, Hyrule Field and Kokiri Forest: within the spread everywhere.

Tested in game: Windows 11 (build 26300), RTX 5080, NVIDIA 621.40, this branch as a pack over the shared base, through the job queue. Phantom Ganon's room after the fight, adult Link between the start and the warp, the camera tilted up in 12 steps through the range where the fence popped, a frame dump at each. With RX_VK_EARLY_FRAGMENT_TESTS=0 (main's translation) 6 to 14 of the fence's faded draws from step 2 up, the fence crisp over the warp's light in the shots; with this branch 0 at every step and the fence stays in the fog. The camera fade still fades a fence section near the camera the same way on both sides. Timing A/B in Inside the Deku Tree, the Market, Hyrule Field and Kokiri Forest: within the spread everywhere.
Author
Member

The same spot and camera, the same build: left RX_VK_EARLY_FRAGMENT_TESTS=0 (main's translation), right this branch. Top: the first shot at the broken pitch. Below: two pitches of the sweep, 6 and 14 of the fence's draws faded on the left; 0 on the right, the fence stays in the fog. (The heart container turns, so the frames differ there.)

before_after_1.png

before_after_sweep.png

The same spot and camera, the same build: left `RX_VK_EARLY_FRAGMENT_TESTS=0` (main's translation), right this branch. Top: the first shot at the broken pitch. Below: two pitches of the sweep, 6 and 14 of the fence's draws faded on the left; 0 on the right, the fence stays in the fog. (The heart container turns, so the frames differ there.) ![before_after_1.png](https://git.magicbean.dev/attachments/55685d56-de9c-482f-a5d6-19ccd09758d6) ![before_after_sweep.png](https://git.magicbean.dev/attachments/a0a319fa-b27e-4cd0-83f5-c3404e670018)
Author
Member

A correction to the pictures above: the top one is not from one build. Its left half is main's translation in an earlier build of mine (main plus frame-dump logging), its right half the first version of this fix. The two sweep pictures below it are one build of this branch, the switch at 0 against unset.

A correction to the pictures above: the top one is not from one build. Its left half is `main`'s translation in an earlier build of mine (main plus frame-dump logging), its right half the first version of this fix. The two sweep pictures below it are one build of this branch, the switch at 0 against unset.
llun changed title from WIP: fix(vk): a fragment program that asks for early fragment tests runs after them, so the fence behind the Forest Temple's warp stays in the fog to fix(vk): a fragment program that asks for early fragment tests runs after them, so the fence behind the Forest Temple's warp stays in the fog 2026-11-29 11:41:03 +00:00
Author
Member

@Beanstalk On an AMD Radeon RX 9070 XT (Windows, FSR 4 if it is there) and on AMD with RADV on Linux (a Steam Deck too, if one is free): load a save from after the Phantom Ganon fight in the Forest Temple, as adult Link, stand between the start and the blue warp with the warp ahead, and tilt the camera up slowly. Expected: the fence ring behind the warp stays dark in the fog at every angle, never drawn crisp over the warp's light. Then walk through Kokiri Forest and Hyrule Field: expected no visual change from main.

@Beanstalk On an AMD Radeon RX 9070 XT (Windows, FSR 4 if it is there) and on AMD with RADV on Linux (a Steam Deck too, if one is free): load a save from after the Phantom Ganon fight in the Forest Temple, as adult Link, stand between the start and the blue warp with the warp ahead, and tilt the camera up slowly. Expected: the fence ring behind the warp stays dark in the fog at every angle, never drawn crisp over the warp's light. Then walk through Kokiri Forest and Hyrule Field: expected no visual change from main.
Member
Beanstalk test farm · an earlier run: commit d96bb10, run 2 (the newer results are in a comment below)

Commit d96bb10 · approved by llun (reviewed) · dashboard

⚠️ Note: The farm has no post-Phantom-Ganon save or boss-room teleport, so it cannot test the fence sweep or nearby camera fade; the Forest Temple teleport is not the fight aftermath.
⚠️ Note: FSR 4 is not enabled: its SDK build requires every target to be Windows with the FSR 4 license, which would exclude the requested Linux runs.
⚠️ Note: The still shots compare against main before movement; traversal after movement is timed but cannot be reliably image-diffed, and the brief walks do not cover either area exhaustively.

Started at 11:51 UTC. Run 2: re-planned by llun.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows+amd+gpu-rx-9070-xt (GPU "rx 9070 xt") ⏳ queued 0 of 1 — — —
linux+radv ✅ pass 2 1 2 18.4 → 18.5 (+0%) — none
steamdeck ✅ pass 1 1 32.6 → 31.9 (−2%) — none

Couldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.

  • linux+radv, report 2: the pr runtime failed (exit 1): File "<data>/longshot/scripts/dev.py", line 70, in <module>
What was tested

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

On Windows RX 9070 XT, Linux RADV and Steam Deck, this plan compares three runs per side through Kokiri Forest and Hyrule Field, including still images and traversal frame times. It takes roughly 35 minutes per tester and fails on a crash, a substantial still-image difference, or a frame-time regression over 15%. No Steam Deck is listed online, so that target will wait for a tester. The requested post-fight fence sweep cannot be reached with the farm’s saves and teleports, so these runs do not establish whether the reported artifact is fixed. No tester online now matches steamdeck: that target waits for one.

  • Where: windows+amd+gpu-rx-9070-xt (GPU "rx 9070 xt", 1-2 reports), linux+radv (1-2 reports), steamdeck (1-2 reports).
  • outdoor-traversal: from the repository's save kokiri-start, then teleport to Kokiri Forest, take the picture kokiri-still to compare with main, move the stick, measure kokiri for 30 s (after 10 s warm-up), teleport to Hyrule Field, take the picture field-still to compare with main, measure field for 30 s (after 10 s warm-up); 3 runs on each side.
  • Measured: crashes, frame times, stutters and hitches.
  • The PR fails if: it crashes; or a picture differs from main by more than 20%; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main.
  • Time: about 39 min of game runs per tester (6 game starts), plus the two builds.
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 (RADV GFX1201), 26.0.8 AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+igpu AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8 AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM
Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 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 @ 01d6878 After: this PR @ d96bb10
outdoor-traversal · field · frame time (p99) (ms) 18.4 18.5 (+0%)
outdoor-traversal · kokiri · frame time (p99) (ms) 18.5 18.6 (+1%)
outdoor-traversal · field · frame time (worst 1%) (ms) 19.4 20.3 (+4%)
outdoor-traversal · kokiri · frame time (worst 1%) (ms) 20.4 20.3 (−0%)

Flags and settings

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

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 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+igpu `AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8` `AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM`  
Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 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 @ 01d6878 | After: this PR @ d96bb10 |
|---|---|---|
| outdoor-traversal · field · frame time (p99) (ms) | 18.4 | 18.5 (+0%) |
| outdoor-traversal · kokiri · frame time (p99) (ms) | 18.5 | 18.6 (+1%) |
| outdoor-traversal · field · frame time (worst 1%) (ms) | 19.4 | 20.3 (+4%) |
| outdoor-traversal · kokiri · frame time (worst 1%) (ms) | 20.4 | 20.3 (−0%) |

**Flags and settings**

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

Verdict: pass on steamdeck (1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 12 GB RAM
Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 01d6878 After: this PR @ d96bb10
outdoor-traversal · field · frame time (p99) (ms) 32.6 31.9 (−2%)
outdoor-traversal · kokiri · frame time (p99) (ms) 34.5 34.5 (−0%)
outdoor-traversal · field · frame time (worst 1%) (ms) 36.1 36.3 (+1%)
outdoor-traversal · kokiri · frame time (worst 1%) (ms) 38.8 37.9 (−2%)

Flags and settings

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

As Markdown for the PR description:

## Measurements

**Verdict:** pass on steamdeck (1 report): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`  
Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 s after 10 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 01d6878 | After: this PR @ d96bb10 |
|---|---|---|
| outdoor-traversal · field · frame time (p99) (ms) | 32.6 | 31.9 (−2%) |
| outdoor-traversal · kokiri · frame time (p99) (ms) | 34.5 | 34.5 (−0%) |
| outdoor-traversal · field · frame time (worst 1%) (ms) | 36.1 | 36.3 (+1%) |
| outdoor-traversal · kokiri · frame time (worst 1%) (ms) | 38.8 | 37.9 (−2%) |

**Flags and settings**

None: the plan varied no setting, switch or build option.
The testers' hardware
Target Report Ran on
linux+radv 1 linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.0.8 AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM
linux+radv 2 linux+amd+radv+igpu AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8 AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM
steamdeck 1 linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 12 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>d96bb10</code>, run 2 (the newer results are in a comment below)</summary> Commit `d96bb10` · approved by llun (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2796) ⚠️ **Note:** The farm has no post-Phantom-Ganon save or boss-room teleport, so it cannot test the fence sweep or nearby camera fade; the Forest Temple teleport is not the fight aftermath. ⚠️ **Note:** FSR 4 is not enabled: its SDK build requires every target to be Windows with the FSR 4 license, which would exclude the requested Linux runs. ⚠️ **Note:** The still shots compare against main before movement; traversal after movement is timed but cannot be reliably image-diffed, and the brief walks do not cover either area exhaustively. Started at 11:51 UTC. Run 2: re-planned by llun. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows+amd+gpu-rx-9070-xt` (GPU "rx 9070 xt") | ⏳ queued | 0 of 1 | — | — | — | | `linux+radv` | ✅ pass | 2 [1](https://beanstalk.magicbean.dev/reports/rp_b2c9ba5360bac057) [2](https://beanstalk.magicbean.dev/reports/rp_e323fd05f296d448) | 18.4 → 18.5 (+0%) | — | none | | `steamdeck` | ✅ pass | 1 [1](https://beanstalk.magicbean.dev/reports/rp_648b122b091050e6) | 32.6 → 31.9 (−2%) | — | none | **Couldn't be judged**: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own. - `linux+radv`, [report 2](https://beanstalk.magicbean.dev/reports/rp_e323fd05f296d448): `the pr runtime failed (exit 1): File "<data>/longshot/scripts/dev.py", line 70, in <module>` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) On Windows RX 9070 XT, Linux RADV and Steam Deck, this plan compares three runs per side through Kokiri Forest and Hyrule Field, including still images and traversal frame times. It takes roughly 35 minutes per tester and fails on a crash, a substantial still-image difference, or a frame-time regression over 15%. No Steam Deck is listed online, so that target will wait for a tester. The requested post-fight fence sweep cannot be reached with the farm’s saves and teleports, so these runs do not establish whether the reported artifact is fixed. No tester online now matches steamdeck: that target waits for one. - **Where:** windows+amd+gpu-rx-9070-xt (GPU "rx 9070 xt", 1-2 reports), linux+radv (1-2 reports), steamdeck (1-2 reports). - **outdoor-traversal:** from the repository's save `kokiri-start`, then teleport to Kokiri Forest, take the picture kokiri-still to compare with main, move the stick, measure kokiri for 30 s (after 10 s warm-up), teleport to Hyrule Field, take the picture field-still to compare with main, measure field for 30 s (after 10 s warm-up); 3 runs on each side. - **Measured:** crashes, frame times, stutters and hitches. - **The PR fails if:** it crashes; or a picture differs from main by more than 20%; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main. - **Time:** about 39 min of game runs per tester (6 game starts), plus the two builds. </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 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+igpu `AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8` `AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM` Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 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 @ 01d6878 | After: this PR @ d96bb10 | |---|---|---| | outdoor-traversal · field · frame time (p99) (ms) | 18.4 | 18.5 (+0%) | | outdoor-traversal · kokiri · frame time (p99) (ms) | 18.5 | 18.6 (+1%) | | outdoor-traversal · field · frame time (worst 1%) (ms) | 19.4 | 20.3 (+4%) | | outdoor-traversal · kokiri · frame time (worst 1%) (ms) | 20.4 | 20.3 (−0%) | **Flags and settings** None: the plan varied no setting, switch or build option. 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 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+igpu `AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8` `AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM` Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 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 @ 01d6878 | After: this PR @ d96bb10 | |---|---|---| | outdoor-traversal · field · frame time (p99) (ms) | 18.4 | 18.5 (+0%) | | outdoor-traversal · kokiri · frame time (p99) (ms) | 18.5 | 18.6 (+1%) | | outdoor-traversal · field · frame time (worst 1%) (ms) | 19.4 | 20.3 (+4%) | | outdoor-traversal · kokiri · frame time (worst 1%) (ms) | 20.4 | 20.3 (−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:** pass on steamdeck (1 report): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM` Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 s after 10 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 01d6878 | After: this PR @ d96bb10 | |---|---|---| | outdoor-traversal · field · frame time (p99) (ms) | 32.6 | 31.9 (−2%) | | outdoor-traversal · kokiri · frame time (p99) (ms) | 34.5 | 34.5 (−0%) | | outdoor-traversal · field · frame time (worst 1%) (ms) | 36.1 | 36.3 (+1%) | | outdoor-traversal · kokiri · frame time (worst 1%) (ms) | 38.8 | 37.9 (−2%) | **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on steamdeck (1 report): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM` Scene: outdoor-traversal, from the repository's save kokiri-start; each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); outdoor-traversal: 3 game starts a side, kokiri 30 s after 10 s warm-up, field 30 s after 10 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 01d6878 | After: this PR @ d96bb10 | |---|---|---| | outdoor-traversal · field · frame time (p99) (ms) | 32.6 | 31.9 (−2%) | | outdoor-traversal · kokiri · frame time (p99) (ms) | 34.5 | 34.5 (−0%) | | outdoor-traversal · field · frame time (worst 1%) (ms) | 36.1 | 36.3 (+1%) | | outdoor-traversal · kokiri · frame time (worst 1%) (ms) | 38.8 | 37.9 (−2%) | **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_b2c9ba5360bac057) | linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.0.8` `AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM` | | `linux+radv` | [2](https://beanstalk.magicbean.dev/reports/rp_e323fd05f296d448) | linux+amd+radv+igpu `AMD Radeon 760M Graphics (RADV PHOENIX), 26.0.8` `AMD Ryzen 5 230 w/ Radeon 760M Graphics, 16 GB RAM` | | `steamdeck` | [1](https://beanstalk.magicbean.dev/reports/rp_648b122b091050e6) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM` | </details> </details>
Author
Member
@review
BeanBot requested changes 2026-11-29 11:44:38 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The reported RTX 5080 run shows the fence staying in the fog while nearby camera fade still works. The change affects fragment programs throughout the game, and the required AMD, Linux and Steam Deck runs have not yet established its behavior there. (It stands on L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.)

Reads the fragment program's early-test flag and emits the Vulkan execution mode for both vertex and mesh pipelines, fixing the reported camera-fade artifact on the tested system. It adds a kill switch and a game-free check; the wider graphics impact remains to be tested.

Blocking (2): must change before merging.

  1. L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.
  2. L6: The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on this head and passes on the base branch: Failing after 3m57s.

Nits (1): optional.

  • L4: The measurements say p99 is as good or better with the fix, but the displayed Deku Tree p99 median is worse. When: The listed p99 runs have a median of 6.97 ms before and 7.37 ms after, approximately 5.7% higher, despite overlapping spreads. Do: Correct the verdict to describe the p99 results and their spread without claiming they are all as good or better.

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

  • L1 gpu/vk/vk_shader.cpp:1789: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. (more on the line) Do: Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off.
  • L2 gpu/vk/vk_shader.cpp:2005: RADV and Steam Deck have not been tested with the changed fragment execution mode. (more on the line) Do: Run the boss-room sweep and representative traversal on RADV and Steam Deck, comparing with the switch off.
  • L3 gpu/vk/vk_shader.cpp:1789: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. (more on the line) Do: Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off.

@fix can do L4, L5 and L6.

Checks: Still running: 5 checks.

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

Does it help: Yes, on the reported Windows RTX 5080 run: faded fence draws fell from 6–14 at the broken pitches to zero across the 12-step sweep, while nearby fence fade matched on both sides. The timing runs overlap, although the reported Deku Tree median p99 rose from 6.97 to 7.37 ms; they do not establish a performance gain or loss.

Other systems: The execution mode changes vertex and mesh fragment pipelines, including mesh fallback, on every GPU and OS. Windows AMD, Linux NVIDIA, Linux RADV and Steam Deck have no reported runs; other areas can use the 748 affected programs. The program cache stamp includes the switch, and the translator source contributes to the cache version.

Switches: RX_VK_EARLY_FRAGMENT_TESTS is new and defaults on; 0 restores the previous translation and uses a separate cache stamp. The default fixes the tested NVIDIA case, but its behavior on the other affected Tier 1 systems remains unverified. It has a switches.def row.

Reviewed: d96bb1061c against 01d6878b3f: Read AGENTS.md, CONTRIBUTING.md, the pull request template, relevant standards, the complete diff, commit messages, and the new test in full. Read the changed shader code, its parsing, translation, cache and SPIR-V emission context; skimmed the rest of vk_shader.cpp and switches.def because their full output was truncated. docs/review-checklist.md was absent. Read the supplied description, comments and CI results; screenshots themselves were not accessible.; nothing run (a code review).

Checked and fine:

  • The flag is read only for fragment stages, and depth-writing programs are excluded.
  • Both vertex and mesh translation paths set force_early_z; the SPIR-V backend emits EarlyFragmentTests.
  • The test clears the new switch from its environment and checks both switch states; both commits record AI assistance.
  • No game-derived files, generated shader headers, renderer API changes, or third-party changes appear in the diff.

Testing: No code or tests were run, as required for this review. The author reports an in-game Windows NVIDIA comparison and game-free checks; CI has two head-only failures and several checks still running, which are not restated as review items.

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


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

**Recommendation: Request changes.** The reported RTX 5080 run shows the fence staying in the fog while nearby camera fade still works. The change affects fragment programs throughout the game, and the required AMD, Linux and Steam Deck runs have not yet established its behavior there. (It stands on L5: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s.) Reads the fragment program's early-test flag and emits the Vulkan execution mode for both vertex and mesh pipelines, fixing the reported camera-fade artifact on the tested system. It adds a kill switch and a game-free check; the wider graphics impact remains to be tested. **Blocking (2)**: must change before merging. 1. **L5**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s. 2. **L6**: The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on this head and passes on the base branch: Failing after 3m57s. **Nits (1)**: optional. - **L4**: The measurements say p99 is as good or better with the fix, but the displayed Deku Tree p99 median is worse. *When:* The listed p99 runs have a median of 6.97 ms before and 7.37 ms after, approximately 5.7% higher, despite overlapping spreads. **Do:** Correct the verdict to describe the p99 results and their spread without claiming they are all as good or better. **Testing before merging (3)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/vk_shader.cpp:1789`: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. (more on the line) **Do:** Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off. - **L2** `gpu/vk/vk_shader.cpp:2005`: RADV and Steam Deck have not been tested with the changed fragment execution mode. (more on the line) **Do:** Run the boss-room sweep and representative traversal on RADV and Steam Deck, comparing with the switch off. - **L3** `gpu/vk/vk_shader.cpp:1789`: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. (more on the line) **Do:** Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off. `@fix` can do L4, L5 and L6. **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes, on the reported Windows RTX 5080 run: faded fence draws fell from 6–14 at the broken pitches to zero across the 12-step sweep, while nearby fence fade matched on both sides. The timing runs overlap, although the reported Deku Tree median p99 rose from 6.97 to 7.37 ms; they do not establish a performance gain or loss. **Other systems:** The execution mode changes vertex and mesh fragment pipelines, including mesh fallback, on every GPU and OS. Windows AMD, Linux NVIDIA, Linux RADV and Steam Deck have no reported runs; other areas can use the 748 affected programs. The program cache stamp includes the switch, and the translator source contributes to the cache version. **Switches:** RX_VK_EARLY_FRAGMENT_TESTS is new and defaults on; 0 restores the previous translation and uses a separate cache stamp. The default fixes the tested NVIDIA case, but its behavior on the other affected Tier 1 systems remains unverified. It has a switches.def row. **Reviewed:** d96bb1061ccb against 01d6878b3f14: Read AGENTS.md, CONTRIBUTING.md, the pull request template, relevant standards, the complete diff, commit messages, and the new test in full. Read the changed shader code, its parsing, translation, cache and SPIR-V emission context; skimmed the rest of vk_shader.cpp and switches.def because their full output was truncated. docs/review-checklist.md was absent. Read the supplied description, comments and CI results; screenshots themselves were not accessible.; nothing run (a code review). **Checked and fine:** - The flag is read only for fragment stages, and depth-writing programs are excluded. - Both vertex and mesh translation paths set force_early_z; the SPIR-V backend emits EarlyFragmentTests. - The test clears the new switch from its environment and checks both switch states; both commits record AI assistance. - No game-derived files, generated shader headers, renderer API changes, or third-party changes appear in the diff. **Testing:** No code or tests were run, as required for this review. The author reports an in-game Windows NVIDIA comparison and game-free checks; CI has two head-only failures and several checks still running, which are not restated as review items. **Overlaps and merge order:** Not checked; 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>
@ -1760,6 +1786,7 @@ void translate_into(Program& p, const NvnState& s, const Code* vsc, const Code*
p.stages.push_back(std::move(v));
if (fs) {
frt.previous_stage_stores = vs->program.info.stores;
frt.force_early_z = fragment_tests_early(*fsc, fs->program.info.stores_frag_depth);
Member

L1 (should fix): The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run.

When: On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown.

Do: Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off.

**L1** (should fix): The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. *When:* On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. **Do:** Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off.
Member

L3 (should fix): Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode.

When: A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack.

Do: Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off.

**L3** (should fix): Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. *When:* A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. **Do:** Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off.
@ -1975,6 +2002,7 @@ void translate_mesh_into(Program& p, const NvnState& s, const Code* task, const
Shader::RuntimeInfo frt{};
// (what the mesh program stores, and its per-primitive generics: Eden's MakeRuntimeInfo)
frt.previous_stage_stores = mesh_t->program.info.stores;
frt.force_early_z = fragment_tests_early(*fsc, fs->program.info.stores_frag_depth);
Member

L2 (should fix): RADV and Steam Deck have not been tested with the changed fragment execution mode.

When: Linux AMD and Deck players encounter flagged fragment programs in the boss room and elsewhere, including mesh pipelines; only Windows NVIDIA behavior is reported.

Do: Run the boss-room sweep and representative traversal on RADV and Steam Deck, comparing with the switch off.

**L2** (should fix): RADV and Steam Deck have not been tested with the changed fragment execution mode. *When:* Linux AMD and Deck players encounter flagged fragment programs in the boss room and elsewhere, including mesh pipelines; only Windows NVIDIA behavior is reported. **Do:** Run the boss-room sweep and representative traversal on RADV and Steam Deck, comparing with the switch off.
Author
Member

Thanks. Where each point stands:

  • L4 (p99 wording): fixed in the description. It now says the tails go both ways within their spreads: steadier 1% lows in the Market, a higher p99 median in Inside the Deku Tree (7.37 against 6.97 ms, overlapping runs).
  • L5 (third-party and guide screenshots): not from this change. scripts/check_guide_screenshots.py --review-sources fails on main @ 01d6878b3 exactly as here (REVIEW REQUIRED: settings-graphics.png: game/oot_cheat_items.h changed since reviewed revision 3c74597e), since #2785; #2793 retains the picture. I'll rebase once it merges. check_third_party.py (whole and --base origin/main) passes here.
  • L6 (Rust): I can't read the job's log without signing in. Locally (mise run rust), cargo fmt --all --check stops at builder/crates/build-compile/src/host_sources_tests.rs:110 on this branch and on main alike, a file this change doesn't touch; nothing here touches Rust. The Website job fails too, and it reads no file this change touches. Every other open PR's Rust and Website jobs are still queued, so I'll compare against main's own run when it has one.
  • L1 to L3 (Windows AMD, RADV and the Steam Deck, Linux NVIDIA): the farm can't reach the fight's aftermath (no save or teleport there), so the fence sweep needs a tester with such a save, by hand. Its outdoor plan can still check that nothing else changes: a BigBean can ask for it with @Beanstalk test it anyway.
Thanks. Where each point stands: - **L4 (p99 wording):** fixed in the description. It now says the tails go both ways within their spreads: steadier 1% lows in the Market, a higher p99 median in Inside the Deku Tree (7.37 against 6.97 ms, overlapping runs). - **L5 (third-party and guide screenshots):** not from this change. `scripts/check_guide_screenshots.py --review-sources` fails on `main` @ `01d6878b3` exactly as here (`REVIEW REQUIRED: settings-graphics.png: game/oot_cheat_items.h changed since reviewed revision 3c74597e`), since #2785; #2793 retains the picture. I'll rebase once it merges. `check_third_party.py` (whole and `--base origin/main`) passes here. - **L6 (Rust):** I can't read the job's log without signing in. Locally (`mise run rust`), `cargo fmt --all --check` stops at `builder/crates/build-compile/src/host_sources_tests.rs:110` on this branch and on `main` alike, a file this change doesn't touch; nothing here touches Rust. The Website job fails too, and it reads no file this change touches. Every other open PR's Rust and Website jobs are still queued, so I'll compare against `main`'s own run when it has one. - **L1 to L3 (Windows AMD, RADV and the Steam Deck, Linux NVIDIA):** the farm can't reach the fight's aftermath (no save or teleport there), so the fence sweep needs a tester with such a save, by hand. Its outdoor plan can still check that nothing else changes: a BigBean can ask for it with `@Beanstalk test it anyway`.
Author
Member

On L5: #2797, which changes only Python scripts, fails the same CI / Third-party parts and guide screenshots job on the same main base, so it comes from main (#2785; fixed by #2793), not this change. #2797's Rust and Website jobs are still queued; their result will show the same for L6 and the Website job.

On L5: #2797, which changes only Python scripts, fails the same `CI / Third-party parts and guide screenshots` job on the same `main` base, so it comes from `main` (#2785; fixed by #2793), not this change. #2797's Rust and Website jobs are still queued; their result will show the same for L6 and the Website job.
Author
Member
@review
BeanBot requested changes 2026-11-29 11:56:24 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The reported RTX 5080 run shows the fence fix working while preserving the nearby camera fade. The changed shader execution mode still needs the outstanding Windows AMD, RADV, Steam Deck and Linux NVIDIA game runs. (It stands on L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.)

Programs that request early fragment tests now receive them, preventing occluded fragments from incorrectly triggering camera fade. This corrects the reported fence rendering on the tested NVIDIA system, at the cost of changing fragment execution for other programs that request early tests.

Blocking (3): must change before merging.

  1. L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.
  2. L6: The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on this head and passes on the base branch: Failing after 3m57s.
  3. L7: The check CI / Website build and checks (pull_request) fails on this head and passes on the base branch: Failing after 1m36s.

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

  • L1 gpu/vk/vk_shader.cpp:1789: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. When: On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. Do: Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off.
  • L2 gpu/vk/vk_shader.cpp:2005: RADV and Steam Deck have not been tested with the changed fragment execution mode. When: Linux AMD and Deck players encounter flagged fragment programs in the boss room and elsewhere, including mesh pipelines; only Windows NVIDIA behavior is reported. Do: Run the boss-room sweep and representative traversal on RADV and Steam Deck, comparing with the switch off.
  • L3 gpu/vk/vk_shader.cpp:1789: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. When: A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. Do: Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off.

@fix can do L5, L6 and L7.

Since the last review (on d96bb1061c)
Resolved: L4 (The measurements say p99 is as good or better with the fix, but the displayed Deku Tree p9…)
Still open: L1 (The change enables early tests across affected fragment programs on Windows AMD, where the…); L2 (RADV and Steam Deck have not been tested with the changed fragment execution mode.); L3 (Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution…); L5 (The check CI / Third-party parts and guide screenshots (pull_request) fails on this head…); L6 (The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on th…)
New: L7 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)

Checks: Still running: CI / Game-free checks (run_all.py, part 1/2) (pull_request), CI / Game-free checks (run_all.py, part 2/2) (pull_request).

Also noticed (2; not asked for, not blocking)
  • The author reports the third-party and guide screenshot failure also occurs on the base, and reports a matching local Rust formatting failure; the supplied CI status still lists those and the website check as head-only failures.
  • Intel Vulkan has no reported game run for the changed execution mode.
More: does it help, other systems, switches, what was read

Does it help: Yes for the reported fence case on Windows RTX 5080: faded fence draws fell from 6–14 to zero through the broken pitch range, while the nearby fence fade matched with the switch on and off. Performance runs overlapped on that system; they do not establish results on other hardware.

Other systems: The execution mode affects qualifying fragment programs on all Vulkan vendors and operating systems, including mesh and vertex pipelines. Windows AMD, Linux RADV, Steam Deck and Linux NVIDIA game runs remain outstanding; Intel has no reported run either.

Switches: RX_VK_EARLY_FRAGMENT_TESTS is added, default on; 0 restores the prior translation and gets a separate cache stamp. The default fixes the tested case, but cross-platform validation remains outstanding.

Reviewed: d96bb1061c against 01d6878b3f: Read the full diff and new test, the relevant shader parsing, translation, cache-stamp and SPIR-V emission sections, AGENTS.md and CONTRIBUTING.md; the rest of vk_shader.cpp and switches.def were not read in full. Comments, reported runs and CI status were reviewed; the pull request template and developer standards were not read.; nothing run (a code review).

Checked and fine:

  • Both fragment translation paths set force_early_z, and the SPIR-V backend emits EarlyFragmentTests.
  • Depth-writing programs are excluded, and disabling the switch changes the translator cache stamp.
  • The description now accurately states the displayed Deku Tree p99 result.

Testing: No commands that build or run code were executed. The author reports Windows NVIDIA game tests, a game-free test, Windows and Linux compilation, and timing runs; two game-free CI checks are still running and three checks are reported failing.

Overlaps and merge order: None identified from the supplied information.


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

**Recommendation: Request changes.** The reported RTX 5080 run shows the fence fix working while preserving the nearby camera fade. The changed shader execution mode still needs the outstanding Windows AMD, RADV, Steam Deck and Linux NVIDIA game runs. (It stands on L5: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s.) Programs that request early fragment tests now receive them, preventing occluded fragments from incorrectly triggering camera fade. This corrects the reported fence rendering on the tested NVIDIA system, at the cost of changing fragment execution for other programs that request early tests. **Blocking (3)**: must change before merging. 1. **L5**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s. 2. **L6**: The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on this head and passes on the base branch: Failing after 3m57s. 3. **L7**: The check `CI / Website build and checks (pull_request)` fails on this head and passes on the base branch: Failing after 1m36s. **Testing before merging (3)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/vk_shader.cpp:1789`: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. *When:* On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. **Do:** Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off. - **L2** `gpu/vk/vk_shader.cpp:2005`: RADV and Steam Deck have not been tested with the changed fragment execution mode. *When:* Linux AMD and Deck players encounter flagged fragment programs in the boss room and elsewhere, including mesh pipelines; only Windows NVIDIA behavior is reported. **Do:** Run the boss-room sweep and representative traversal on RADV and Steam Deck, comparing with the switch off. - **L3** `gpu/vk/vk_shader.cpp:1789`: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. *When:* A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. **Do:** Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off. `@fix` can do L5, L6 and L7. **Since the last review** (on d96bb1061ccb) Resolved: L4 (The measurements say p99 is as good or better with the fix, but the displayed Deku Tree p9…) Still open: L1 (The change enables early tests across affected fragment programs on Windows AMD, where the…); L2 (RADV and Steam Deck have not been tested with the changed fragment execution mode.); L3 (Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution…); L5 (The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head…); L6 (The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on th…) New: L7 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) **Checks:** Still running: `CI / Game-free checks (run_all.py, part 1/2) (pull_request)`, `CI / Game-free checks (run_all.py, part 2/2) (pull_request)`. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The author reports the third-party and guide screenshot failure also occurs on the base, and reports a matching local Rust formatting failure; the supplied CI status still lists those and the website check as head-only failures. - Intel Vulkan has no reported game run for the changed execution mode. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported fence case on Windows RTX 5080: faded fence draws fell from 6–14 to zero through the broken pitch range, while the nearby fence fade matched with the switch on and off. Performance runs overlapped on that system; they do not establish results on other hardware. **Other systems:** The execution mode affects qualifying fragment programs on all Vulkan vendors and operating systems, including mesh and vertex pipelines. Windows AMD, Linux RADV, Steam Deck and Linux NVIDIA game runs remain outstanding; Intel has no reported run either. **Switches:** RX_VK_EARLY_FRAGMENT_TESTS is added, default on; 0 restores the prior translation and gets a separate cache stamp. The default fixes the tested case, but cross-platform validation remains outstanding. **Reviewed:** d96bb1061ccb against 01d6878b3f14: Read the full diff and new test, the relevant shader parsing, translation, cache-stamp and SPIR-V emission sections, AGENTS.md and CONTRIBUTING.md; the rest of vk_shader.cpp and switches.def were not read in full. Comments, reported runs and CI status were reviewed; the pull request template and developer standards were not read.; nothing run (a code review). **Checked and fine:** - Both fragment translation paths set force_early_z, and the SPIR-V backend emits EarlyFragmentTests. - Depth-writing programs are excluded, and disabling the switch changes the translator cache stamp. - The description now accurately states the displayed Deku Tree p99 result. **Testing:** No commands that build or run code were executed. The author reports Windows NVIDIA game tests, a game-free test, Windows and Linux compilation, and timing runs; two game-free CI checks are still running and three checks are reported failing. **Overlaps and merge order:** None identified from the supplied information. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

On L6 (Rust): main fails it too. main's builder/crates/build-compile/src/host_sources_tests.rs, as committed (LF), fails rustfmt --check --edition 2024 with the repository's rustfmt.toml and the pinned toolchain (rustfmt 1.10.0) at line 110, so every pull request that changes code fails this job until it is formatted. #2794, #2748 and #2506 note the same line. Locally, clippy (-D warnings) passes on this branch and on main, and cargo test stops at the same test on both (matches_llvm_mc, no llvm-mc on this PC). This change touches no Rust.

On L7 (Website): scripts/website_check.sh builds the site from website/ and public forge data, and this change touches neither. main's own CI run for 01d6878b3 is still queued; I'll compare once it has run.

On L6 (Rust): `main` fails it too. `main`'s `builder/crates/build-compile/src/host_sources_tests.rs`, as committed (LF), fails `rustfmt --check --edition 2024` with the repository's `rustfmt.toml` and the pinned toolchain (rustfmt 1.10.0) at line 110, so every pull request that changes code fails this job until it is formatted. #2794, #2748 and #2506 note the same line. Locally, clippy (`-D warnings`) passes on this branch and on `main`, and `cargo test` stops at the same test on both (`matches_llvm_mc`, no llvm-mc on this PC). This change touches no Rust. On L7 (Website): `scripts/website_check.sh` builds the site from `website/` and public forge data, and this change touches neither. `main`'s own CI run for `01d6878b3` is still queued; I'll compare once it has run.
Author
Member

The three failing jobs are main's, from the jobs' logs on this head (the same on #2796, #2797 and #2799):

  • Third-party and guide screenshots: REVIEW REQUIRED: settings-graphics.png: game/oot_cheat_items.h changed since reviewed revision 3c74597e, since #2785; #2793 fixes it.
  • Rust: two steps.
    • rustfmt: Diff in …/builder/crates/build-compile/src/host_sources_tests.rs:110.
    • The synthetic game end to end: the game folder has no image.bin (end_to_end.rs:396), a test that predates the organized game folder.
    • #2799 fixes both. On #2799's head, rustfmt, clippy and cargo test already pass.
  • Website: /settings/: game branding remains in published text, from #2779's Debug-tab paragraph in docs/user/graphics-and-controls.md; #2799 rewords it, and scripts/website_check.sh passes with it locally.

This pull request changes none of those files. Once #2793 and #2799 merge, I'll rebase it so its checks run on the fixed main.

The three failing jobs are `main`'s, from the jobs' logs on this head (the same on #2796, #2797 and #2799): - **Third-party and guide screenshots:** `REVIEW REQUIRED: settings-graphics.png: game/oot_cheat_items.h changed since reviewed revision 3c74597e`, since #2785; #2793 fixes it. - **Rust:** two steps. - `rustfmt`: `Diff in …/builder/crates/build-compile/src/host_sources_tests.rs:110`. - The synthetic game end to end: `the game folder has no image.bin` (`end_to_end.rs:396`), a test that predates the organized game folder. - #2799 fixes both. On #2799's head, rustfmt, clippy and `cargo test` already pass. - **Website:** `/settings/: game branding remains in published text`, from #2779's Debug-tab paragraph in `docs/user/graphics-and-controls.md`; #2799 rewords it, and `scripts/website_check.sh` passes with it locally. This pull request changes none of those files. Once #2793 and #2799 merge, I'll rebase it so its checks run on the fixed `main`.
futondestroyer left a comment

Recommendation: Request changes. The fence fix has a direct visual result. Measure the shader rebuild and cache cost that this change introduces on first start.

The shader source stamp changes, so existing installations can have to translate and prepare shaders again. Risks calls that out, but the evidence covers warmed gameplay. Please report first-start time and cache size on main and this head, including the first launch of an existing installation with its main cache. If reporting warmed Kokiri performance, use a fixed turf state with enough runs on both sides to report spread.

Source review found the new early-test behavior in live and preparation paths, with the depth-writing safeguard and cache identity split. Outdoor Farm evidence is useful. Matching RADV Hyrule Field p99 was 18.4 to 18.5 ms and Deck was 32.6 to 31.9 ms. The Farm did not exercise the Forest Temple boss-room fence. The Windows AMD run and a manual route through the affected room remain open.

Reviewed d96bb1061ccbde5d35b796701664fdbbf881843c against 01d6878b. Both renderer compile jobs and the new fixture passed. All 31 named game-free failures also occur on disjoint same-base PRs #2793, #2797, and #2799. Guide, Rust and Website failures have shared causes. PR evidence · CI

**Recommendation: Request changes.** The fence fix has a direct visual result. Measure the shader rebuild and cache cost that this change introduces on first start. The shader source stamp changes, so existing installations can have to translate and prepare shaders again. Risks calls that out, but the evidence covers warmed gameplay. Please report first-start time and cache size on main and this head, including the first launch of an existing installation with its main cache. If reporting warmed Kokiri performance, use a fixed turf state with enough runs on both sides to report spread. Source review found the new early-test behavior in live and preparation paths, with the depth-writing safeguard and cache identity split. Outdoor Farm evidence is useful. Matching RADV Hyrule Field p99 was 18.4 to 18.5 ms and Deck was 32.6 to 31.9 ms. The Farm did not exercise the Forest Temple boss-room fence. The Windows AMD run and a manual route through the affected room remain open. Reviewed `d96bb1061ccbde5d35b796701664fdbbf881843c` against `01d6878b`. Both renderer compile jobs and the new fixture passed. All 31 named game-free failures also occur on disjoint same-base PRs #2793, #2797, and #2799. Guide, Rust and Website failures have shared causes. [PR evidence](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2796) · [CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57512)
@ -1499,2 +1520,4 @@
add(&no_sim_turf, sizeof no_sim_turf);
}
// (and early fragment tests left out, RX_VK_EARLY_FRAGMENT_TESTS=0: only then, so the default keeps one cache)
if (!early_fragment_tests_on()) {
Member

[P2] This changes a source file that feeds the translator stamp. Please measure cold and warm preparation, the first upgrade launch with a warm main cache, and the resulting cache size. The warmed gameplay runs do not measure this first-start cost.

[P2] This changes a source file that feeds the translator stamp. Please measure cold and warm preparation, the first upgrade launch with a warm main cache, and the resulting cache size. The warmed gameplay runs do not measure this first-start cost.
llun force-pushed fix/early-fragment-tests from d96bb1061c
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m2s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m57s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m16s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m38s
CI / Website build and checks (pull_request) Failing after 1m36s
PR description / Title and description (pull_request_target) Successful in 8s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 16m39s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 37m9s
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+amd+gpu-rx-9070-xt 0/1 pass, 0 running, 2 queued
beanstalk/linux+radv 1/1 pass
beanstalk/steamdeck 1/1 pass
to 6dd8c7f96f
Some checks failed
CI / What the change needs (pull_request) Successful in 21s
CI / Third-party parts and guide screenshots (pull_request) Failing after 29s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 31s
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 7s
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-11-29 17:19:29 +00:00
Compare
Author
Member

Thanks @futondestroyer. Both points are measured or fixed now, and the branch is rebased onto main @ 01539efd2 (the same two commits).

First-start cost, measured (the full tables are in the description, under Measurements, First start after the update):

  • What ran: longshot-builder dev prepare --compile-shaders most, which is what a build or an update runs before the first start, on two runtimes on the same base: main @ 01539efd2 and this branch @ 6dd8c7f96. That's 16 runs through the queue in timing mode on the RTX 5080.
  • Isolation: each state had its own cache/, its own SPIR-V store and its own NVIDIA cache, so nothing came from this PC's caches.
Seconds per run main This PR
Cold (268,075 entries, all built) 462.9, 391.9, 383.9 404.0, 386.8, 389.5
Warm (164,674 entries) 113.0, 110.0 114.9, 111.5
Upgrade: this PR over main's prepared caches 219.8, 263.6, then warm 109.0, 117.4
Control: that upgrade with RX_VK_EARLY_FRAGMENT_TESTS=0 (a new stamp, main's SPIR-V) 261.1, 210.8
  • The upgrade costs one preparation of 220 to 264 s instead of about 110 s. That's the translator stamp's cost, not the early tests': the control, whose SPIR-V is main's, overlaps it at 211 to 261 s. Any code change to vk_shader.cpp brings the same (docs/dev/developing.md, The shader preparation). In the build's own path, with the shared store and NVIDIA cache a player's update uses, this branch's runtime prepared over main's caches in about 2 minutes.
  • Cold and warm are the same on both sides. A new installation's first preparation is 384 to 404 s either way.
  • Sizes:
    • cache/ is 2.54 GB on both sides and stays 2.54 GB after the upgrade (the pipeline cache within 7 MB).
    • The SPIR-V store is 3.85 GB on both sides. The upgrade adds 0.17 GB (the control adds 0.15 GB), as the new stamp's programs go in beside main's.
    • NVIDIA's cache is 1.08 GB after a cold run, 1.33 GB warm, and grows by 5 to 9 MB with the upgrade.

Kokiri: I took Kokiri Forest out of the frame-rate table instead of reporting it from one or two runs per turf state. The description says why and what measuring it again needs (a fixed turf state on both sides and more runs). The three scenes left are as they were.

The Windows AMD run and the manual route through the boss room are still open, as you noted. They're the Beanstalk requests in Still to test.

Thanks @futondestroyer. Both points are measured or fixed now, and the branch is rebased onto `main` @ `01539efd2` (the same two commits). **First-start cost, measured** (the full tables are in the description, under Measurements, *First start after the update*): - **What ran:** `longshot-builder dev prepare --compile-shaders most`, which is what a build or an update runs before the first start, on two runtimes on the same base: `main` @ `01539efd2` and this branch @ `6dd8c7f96`. That's 16 runs through the queue in `timing` mode on the RTX 5080. - **Isolation:** each state had its own `cache/`, its own SPIR-V store and its own NVIDIA cache, so nothing came from this PC's caches. | Seconds per run | `main` | This PR | |---|---|---| | Cold (268,075 entries, all built) | 462.9, 391.9, 383.9 | 404.0, 386.8, 389.5 | | Warm (164,674 entries) | 113.0, 110.0 | 114.9, 111.5 | | Upgrade: this PR over `main`'s prepared caches | | 219.8, 263.6, then warm 109.0, 117.4 | | Control: that upgrade with `RX_VK_EARLY_FRAGMENT_TESTS=0` (a new stamp, `main`'s SPIR-V) | | 261.1, 210.8 | - **The upgrade costs one preparation of 220 to 264 s instead of about 110 s.** That's the translator stamp's cost, not the early tests': the control, whose SPIR-V is `main`'s, overlaps it at 211 to 261 s. Any code change to `vk_shader.cpp` brings the same (`docs/dev/developing.md`, *The shader preparation*). In the build's own path, with the shared store and NVIDIA cache a player's update uses, this branch's runtime prepared over `main`'s caches in about 2 minutes. - **Cold and warm are the same on both sides.** A new installation's first preparation is 384 to 404 s either way. - **Sizes:** - `cache/` is 2.54 GB on both sides and stays 2.54 GB after the upgrade (the pipeline cache within 7 MB). - The SPIR-V store is 3.85 GB on both sides. The upgrade adds 0.17 GB (the control adds 0.15 GB), as the new stamp's programs go in beside `main`'s. - NVIDIA's cache is 1.08 GB after a cold run, 1.33 GB warm, and grows by 5 to 9 MB with the upgrade. **Kokiri:** I took Kokiri Forest out of the frame-rate table instead of reporting it from one or two runs per turf state. The description says why and what measuring it again needs (a fixed turf state on both sides and more runs). The three scenes left are as they were. The Windows AMD run and the manual route through the boss room are still open, as you noted. They're the Beanstalk requests in Still to test.
llun force-pushed fix/early-fragment-tests from 6dd8c7f96f
Some checks failed
CI / What the change needs (pull_request) Successful in 21s
CI / Third-party parts and guide screenshots (pull_request) Failing after 29s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 31s
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 7s
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 043ba24332
Some checks failed
CI / What the change needs (pull_request) Successful in 30s
CI / Third-party parts and guide screenshots (pull_request) Failing after 41s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 31s
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 9s
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-11-29 18:43:00 +00:00
Compare
Author
Member

Rebased onto main @ 6b0f7b151: the same two commits, no conflicts. The numbers in Measurements still hold.

  • Frame rates: they were measured on 01d6878b3. Since then main has changed the menu (a 45 FPS cap row, #1585), the keyboard policy (#152), the Deck's IMU (#2802), Linux window hints (#2803), the icons (#2782) and the profiler's stack walk (#2790); none of them is in the draw path. The runs were uncapped at the defaults, so none of these rows was in play.
  • Shader preparation: it was measured on 01539efd2. #2765 changes the preparation only for Native HDR with PsychoV35. These runs used the defaults, without HDR.
Rebased onto `main` @ `6b0f7b151`: the same two commits, no conflicts. The numbers in Measurements still hold. - **Frame rates:** they were measured on `01d6878b3`. Since then `main` has changed the menu (a 45 FPS cap row, #1585), the keyboard policy (#152), the Deck's IMU (#2802), Linux window hints (#2803), the icons (#2782) and the profiler's stack walk (#2790); none of them is in the draw path. The runs were uncapped at the defaults, so none of these rows was in play. - **Shader preparation:** it was measured on `01539efd2`. #2765 changes the preparation only for Native HDR with PsychoV35. These runs used the defaults, without HDR.
Author
Member
@review
Owner
@review
HumanBean approved these changes 2026-11-29 18:46:02 +00:00
Dismissed
BeanBot requested changes 2026-11-29 18:46:08 +00:00
Dismissed
BeanBot left a comment

Recommendation: Request changes. The fence fix is demonstrated on Windows NVIDIA, and outdoor RADV and Steam Deck runs show similar frame-time tails. Windows AMD and Linux NVIDIA game runs remain outstanding for a shader change that affects Tier 1 hardware. (It stands on L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.)

The change honors the game's early-fragment-test request, preventing occluded fence fragments from incorrectly triggering camera fade. It adds a diagnostic kill switch and causes a one-time shader preparation after update.

Blocking (1): must change before merging.

  1. L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.

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

  • L1 gpu/vk/vk_shader.cpp:1789: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. When: On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. Do: Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off.
  • L3 gpu/vk/vk_shader.cpp:1789: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. When: A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. Do: Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off.

@fix can do L5.

Since the last review (on d96bb1061c)
Resolved: L2 (RADV and Steam Deck have not been tested with the changed fragment execution mode.)
Still open: L1 (The change enables early tests across affected fragment programs on Windows AMD, where the…); L3 (Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution…); L5 (The check CI / Third-party parts and guide screenshots (pull_request) fails on this head…); L6 (The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on th…); L7 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)

Checks: Still running: 7 checks.

Also noticed (2; not asked for, not blocking)
  • The RADV and Steam Deck outdoor runs did not exercise the affected boss room.
  • The guide-screenshot check is reported as failing on this head; the supplied CI status lists it as head-only, while the comments attribute the same failure to the base.
More: does it help, other systems, switches, what was read

Does it help: Yes. On an RTX 5080, the reported pitch sweep had 6–14 faded fence draws at broken pitches with the switch off and zero with the fix; a nearby fence still faded on both sides. Gameplay timing runs overlapped, while upgrade preparation took 220–264 seconds versus approximately 110 seconds warm.

Other systems: The execution mode applies to requesting fragment programs in both vertex and mesh translation paths, including shader preparation. Reported outdoor RADV and Steam Deck runs had comparable Hyrule Field p99 frame times, but did not cover the boss room; Windows AMD and Linux NVIDIA runs remain outstanding. CI reports one head-only failure and several jobs still running.

Switches: RX_VK_EARLY_FRAGMENT_TESTS is added, default on; setting it to 0 restores the previous translation and uses a separate program-cache stamp. The default fixes the reported issue on Windows NVIDIA; its behavior on the remaining Tier 1 systems still needs testing.

Reviewed: 043ba24332 against 6b0f7b151c: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, the full diff, commit messages and the new test. Reviewed the changed shader paths and their call sites; the full shader and switch-table output was truncated, so those files were only skimmed. No review checklist was present.; nothing run (a code review).

Checked and fine:

  • Both fragment translation paths set force_early_z and exclude depth-writing programs.
  • The switch-off state is included in the translator stamp.
  • The reported test covers both switch states and both translation paths.

Testing: No commands that execute project code or tests were run. Await Windows AMD and Linux NVIDIA game runs and the remaining CI results.

Overlaps and merge order: The comments identify #2793 and #2799 as fixes for shared CI failures; their current merge status is not established.


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

**Recommendation: Request changes.** The fence fix is demonstrated on Windows NVIDIA, and outdoor RADV and Steam Deck runs show similar frame-time tails. Windows AMD and Linux NVIDIA game runs remain outstanding for a shader change that affects Tier 1 hardware. (It stands on L5: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s.) The change honors the game's early-fragment-test request, preventing occluded fence fragments from incorrectly triggering camera fade. It adds a diagnostic kill switch and causes a one-time shader preparation after update. **Blocking (1)**: must change before merging. 1. **L5**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/vk_shader.cpp:1789`: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. *When:* On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. **Do:** Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off. - **L3** `gpu/vk/vk_shader.cpp:1789`: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. *When:* A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. **Do:** Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off. `@fix` can do L5. **Since the last review** (on d96bb1061ccb) Resolved: L2 (RADV and Steam Deck have not been tested with the changed fragment execution mode.) Still open: L1 (The change enables early tests across affected fragment programs on Windows AMD, where the…); L3 (Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution…); L5 (The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head…); L6 (The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on th…); L7 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) **Checks:** Still running: 7 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The RADV and Steam Deck outdoor runs did not exercise the affected boss room. - The guide-screenshot check is reported as failing on this head; the supplied CI status lists it as head-only, while the comments attribute the same failure to the base. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. On an RTX 5080, the reported pitch sweep had 6–14 faded fence draws at broken pitches with the switch off and zero with the fix; a nearby fence still faded on both sides. Gameplay timing runs overlapped, while upgrade preparation took 220–264 seconds versus approximately 110 seconds warm. **Other systems:** The execution mode applies to requesting fragment programs in both vertex and mesh translation paths, including shader preparation. Reported outdoor RADV and Steam Deck runs had comparable Hyrule Field p99 frame times, but did not cover the boss room; Windows AMD and Linux NVIDIA runs remain outstanding. CI reports one head-only failure and several jobs still running. **Switches:** RX_VK_EARLY_FRAGMENT_TESTS is added, default on; setting it to 0 restores the previous translation and uses a separate program-cache stamp. The default fixes the reported issue on Windows NVIDIA; its behavior on the remaining Tier 1 systems still needs testing. **Reviewed:** 043ba243324e against 6b0f7b151c62: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, the full diff, commit messages and the new test. Reviewed the changed shader paths and their call sites; the full shader and switch-table output was truncated, so those files were only skimmed. No review checklist was present.; nothing run (a code review). **Checked and fine:** - Both fragment translation paths set force_early_z and exclude depth-writing programs. - The switch-off state is included in the translator stamp. - The reported test covers both switch states and both translation paths. **Testing:** No commands that execute project code or tests were run. Await Windows AMD and Linux NVIDIA game runs and the remaining CI results. **Overlaps and merge order:** The comments identify #2793 and #2799 as fixes for shared CI failures; their current merge status is not established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
Author
Member

Thanks for the reviews, @HumanBean and BeanBot.

  • L5 (third-party parts and guide screenshots): main's again, not this change's. On main @ 6b0f7b151 itself, python3 -I -B scripts/check_guide_screenshots.py --review-sources fails with Guide screenshot check failed: 8 issue(s):
    • The lines are REVIEW REQUIRED: settings-graphics.png: <file> changed since reviewed revision 01d6878b3… for gpu/vk/menu/gameplay.cpp, menu_i18n.h, vk_api.h, vk_menu.cpp and vk_menu.h.
    • #2793 recorded that review at 01d6878b3. #1585 (the 45 FPS cap row) and #152 (the keyboard policy) then changed those menu sources.
    • This pull request changes none of them. The same step fails on #2797 and #2799 with the same lines.
    • The step's other checks pass on main here (check_third_party.py, test_guide_screenshots.py, test_launcher_capture.py).
    • It needs the Graphics page reviewed again at a newer revision, as #2793 did. That's a change to docs/user/images/guide/manifest.json of its own, not part of this fix.
  • L1 (Windows AMD) and L3 (Linux NVIDIA): still open. They're in Still to test, and the Test Farm request is waiting for approval.
Thanks for the reviews, @HumanBean and BeanBot. - **L5 (third-party parts and guide screenshots): `main`'s again, not this change's.** On `main` @ `6b0f7b151` itself, `python3 -I -B scripts/check_guide_screenshots.py --review-sources` fails with `Guide screenshot check failed: 8 issue(s)`: - The lines are `REVIEW REQUIRED: settings-graphics.png: <file> changed since reviewed revision 01d6878b3…` for `gpu/vk/menu/gameplay.cpp`, `menu_i18n.h`, `vk_api.h`, `vk_menu.cpp` and `vk_menu.h`. - #2793 recorded that review at `01d6878b3`. #1585 (the 45 FPS cap row) and #152 (the keyboard policy) then changed those menu sources. - This pull request changes none of them. The same step fails on #2797 and #2799 with the same lines. - The step's other checks pass on `main` here (`check_third_party.py`, `test_guide_screenshots.py`, `test_launcher_capture.py`). - It needs the Graphics page reviewed again at a newer revision, as #2793 did. That's a change to `docs/user/images/guide/manifest.json` of its own, not part of this fix. - **L1 (Windows AMD) and L3 (Linux NVIDIA):** still open. They're in Still to test, and the Test Farm request is waiting for approval.
llun force-pushed fix/early-fragment-tests from 043ba24332
Some checks failed
CI / What the change needs (pull_request) Successful in 30s
CI / Third-party parts and guide screenshots (pull_request) Failing after 41s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 31s
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 9s
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 df203fe8d9
Some checks failed
PR description / Title and description (pull_request_target) Successful in 20s
CI / What the change needs (pull_request) Successful in 26s
CI / Third-party parts and guide screenshots (pull_request) Failing after 38s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 36s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m20s
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+amd 0/1 pass, 0 running, 0 queued
beanstalk/linux+radv 0/1 pass, 0 running, 0 queued
beanstalk/steamdeck 0/1 pass, 0 running, 0 queued
beanstalk/linux+nvidia-proprietary 0/1 pass, 0 running, 0 queued
beanstalk/windows+nvidia 0/1 pass, 0 running, 0 queued
beanstalk/intel 0/1 pass, 0 running, 0 queued
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m52s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m51s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m1s
CI / Website build and checks (pull_request) Failing after 32s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 18m44s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 30m10s
2026-11-29 18:51:49 +00:00
Compare
llun dismissed HumanBean's review 2026-11-29 18:51:49 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Author
Member

Rebased onto main @ e4801d6a5 (#2772, simulated turf around Link). There was one conflict, in translator_stamp():

  • #2772 removed the RX_VK_SIM_TURF_POOLS tag from the stamp, the block just above this pull request's.
  • The resolution keeps that removal and adds only the RX_VK_EARLY_FRAGMENT_TESTS=0 tag, as before. No other line of the fix changed.

Checks on the new head: tests/test_early_fragment_tests.py, test_program_stamp_knobs.py and test_live_shader_stage.py pass. test_switch_table.py reports only LONGSHOT_LAUNCHER_STARTUP, as on main.

About the frame rates in Measurements: #2772 changes what grassy areas draw on both sides alike. The comparison there was of the two translations in one build (the switch unset against =0), and only the 748 programs that ask for early tests differ between them. The absolute fps on today's main will differ from those runs; the difference between the sides is what they measured.

Rebased onto `main` @ `e4801d6a5` (#2772, simulated turf around Link). There was one conflict, in `translator_stamp()`: - #2772 removed the `RX_VK_SIM_TURF_POOLS` tag from the stamp, the block just above this pull request's. - The resolution keeps that removal and adds only the `RX_VK_EARLY_FRAGMENT_TESTS=0` tag, as before. No other line of the fix changed. Checks on the new head: `tests/test_early_fragment_tests.py`, `test_program_stamp_knobs.py` and `test_live_shader_stage.py` pass. `test_switch_table.py` reports only `LONGSHOT_LAUNCHER_STARTUP`, as on `main`. About the frame rates in Measurements: #2772 changes what grassy areas draw on both sides alike. The comparison there was of the two translations in one build (the switch unset against `=0`), and only the 748 programs that ask for early tests differ between them. The absolute fps on today's `main` will differ from those runs; the difference between the sides is what they measured.
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The fence fix works in the reported Windows NVIDIA sweep, but the changed shader execution mode still needs the Windows AMD and Linux NVIDIA game runs. (It stands on L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.)

The change honors fragment programs' requests for early depth and stencil tests, preventing the camera-fade counter from fading the fence behind the Forest Temple warp. It adds a kill switch and a one-time shader preparation cost after updating.

Blocking (1): must change before merging.

  1. L5: The check CI / Third-party parts and guide screenshots (pull_request) fails on this head and passes on the base branch: Failing after 14s.

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

  • L1 gpu/vk/vk_shader.cpp:1789: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. When: On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. Do: Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off.
  • L3 gpu/vk/vk_shader.cpp:1789: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. When: A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. Do: Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off.

@fix can do L5.

Since the last review (on 043ba24332)
Still open: L1 (The change enables early tests across affected fragment programs on Windows AMD, where the…); L3 (Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution…); L5 (The check CI / Third-party parts and guide screenshots (pull_request) fails on this head…); L6 (The check CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) fails on th…); L7 (The check CI / Website build and checks (pull_request) fails on this head and passes on…)

Checks: Still running: 7 checks.

Also noticed (1; not asked for, not blocking)
  • The recorded guide screenshot failure is attributed in the comments to changes already on main; CI lists it as failing on this head only.
More: does it help, other systems, switches, what was read

Does it help: Yes. On the reported RTX 5080 sweep, faded fence draws fell from 6–14 at affected pitches with the switch off to 0 with it on; a nearby fence still faded on both sides. Three gameplay benchmarks overlapped within their run spreads; upgrade preparation took 220–264 seconds versus roughly 110 seconds warm on that PC.

Other systems: Both vertex-to-fragment and mesh-to-fragment translations use the new mode, including prepared shaders; depth-writing programs are excluded. RADV and Steam Deck outdoor runs were reported, but Windows AMD and Linux NVIDIA game runs remain outstanding.

Switches: RX_VK_EARLY_FRAGMENT_TESTS defaults on; setting it to 0 restores the previous translation and uses a separate cache stamp. The default fixes the reported NVIDIA case, but the remaining Tier 1 runs are needed to assess it across affected systems.

Reviewed: df203fe8d9 against e4801d6a55: Read AGENTS.md, CONTRIBUTING.md, the full diff and the new test; inspected the shader parsing, translation, cache stamp and SPIR-V emission paths and the switch row. The large shader and switch files were only partly inspected, and the pull request template was not read.; nothing run (a code review).

Checked and fine:

  • The rebase retains the early-test cache tag while preserving the base branch's simulated-turf stamp removal.
  • The depth-write safeguard and both fragment translation assignments remain present.

Testing: No commands that build or run tests were executed. The author reports the new fixture and shader-related checks passing; several CI jobs are still running.

Overlaps and merge order: None identified.


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

**Recommendation: Request changes.** The fence fix works in the reported Windows NVIDIA sweep, but the changed shader execution mode still needs the Windows AMD and Linux NVIDIA game runs. (It stands on L5: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s.) The change honors fragment programs' requests for early depth and stencil tests, preventing the camera-fade counter from fading the fence behind the Forest Temple warp. It adds a kill switch and a one-time shader preparation cost after updating. **Blocking (1)**: must change before merging. 1. **L5**: The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head and passes on the base branch: Failing after 14s. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/vk_shader.cpp:1789`: The change enables early tests across affected fragment programs on Windows AMD, where the original issue was also reported, without a reported run. *When:* On an RX 9070 XT, the boss-room occlusion pass and other flagged fragment programs now execute with different depth and stencil ordering; their visual behavior on that driver is unknown. **Do:** Run the requested boss-room sweep and representative traversal on Windows AMD, comparing the default with the switch off. - **L3** `gpu/vk/vk_shader.cpp:1789`: Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution mode. *When:* A player using the NVIDIA Linux driver runs the affected shaders with early tests enabled, but the reported Windows driver run does not exercise that driver stack. **Do:** Run the boss-room sweep and representative traversal on Linux NVIDIA, comparing with the switch off. `@fix` can do L5. **Since the last review** (on 043ba243324e) Still open: L1 (The change enables early tests across affected fragment programs on Windows AMD, where the…); L3 (Linux NVIDIA is also Tier 1 and has no reported game run for the changed shader execution…); L5 (The check `CI / Third-party parts and guide screenshots (pull_request)` fails on this head…); L6 (The check `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)` fails on th…); L7 (The check `CI / Website build and checks (pull_request)` fails on this head and passes on…) **Checks:** Still running: 7 checks. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The recorded guide screenshot failure is attributed in the comments to changes already on main; CI lists it as failing on this head only. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. On the reported RTX 5080 sweep, faded fence draws fell from 6–14 at affected pitches with the switch off to 0 with it on; a nearby fence still faded on both sides. Three gameplay benchmarks overlapped within their run spreads; upgrade preparation took 220–264 seconds versus roughly 110 seconds warm on that PC. **Other systems:** Both vertex-to-fragment and mesh-to-fragment translations use the new mode, including prepared shaders; depth-writing programs are excluded. RADV and Steam Deck outdoor runs were reported, but Windows AMD and Linux NVIDIA game runs remain outstanding. **Switches:** RX_VK_EARLY_FRAGMENT_TESTS defaults on; setting it to 0 restores the previous translation and uses a separate cache stamp. The default fixes the reported NVIDIA case, but the remaining Tier 1 runs are needed to assess it across affected systems. **Reviewed:** df203fe8d9a2 against e4801d6a55d8: Read AGENTS.md, CONTRIBUTING.md, the full diff and the new test; inspected the shader parsing, translation, cache stamp and SPIR-V emission paths and the switch row. The large shader and switch files were only partly inspected, and the pull request template was not read.; nothing run (a code review). **Checked and fine:** - The rebase retains the early-test cache tag while preserving the base branch's simulated-turf stamp removal. - The depth-write safeguard and both fragment translation assignments remain present. **Testing:** No commands that build or run tests were executed. The author reports the new fixture and shader-related checks passing; several CI jobs are still running. **Overlaps and merge order:** None identified. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
llun scheduled this pull request to auto merge when all checks succeed 2026-11-29 18:54:40 +00:00
llun removed review request for BeanBot 2026-11-29 19:15:49 +00:00
Author
Member

@Beanstalk

@Beanstalk
Member

Beanstalk test farm · 🔄 testing (0 of 6 reports so far)

Commit df203fe · approved by llun (reviewed) · dashboard

⚠️ Note: The post-Phantom-Ganon save and boss-room teleport used in the reported reproduction are not available, so neither the fence pitch sweep nor the nearby-fence fade check can be run.
⚠️ Note: FSR 4 and the fishing pond are not covered; shader preparation after an update is also not measured.

Done (started 19:16 UTC). Comment @Beanstalk to run it again.

Target Result Reports VRAM peak (MB) Crashes
windows+amd ⏳ queued 0 of 1 — —
linux+radv ⏳ queued 0 of 1 — —
steamdeck ⏳ queued 0 of 1 — —
linux+nvidia-proprietary ⏳ queued 0 of 1 — —
windows+nvidia ⏳ queued 0 of 1 — —
intel ⏳ queued 0 of 1 — —

forest-and-field · frame time p99 (ms)

Target main RX_VK_EARLY_FRAGMENT_TESTS= (reference) RX_VK_EARLY_FRAGMENT_TESTS=0
windows+amd — — —
linux+radv — — —
steamdeck — — —
linux+nvidia-proprietary — — —
windows+nvidia — — —
intel — — —
What was tested

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

The plan compares the PR with main in Kokiri Forest and Hyrule Field on Windows AMD and NVIDIA, Linux RADV and NVIDIA, Steam Deck, and Intel hardware. It runs with early fragment tests enabled and disabled to check for visual and frame-time regressions, taking about 50 minutes per tester. Crashes, substantial screenshot differences, or frame-time regressions over 15% fail the plan. The available saves and teleports cannot reach the post-fight boss-room setup, so this does not establish whether the fence fix works.

  • Where: windows+amd (1-2 reports), linux+radv (1-2 reports), steamdeck (1-2 reports), linux+nvidia-proprietary (1-2 reports), windows+nvidia (1-2 reports), intel (1-2 reports).
  • Matrix: 2 cells, each on main and the PR: RX_VK_EARLY_FRAGMENT_TESTS `` or 0 (PR only).
  • forest-and-field: from the repository's save kokiri-start, then teleport to Kokiri Forest, take the picture forest to compare with main, move the stick, measure forest for 25 s (after 5 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 25 s (after 5 s warm-up); 2 runs on each side for each of 2 cells (2 game starts a run).
  • Measured: crashes, frame times, stutters and hitches.
  • The PR fails if: it crashes; or a picture differs from main by more than 20%; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main.
  • Time: about 49 min of game runs per tester (8 game starts), plus the two builds.
<!-- beanstalk:sticky --> ### Beanstalk test farm · 🔄 testing (0 of 6 reports so far) Commit `df203fe` · approved by llun (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2796) ⚠️ **Note:** The post-Phantom-Ganon save and boss-room teleport used in the reported reproduction are not available, so neither the fence pitch sweep nor the nearby-fence fade check can be run. ⚠️ **Note:** FSR 4 and the fishing pond are not covered; shader preparation after an update is also not measured. Done (started 19:16 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | | `windows+amd` | ⏳ queued | 0 of 1 | — | — | | `linux+radv` | ⏳ queued | 0 of 1 | — | — | | `steamdeck` | ⏳ queued | 0 of 1 | — | — | | `linux+nvidia-proprietary` | ⏳ queued | 0 of 1 | — | — | | `windows+nvidia` | ⏳ queued | 0 of 1 | — | — | | `intel` | ⏳ queued | 0 of 1 | — | — | **`forest-and-field`** · frame time p99 (ms) | Target | main | `RX_VK_EARLY_FRAGMENT_TESTS=` (reference) | `RX_VK_EARLY_FRAGMENT_TESTS=0` | | --- | --- | --- | --- | | `windows+amd` | — | — | — | | `linux+radv` | — | — | — | | `steamdeck` | — | — | — | | `linux+nvidia-proprietary` | — | — | — | | `windows+nvidia` | — | — | — | | `intel` | — | — | — | <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) The plan compares the PR with main in Kokiri Forest and Hyrule Field on Windows AMD and NVIDIA, Linux RADV and NVIDIA, Steam Deck, and Intel hardware. It runs with early fragment tests enabled and disabled to check for visual and frame-time regressions, taking about 50 minutes per tester. Crashes, substantial screenshot differences, or frame-time regressions over 15% fail the plan. The available saves and teleports cannot reach the post-fight boss-room setup, so this does not establish whether the fence fix works. - **Where:** windows+amd (1-2 reports), linux+radv (1-2 reports), steamdeck (1-2 reports), linux+nvidia-proprietary (1-2 reports), windows+nvidia (1-2 reports), intel (1-2 reports). - **Matrix:** 2 cells, each on main and the PR: RX_VK_EARLY_FRAGMENT_TESTS `` or `0` (PR only). - **forest-and-field:** from the repository's save `kokiri-start`, then teleport to Kokiri Forest, take the picture forest to compare with main, move the stick, measure forest for 25 s (after 5 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 25 s (after 5 s warm-up); 2 runs on each side for each of 2 cells (2 game starts a run). - **Measured:** crashes, frame times, stutters and hitches. - **The PR fails if:** it crashes; or a picture differs from main by more than 20%; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main. - **Time:** about 49 min of game runs per tester (8 game starts), plus the two builds. </details>
HumanBean deleted branch fix/early-fragment-tests 2026-11-29 19:26:27 +00:00
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!2796
No description provided.