fix(vk): with PsychoV35, the shader preparation builds the scene's pipelines in RGBX16F too, so they no longer compile when first drawn #2765

Merged
HumanBean merged 11 commits from HumanBean/Longshot:fix/psychov35-scene-pipelines into main 2026-11-29 18:42:27 +00:00
Owner

TL;DR

Prepare both scene pipeline formats for eligible Native HDR + PsychoV35 settings so entering a new area can reuse pipelines the Builder already made. In two matched Windows RTX 4070 pairs, recorded pipeline creation near first Market entry dropped from 4.20–5.16 s to 83–90 ms. Mean cold preparation rose by 9.39 s (+1.65%).

Summary

Since #2424, players using Native HDR and PsychoV35 can see shaders and textures pop in on first entering a new area. The shipped pipeline list describes packed R11G11B10F targets, while play uses RGBX16F for eligible single-sample targets. Those pipelines can be compiled on their first draw.

The Builder passes the selected profile into shader preparation and includes scene mode in its preparation key. The renderer retains the original version-2 records and prepares a second RGBX16F variant when the colour target and view match, the record is single-sample, and the selected settings enable it. The setting check is available during headless preparation. Start with scene_targets_rgba16f and state_list_read in gpu/vk/vk_draw.cpp, then scene_preparation_mode in the Builder.

Testing

Tested: On head 2f259a85 against main 1413b172, the Windows game-free host options-path, pipeline counts, computes, portable states, and scene format fixtures passed. The Builder regression for a missing selected-profile settings file and the unprofiled fallback passed locally with Rust 1.99.1 and in CI. A fresh preparation receipt could be reused in the focused Builder check. Substituting the exact main state-list reader into the same portable fixture failed at the assertion that expects the additional RGBX16F record. CI renderer compile checks passed on Windows and Linux, with and without FSR 4.

Clippy and Rust workspace unit tests passed on the 2f259a85 retry. Rust CI still reported the earlier workspace-formatting difference in host_sources_tests.rs and synthetic end-to-end failure on missing image.bin. The website build completed and its /settings/ branding audit failed in input paths unchanged from exact main. The game-free shards recorded 432 passes, 10 failures and 6 skips, and 422 passes, 21 failures and 4 skips. The failing test names match the prior PR run. Local checks on exact main reproduced the pipeline-tour, switch-table, input-background, and Windows-on-Linux failures. The complete exact-main CI comparison is pending. Measured-head CI Prior PR CI Measured main CI

The public merge 0b1ea3da onto 01539efd preserves the exact measured shader patch. The Guide check on both commits locally reports the same eight Graphics screenshot source references changed by incoming frame cap and keyboard/menu work. Independent review of the refresh found no blocker in the shader patch and recommended one fresh Windows HDR integration smoke because the incoming host and renderer use a new ABI. A merge preview against b6d274d7, which adds the Deck desktop window-focus fix, was clean and also preserved the measured patch byte for byte. Current-head CI Merge-base CI

The integration smoke passed on a freshly built Windows host and renderer from 0b1ea3da. Shader preparation completed on the RTX 4070 and gameplay reused the resulting cache. The game opened an HDR10 surface, reported Native HDR and PsychoV35 with the default 60 FPS cap, reached Market_Child from HyruleField_Child on the same controller route, and exited cleanly. This confirms integration on the refreshed build. The measured pairs are below.

Two matched Windows RTX 4070 pairs completed on the exact builds with independent cold caches and reversed run order. All four arms opened a 3440×1440 HDR10 swapchain, used Native HDR and PsychoV35, reached the same Market position from the same Field save with identical stick input, and exited cleanly. Local visual pop-in observation is pending.

On Windows 11 with Radeon RX 9070 XT and AMD 26.11.2, nwgat reported first-entry pop-in largely gone on an earlier build identified as 7d4deb29-dirty. No white textures or slow reload were seen during their reported session. The shader patch has since narrowed the prepared variants to single-sample records and corrected the Builder's profile and cache handling. The live target promotion is unchanged. This remains qualitative Windows Radeon evidence. Earlier reports and measurements

Still to test:

  • Verify visible first-entry pop-in by hand on the Market route. The matched Windows RTX 4070 runs recorded the pipeline and draw counters.
  • Windows Radeon 8060S with HDR output active. Use the same Market entry and clean shader and driver-cache state for both arms, and report first-draw compiles and visible pop-in by hand.
  • Affected Tier 1 coverage. Prioritize a discrete Windows Radeon and a representative Linux Native HDR setup where available. Record which Linux drivers and Steam Deck paths were exercised, and leave unavailable coverage visible for the maintainer. Without active HDR, a preparation or play check is an SDR control. Beanstalk declined the matched HDR plan. Its offered headless Linux control needs BigBean approval and cannot verify the first-entry HDR behavior. Farm response

Measurements

Verdict: Both matched pairs recorded less pipeline work near first Market entry. Average cold preparation took 9.39 s longer (+1.65%), with the two pairs moving in opposite directions. Launch with prepared caches took 2.52–4.73 s longer to reach first present.

Setup: Windows, NVIDIA 621.01, RTX 4070, 3440×1440 HDR10, Native HDR with PsychoV35, Compile Shaders Most and independent fresh shader and driver caches. The route window runs from the last periodic renderer sample before movement through the last sample in the post-entry wait. The graphics census starts at its last pre-route sample and ends at close. Pipeline time sums recorded renderer work. The shader patch is unchanged at the refreshed head. The elapsed times below remain pinned to the binaries that ran.

Before: main @ 1413b172 After: this PR @ 2f259a85
Cold preparation, main first 591.98 s 590.67 s
Cold preparation, PR first 548.41 s 568.49 s
Mean cold preparation 570.20 s 579.58 s
Prepared graphics pipelines, both pairs 39,168 70,273
Prepared compute pipelines, both pairs 5,087 5,087
Pipeline creations in the route window 820–826 346
Pipeline creation time in the route window 4,199–5,160 ms 83–90 ms
New graphics pipelines in the census 554–558 0
Omitted draws or dispatches in the census 1,809–1,924 0
Shader or pipeline waits in the census 12 0

Earlier matched preparation tests measured +25.76 s (+5.8%) on 7d4deb29 against 694ae582, before single-sample filtering. Earlier measured pairs

Risks

  • Building the extra variants costs preparation time and cache space. The original packed variants remain available.
  • Enabling PsychoV35 after preparation changes the next Builder preparation key. Enabling it mid-session can still encounter cold pipeline variants. The separate AMD white-texture and slow-reload report needs its own reproduction.
  • If a selected profile has no settings file, preparation uses defaults. Play can carry legacy settings into the profile, and the next Builder preparation detects that change. Earlier enabled receipts are refreshed because they could have described settings the child never read.
  • HOS_SCENE_RGBA16F=0 disables the extra preparation and #2424’s RGBX16F promotion.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (main added the Deck desktop window-focus fix after 01539efd)
  • 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). (matching CI in progress)
  • 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. (portable reader check above)
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (exact-head CI pending)
  • Screenshots of the same spot on main and here, for a change that shows on screen. (first-entry comparison pending)
  • Docs updated.
  • 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.
## TL;DR Prepare both scene pipeline formats for eligible Native HDR + PsychoV35 settings so entering a new area can reuse pipelines the Builder already made. In two matched Windows RTX 4070 pairs, recorded pipeline creation near first Market entry dropped from 4.20–5.16 s to 83–90 ms. Mean cold preparation rose by 9.39 s (+1.65%). ## Summary Since #2424, players using Native HDR and PsychoV35 can see shaders and textures pop in on first entering a new area. The shipped pipeline list describes packed R11G11B10F targets, while play uses RGBX16F for eligible single-sample targets. Those pipelines can be compiled on their first draw. The Builder passes the selected profile into shader preparation and includes scene mode in its preparation key. The renderer retains the original version-2 records and prepares a second RGBX16F variant when the colour target and view match, the record is single-sample, and the selected settings enable it. The setting check is available during headless preparation. Start with `scene_targets_rgba16f` and `state_list_read` in `gpu/vk/vk_draw.cpp`, then `scene_preparation_mode` in the Builder. ## Testing **Tested:** On head `2f259a85` against main `1413b172`, the Windows game-free host options-path, pipeline counts, computes, portable states, and scene format fixtures passed. The Builder regression for a missing selected-profile settings file and the unprofiled fallback passed locally with Rust 1.99.1 and in CI. A fresh preparation receipt could be reused in the focused Builder check. Substituting the exact main state-list reader into the same portable fixture failed at the assertion that expects the additional RGBX16F record. CI renderer compile checks passed on Windows and Linux, with and without FSR 4. Clippy and Rust workspace unit tests passed on the `2f259a85` retry. Rust CI still reported the earlier workspace-formatting difference in `host_sources_tests.rs` and synthetic end-to-end failure on missing `image.bin`. The website build completed and its `/settings/` branding audit failed in input paths unchanged from exact main. The game-free shards recorded 432 passes, 10 failures and 6 skips, and 422 passes, 21 failures and 4 skips. The failing test names match the prior PR run. Local checks on exact main reproduced the pipeline-tour, switch-table, input-background, and Windows-on-Linux failures. The complete exact-main CI comparison is pending. [Measured-head CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57611) [Prior PR CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57371) [Measured main CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57597) The public merge `0b1ea3da` onto `01539efd` preserves the exact measured shader patch. The Guide check on both commits locally reports the same eight Graphics screenshot source references changed by incoming frame cap and keyboard/menu work. Independent review of the refresh found no blocker in the shader patch and recommended one fresh Windows HDR integration smoke because the incoming host and renderer use a new ABI. A merge preview against `b6d274d7`, which adds the Deck desktop window-focus fix, was clean and also preserved the measured patch byte for byte. [Current-head CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57656) [Merge-base CI](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57652) The integration smoke passed on a freshly built Windows host and renderer from `0b1ea3da`. Shader preparation completed on the RTX 4070 and gameplay reused the resulting cache. The game opened an HDR10 surface, reported Native HDR and PsychoV35 with the default 60 FPS cap, reached `Market_Child` from `HyruleField_Child` on the same controller route, and exited cleanly. This confirms integration on the refreshed build. The measured pairs are below. Two matched Windows RTX 4070 pairs completed on the exact builds with independent cold caches and reversed run order. All four arms opened a 3440×1440 HDR10 swapchain, used Native HDR and PsychoV35, reached the same Market position from the same Field save with identical stick input, and exited cleanly. Local visual pop-in observation is pending. On Windows 11 with Radeon RX 9070 XT and AMD 26.11.2, nwgat reported first-entry pop-in largely gone on an earlier build identified as `7d4deb29-dirty`. No white textures or slow reload were seen during their reported session. The shader patch has since narrowed the prepared variants to single-sample records and corrected the Builder's profile and cache handling. The live target promotion is unchanged. This remains qualitative Windows Radeon evidence. [Earlier reports and measurements](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2765#issuecomment-90307) **Still to test:** - Verify visible first-entry pop-in by hand on the Market route. The matched Windows RTX 4070 runs recorded the pipeline and draw counters. - Windows Radeon 8060S with HDR output active. Use the same Market entry and clean shader and driver-cache state for both arms, and report first-draw compiles and visible pop-in by hand. - Affected Tier 1 coverage. Prioritize a discrete Windows Radeon and a representative Linux Native HDR setup where available. Record which Linux drivers and Steam Deck paths were exercised, and leave unavailable coverage visible for the maintainer. Without active HDR, a preparation or play check is an SDR control. Beanstalk declined the matched HDR plan. Its offered headless Linux control needs BigBean approval and cannot verify the first-entry HDR behavior. [Farm response](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2765#issuecomment-90313) ## Measurements **Verdict:** Both matched pairs recorded less pipeline work near first Market entry. Average cold preparation took 9.39 s longer (+1.65%), with the two pairs moving in opposite directions. Launch with prepared caches took 2.52–4.73 s longer to reach first present. Setup: Windows, NVIDIA 621.01, RTX 4070, 3440×1440 HDR10, Native HDR with PsychoV35, Compile Shaders Most and independent fresh shader and driver caches. The route window runs from the last periodic renderer sample before movement through the last sample in the post-entry wait. The graphics census starts at its last pre-route sample and ends at close. Pipeline time sums recorded renderer work. The shader patch is unchanged at the refreshed head. The elapsed times below remain pinned to the binaries that ran. | | Before: main @ `1413b172` | After: this PR @ `2f259a85` | |---|---:|---:| | Cold preparation, main first | 591.98 s | 590.67 s | | Cold preparation, PR first | 548.41 s | 568.49 s | | Mean cold preparation | 570.20 s | 579.58 s | | Prepared graphics pipelines, both pairs | 39,168 | 70,273 | | Prepared compute pipelines, both pairs | 5,087 | 5,087 | | Pipeline creations in the route window | 820–826 | 346 | | Pipeline creation time in the route window | 4,199–5,160 ms | 83–90 ms | | New graphics pipelines in the census | 554–558 | 0 | | Omitted draws or dispatches in the census | 1,809–1,924 | 0 | | Shader or pipeline waits in the census | 12 | 0 | Earlier matched preparation tests measured +25.76 s (+5.8%) on `7d4deb29` against `694ae582`, before single-sample filtering. [Earlier measured pairs](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2765#issuecomment-90307) ## Risks - Building the extra variants costs preparation time and cache space. The original packed variants remain available. - Enabling PsychoV35 after preparation changes the next Builder preparation key. Enabling it mid-session can still encounter cold pipeline variants. The separate AMD white-texture and slow-reload report needs its own reproduction. - If a selected profile has no settings file, preparation uses defaults. Play can carry legacy settings into the profile, and the next Builder preparation detects that change. Earlier enabled receipts are refreshed because they could have described settings the child never read. - `HOS_SCENE_RGBA16F=0` disables the extra preparation and #2424’s RGBX16F promotion. ## Checklist ### Ready for review - [ ] One topic, on current `main`; the title is a Conventional Commit. (main added the Deck desktop window-focus fix after `01539efd`) - [x] 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). (matching CI in progress) - [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. (portable reader check above) - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (exact-head CI pending) - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. (first-entry comparison pending) - [x] Docs updated. - [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.
fix(vk): with PsychoV35, the shader preparation builds the scene's pipelines in RGBX16F too, so they no longer compile when first drawn (#2424)
Some checks failed
PR description / Title and description (pull_request_target) Successful in 13s
CI / What the change needs (pull_request) Successful in 17s
CI / Third-party parts and guide screenshots (pull_request) Failing after 21s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 24s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m57s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m55s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m34s
CI / Website build and checks (pull_request) Failing after 36s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m53s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 29m54s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
7c5dd44b4c
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge branch 'main' into fix/psychov35-scene-pipelines
Some checks failed
PR description / Title and description (pull_request_target) Successful in 15s
CI / What the change needs (pull_request) Successful in 17s
CI / Third-party parts and guide screenshots (pull_request) Failing after 23s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 21s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m19s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m25s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m34s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m30s
CI / Website build and checks (pull_request) Failing after 32s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 26m19s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 40m40s
97b7793033
futondestroyer left a comment

Request changes. The RGBX16F copies can prepare the matching graphics pipelines, but the normal Builder subprocess can miss the player setting that turns the copies on. The patch also breaks existing source-extraction fixtures.

For a player this aims to reduce first-draw pipeline work after preparing with HDR Native + PsychoV35. The V2 resolver uses the same attachment-format conversion as replay, including the R11G11B10F view over an RGBX16F texture. The duplicate is a candidate key only: live promotion also checks texture flags, dimensions, levels, and samples, which the state list cannot fully identify. In particular, skip multisample records known to be ineligible and cover one promoted target, one unpromoted target, and a mixed attachment case. Leave compute and V1 records behaving as before.

Builder preparation explicitly refreshes the lists even with a warm shader seed. The opt-in background-update start also reads the lists before precompile. An already-prepared ordinary start or a live tone-mapper change does not guarantee that refresh. Please document this scope and verify the option source in a normal profile build as well as shader-only preparation. Builder child environment · Profile options lookup

Evidence: Renderer compile checks passed on Windows and Linux with and without FSR 4. Both game-free shards are red, as are Rust, third-party/Guide, and Website checks. The fixture issue below is confirmed in source. The other red jobs have not been attributed to this patch. No new game or test run in this review.

After the fixes, please compare matched cold preparations and first Market entries against main on the Radeon 8060S, with Native HDR and PsychoV35 set before preparation. Record preparation time, pipelines built at preparation and first draw, and visible pop-in on the same route. Retest an already-prepared run and an in-game switch separately. Keep the separate white-texture transition outside this result.

Reviewed head 97b77930 against 694ae582.

**Request changes.** The RGBX16F copies can prepare the matching graphics pipelines, but the normal Builder subprocess can miss the player setting that turns the copies on. The patch also breaks existing source-extraction fixtures. For a player this aims to reduce first-draw pipeline work after preparing with HDR Native + PsychoV35. The V2 resolver uses the same attachment-format conversion as replay, including the R11G11B10F view over an RGBX16F texture. The duplicate is a candidate key only: live promotion also checks texture flags, dimensions, levels, and samples, which the state list cannot fully identify. In particular, skip multisample records known to be ineligible and cover one promoted target, one unpromoted target, and a mixed attachment case. Leave compute and V1 records behaving as before. Builder preparation explicitly refreshes the lists even with a warm shader seed. The opt-in background-update start also reads the lists before precompile. An already-prepared ordinary start or a live tone-mapper change does not guarantee that refresh. Please document this scope and verify the option source in a normal profile build as well as shader-only preparation. [Builder child environment](https://git.magicbean.dev/MagicBeanDev/Longshot/src/commit/97b779303361ef3d1638879e9201392a5097f3ba/builder/crates/build-driver/src/shaders.rs#L123) · [Profile options lookup](https://git.magicbean.dev/MagicBeanDev/Longshot/src/commit/97b779303361ef3d1638879e9201392a5097f3ba/host/options_path.c#L76) **Evidence:** Renderer compile checks passed on Windows and Linux with and without FSR 4. Both game-free shards are red, as are Rust, third-party/Guide, and Website checks. The fixture issue below is confirmed in source. The other red jobs have not been attributed to this patch. No new game or test run in this review. After the fixes, please compare matched cold preparations and first Market entries against main on the Radeon 8060S, with Native HDR and PsychoV35 set before preparation. Record preparation time, pipelines built at preparation and first draw, and visible pop-in on the same route. Retest an already-prepared run and an in-game switch separately. Keep the separate white-texture transition outside this result. Reviewed head `97b77930` against `694ae582`.
@ -2646,0 +2646,4 @@
/// Whether play makes the game's R11G11B10F render targets RGBX16F (host/scene_format.h, nvn_native.c made_desc): HDR Native with
/// the PsychoV35 tone mapper, unless HOS_SCENE_RGBA16F=0. The shader preparation then builds a list's pipelines for both formats
bool scene_targets_rgba16f() {
const char* e = getenv("HOS_SCENE_RGBA16F");
Member

[P2] Honor the same HOS_SCENE_RGBA16F values as live play. The live texture builder uses env_on_or(..., 1), which treats false/off/no as disabled. This literal-zero check still warms RGBX16F in those cases. Use the shared helper and cover unset, 0, false/off/no, and on.

[P2] Honor the same HOS_SCENE_RGBA16F values as live play. The live texture builder uses env_on_or(..., 1), which treats false/off/no as disabled. This literal-zero check still warms RGBX16F in those cases. Use the shared helper and cover unset, 0, false/off/no, and on.
@ -2646,0 +2649,4 @@
const char* e = getenv("HOS_SCENE_RGBA16F");
// (the rows, not scene_tonemap_on: the Builder's preparation has no swapchain to say the display is HDR; on an SDR display the
// extra pipelines are only unused)
return (!e || strcmp(e, "0") != 0) && opts.hdr == 2 && opts.hdr_tonemap == 1;
Member

[P1] Pass the selected profile into shader preparation. shaders.rs game_env removes LONGSHOT_PROFILE with the other LONGSHOT_ variables, and run_child only restores job/store settings. options_path.c falls back to the game folder, while normal play uses the profile settings.ini. Selecting Native HDR + PsychoV35 in that profile can therefore leave these options at their fallback values during both full and shader-only preparation. Pass the selected profile explicitly after sanitizing the child environment, and test that both paths actually read its settings.

[P1] Pass the selected profile into shader preparation. shaders.rs game_env removes LONGSHOT_PROFILE with the other LONGSHOT_ variables, and run_child only restores job/store settings. options_path.c falls back to the game folder, while normal play uses the profile settings.ini. Selecting Native HDR + PsychoV35 in that profile can therefore leave these options at their fallback values during both full and shader-only preparation. Pass the selected profile explicitly after sanitizing the child environment, and test that both paths actually read its settings.
@ -2670,3 +2678,2 @@
StateRec r;
while (fread(&v, sizeof v, 1, f) == 1)
if (!v.kind && state_v2_resolve(v, r)) out.push_back(r);
const bool scene = scene_targets_rgba16f();
Member

[P2] Update the fixtures that extract state_list_read. test_pipeline_state_portable.py, test_pipeline_state_computes.py and test_pipeline_state_counts.py currently paste the function without this new helper or enum declarations for both NVN formats. Their generated translation units cannot compile on this head. Supply the dependencies and exercise the real duplication path, including retained R11, the matching RGBX16F key and disabled settings.

[P2] Update the fixtures that extract state_list_read. test_pipeline_state_portable.py, test_pipeline_state_computes.py and test_pipeline_state_counts.py currently paste the function without this new helper or enum declarations for both NVN formats. Their generated translation units cannot compile on this head. Supply the dependencies and exercise the real duplication path, including retained R11, the matching RGBX16F key and disabled settings.
fix(vk): prepare PsychoV35 pipelines with the selected profile
Some checks failed
PR description / Title and description (pull_request_target) Successful in 8s
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Failing after 13s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 1m53s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m20s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m20s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 5m29s
CI / Website build and checks (pull_request) Failing after 35s
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
74cfef99a9
Pass the selected profile to shader preparation after cleaning the child environment. Match the live scene-format switch and verify portable pipeline state variants.

Assisted-by: OpenAI Codex
futondestroyer left a comment

Re-reviewed 74cfef99a92234b02379a6f697af71da72cc25eb against 694ae582. Hold the Radeon 8060S test at this head.

  • The selected profile now reaches the shader child during early build preparation, fallback preparation, and the internal shader-only build path. The child restores LONGSHOT_PROFILE after environment cleanup, including retries. This addresses the profile finding when preparation actually runs.
  • Preparation now uses the same env_on_or semantics as live play. The Windows counts, computes, and portable state fixtures passed, including eight portable flag/settings cases. This addresses the two renderer fixture and flag findings.
  • The Rust job has a new regression. The two supervised calls in shaders_outcome_tests.rs:38,62 still need the new profile argument. Clippy and cargo test fail to compile the build-driver test target, so the new profile regressions have yet to run. Rustfmt also flags the changed prepare_in signature. The separate synthetic end-to-end image.bin failure needs baseline attribution. The Python lint findings are on lines already present on the base. The Guide check points to gpu/vk/device_policy.h, outside this diff.

Once the fixed head passes the Builder profile tests and its Windows renderer build is verified, run the supervised Market comparison with matched Native HDR and PsychoV35 settings and independent cold cache state for both builds. Confirm shader preparation ran with the selected profile, and record preparation time and the first Market entry on both. Preparation can reuse a prior receipt, so an existing prepared folder does not establish cold coverage.

Re-reviewed `74cfef99a92234b02379a6f697af71da72cc25eb` against `694ae582`. **Hold the Radeon 8060S test at this head.** - The selected profile now reaches the shader child during early build preparation, fallback preparation, and the internal shader-only build path. The child restores `LONGSHOT_PROFILE` after environment cleanup, including retries. This addresses the profile finding when preparation actually runs. - Preparation now uses the same `env_on_or` semantics as live play. The Windows counts, computes, and portable state fixtures passed, including eight portable flag/settings cases. This addresses the two renderer fixture and flag findings. - The [Rust job](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57229/jobs/3) has a new regression. The two `supervised` calls in `shaders_outcome_tests.rs:38,62` still need the new profile argument. Clippy and cargo test fail to compile the build-driver test target, so the new profile regressions have yet to run. Rustfmt also flags the changed `prepare_in` signature. The separate synthetic end-to-end `image.bin` failure needs baseline attribution. The [Python lint findings](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57229/jobs/1) are on lines already present on the base. The [Guide check](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/57229/jobs/2) points to `gpu/vk/device_policy.h`, outside this diff. Once the fixed head passes the Builder profile tests and its Windows renderer build is verified, run the supervised Market comparison with matched Native HDR and PsychoV35 settings and independent cold cache state for both builds. Confirm shader preparation ran with the selected profile, and record preparation time and the first Market entry on both. Preparation can reuse a prior receipt, so an existing prepared folder does not establish cold coverage.
fix(builder): update shader outcome test calls
Some checks failed
PR description / Title and description (pull_request_target) Successful in 9s
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Failing after 13s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Failing after 15s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m21s
CI / Rust (rustfmt, clippy, cargo test, end to end) (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
3e34830928
Pass no selected profile in the shader outcome fixtures and format the preparation signature.

Assisted-by: OpenAI Codex
style: fix shader preparation and reader fixture lint
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Successful in 12s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 13s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m16s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m2s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m42s
CI / Website build and checks (pull_request) Failing after 40s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m42s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 25m56s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 38m16s
7d4deb299f
Apply the CI rustfmt result for the preparation call and split statements in the changed counts fixture.

Assisted-by: OpenAI Codex
Member
@review
BeanBot left a comment

Recommendation: Approve. A preparation made for different tone-mapper settings can be reused without building the RGBX16F pipelines, leaving the first-draw compiles this change aims to prevent. The gain and preparation cost also remain unmeasured. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The change prepares an additional pipeline format for Native HDR with PsychoV35 and passes the selected profile to Builder preparation. It can reduce first-draw compilation, at the cost of additional preparation work, but receipt reuse can skip that work for the settings that need it.

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

  • L1 builder/crates/build-driver/src/shaders.rs:781: Preparation reuse does not account for the settings that now determine which pipeline variants are built. (more on the line) Do: Include the effective scene-format preparation mode in the receipt and local preparation key, and ensure the fast reuse check uses the same mode. Add a test that prepares with the mode off and then requests preparation with it on through a shared cache.

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

  • L2 gpu/vk/vk_draw.cpp:2685: The claimed reduction in first-draw compilation and the extra preparation cost have not been measured. (more on the line) Do: Compare independent cold preparations and repeated matched Castle Town entries on the reported Radeon system against base, recording preparation time, pipeline counts, cache size, first-draw compiles and frame times. (@fix does its part first: Skip extra variants for records known to be ineligible for live promotion, such as multisampled targets.)
  • L3 gpu/vk/vk_draw.cpp:2678: The new preparation path has no reported Tier 1 hardware coverage. (more on the line) Do: Run preparation and a representative scene on the affected Tier 1 NVIDIA and AMD Windows and Linux configurations and Steam Deck, recording failures and preparation cost.

@fix can do L1 and L2.

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

  • Can shipped or player-recorded draws bind multiple R11G11B10F attachments where only some satisfy live promotion's texture-description restrictions? The reader currently promotes all matching attachments together.

Checks: Failing on this head, which is behind its base, where they pass: CI / Third-party parts and guide screenshots (pull_request), CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request), CI / Website build and checks (pull_request), CI / Game-free checks (run_all.py, part 1/2) (pull_request), CI / Game-free checks (run_all.py, part 2/2) (pull_request). @rebase (or @fix) brings it up to date and runs them again; not held against it.

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

Does it help: Unproven. The pull request reports no game runs or matched measurements against base 694ae582; the portable fixture exercises the added record conversion but does not establish the in-game gain.

Other systems: The changed state-list reader also handles player-recorded lists and background preparation; version 1 and compute records retain their existing paths. The renderer and Builder run on Windows and Linux across GPU vendors, but this head has no reported game or platform runs. Shared shader-cache receipts can cross profiles.

Switches: No switch is added or removed. The new reader consults the existing HOS_SCENE_RGBA16F switch, default on, using the same on/off parsing as live texture creation. Its existing default is not measured by this pull request.

Reviewed: 7d4deb299f against 694ae5820a: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, the full diff and commit log, shaders_outcome_tests.rs and shared_preparation.rs. Read the changed sections and relevant callers and helpers in the remaining changed files; skimmed their unrelated portions, including most of vk_draw.cpp. docs/review-checklist.md was absent. No recorded runs or translations were changed.; nothing run (a code review).

Checked and fine:

  • The new portable fixture checks the original record, the promoted key, disabled settings and switch values.
  • The selected profile is passed after child environment sanitization on early and fallback preparation paths.
  • The commit log records AI assistance; the diff contains no game-derived files or generated shader headers.

Testing: No code or tests were run, as requested. The supplied review reports fixture runs on an earlier head; the pull request reports no game runs or measurements on this head.

Overlaps and merge order: No overlapping pull requests were available in the supplied context.


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

**Recommendation: Approve.** A preparation made for different tone-mapper settings can be reused without building the RGBX16F pipelines, leaving the first-draw compiles this change aims to prevent. The gain and preparation cost also remain unmeasured. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The change prepares an additional pipeline format for Native HDR with PsychoV35 and passes the selected profile to Builder preparation. It can reduce first-draw compilation, at the cost of additional preparation work, but receipt reuse can skip that work for the settings that need it. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `builder/crates/build-driver/src/shaders.rs:781`: Preparation reuse does not account for the settings that now determine which pipeline variants are built. (more on the line) **Do:** Include the effective scene-format preparation mode in the receipt and local preparation key, and ensure the fast reuse check uses the same mode. Add a test that prepares with the mode off and then requests preparation with it on through a shared cache. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_draw.cpp:2685`: The claimed reduction in first-draw compilation and the extra preparation cost have not been measured. (more on the line) **Do:** Compare independent cold preparations and repeated matched Castle Town entries on the reported Radeon system against base, recording preparation time, pipeline counts, cache size, first-draw compiles and frame times. *(`@fix` does its part first: Skip extra variants for records known to be ineligible for live promotion, such as multisampled targets.)* - **L3** `gpu/vk/vk_draw.cpp:2678`: The new preparation path has no reported Tier 1 hardware coverage. (more on the line) **Do:** Run preparation and a representative scene on the affected Tier 1 NVIDIA and AMD Windows and Linux configurations and Steam Deck, recording failures and preparation cost. `@fix` can do L1 and L2. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - Can shipped or player-recorded draws bind multiple R11G11B10F attachments where only some satisfy live promotion's texture-description restrictions? The reader currently promotes all matching attachments together. **Checks:** Failing on this head, which is behind its base, where they pass: `CI / Third-party parts and guide screenshots (pull_request)`, `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)`, `CI / Website build and checks (pull_request)`, `CI / Game-free checks (run_all.py, part 1/2) (pull_request)`, `CI / Game-free checks (run_all.py, part 2/2) (pull_request)`. `@rebase` (or `@fix`) brings it up to date and runs them again; not held against it. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The pull request reports no game runs or matched measurements against base 694ae582; the portable fixture exercises the added record conversion but does not establish the in-game gain. **Other systems:** The changed state-list reader also handles player-recorded lists and background preparation; version 1 and compute records retain their existing paths. The renderer and Builder run on Windows and Linux across GPU vendors, but this head has no reported game or platform runs. Shared shader-cache receipts can cross profiles. **Switches:** No switch is added or removed. The new reader consults the existing HOS_SCENE_RGBA16F switch, default on, using the same on/off parsing as live texture creation. Its existing default is not measured by this pull request. **Reviewed:** 7d4deb299fcc against 694ae5820a37: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, the full diff and commit log, shaders_outcome_tests.rs and shared_preparation.rs. Read the changed sections and relevant callers and helpers in the remaining changed files; skimmed their unrelated portions, including most of vk_draw.cpp. docs/review-checklist.md was absent. No recorded runs or translations were changed.; nothing run (a code review). **Checked and fine:** - The new portable fixture checks the original record, the promoted key, disabled settings and switch values. - The selected profile is passed after child environment sanitization on early and fallback preparation paths. - The commit log records AI assistance; the diff contains no game-derived files or generated shader headers. **Testing:** No code or tests were run, as requested. The supplied review reports fixture runs on an earlier head; the pull request reports no game runs or measurements on this head. **Overlaps and merge order:** No overlapping pull requests were available in the supplied context. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -752,7 +781,7 @@ pub fn prepare_unless_kept(
return true;
Member

L1 (should fix): Preparation reuse does not account for the settings that now determine which pipeline variants are built.

When: A profile prepared with PsychoV35 off publishes a receipt for the renderer, lists, driver and level. A second profile using the same shader cache with Native HDR and PsychoV35 enabled can match that receipt, so prepare_unless_kept returns before reading its settings and its RGBX16F pipelines still compile on first draw.

Do: Include the effective scene-format preparation mode in the receipt and local preparation key, and ensure the fast reuse check uses the same mode. Add a test that prepares with the mode off and then requests preparation with it on through a shared cache.

**L1** (should fix): Preparation reuse does not account for the settings that now determine which pipeline variants are built. *When:* A profile prepared with PsychoV35 off publishes a receipt for the renderer, lists, driver and level. A second profile using the same shader cache with Native HDR and PsychoV35 enabled can match that receipt, so prepare_unless_kept returns before reading its settings and its RGBX16F pipelines still compile on first draw. **Do:** Include the effective scene-format preparation mode in the receipt and local preparation key, and ensure the fast reuse check uses the same mode. Add a test that prepares with the mode off and then requests preparation with it on through a shared cache.
@ -2670,3 +2677,2 @@
StateRec r;
while (fread(&v, sizeof v, 1, f) == 1)
if (!v.kind && state_v2_resolve(v, r)) out.push_back(r);
const bool scene = scene_targets_rgba16f();
Member

L3 (should fix): The new preparation path has no reported Tier 1 hardware coverage.

When: The added pipeline variants are passed to Vulkan drivers on Windows and Linux, including Steam Deck, and no run on this head shows that preparation and subsequent play complete on those systems.

Do: Run preparation and a representative scene on the affected Tier 1 NVIDIA and AMD Windows and Linux configurations and Steam Deck, recording failures and preparation cost.

**L3** (should fix): The new preparation path has no reported Tier 1 hardware coverage. *When:* The added pipeline variants are passed to Vulkan drivers on Windows and Linux, including Steam Deck, and no run on this head shows that preparation and subsequent play complete on those systems. **Do:** Run preparation and a representative scene on the affected Tier 1 NVIDIA and AMD Windows and Linux configurations and Steam Deck, recording failures and preparation cost.
@ -2673,0 +2682,4 @@
// (the same draw into the scene's light made RGBX16F with PsychoV35, host/scene_format.h: the lists were
// recorded with it R11G11B10F, so without this each such pipeline is made when it is first drawn)
StateRec2 w = v;
bool any = false;
Member

L2 (should fix): The claimed reduction in first-draw compilation and the extra preparation cost have not been measured.

When: With Native HDR and PsychoV35, the reader adds pipeline records and preparation compiles them, but there is no matched route showing how many first-draw compiles or visible stalls this avoids, or how much preparation time and cache space it adds.

Do: Compare independent cold preparations and repeated matched Castle Town entries on the reported Radeon system against base, recording preparation time, pipeline counts, cache size, first-draw compiles and frame times.

**L2** (should fix): The claimed reduction in first-draw compilation and the extra preparation cost have not been measured. *When:* With Native HDR and PsychoV35, the reader adds pipeline records and preparation compiles them, but there is no matched route showing how many first-draw compiles or visible stalls this avoids, or how much preparation time and cache space it adds. **Do:** Compare independent cold preparations and repeated matched Castle Town entries on the reported Radeon system against base, recording preparation time, pipeline counts, cache size, first-draw compiles and frame times.
Author
Owner
@fix
fix(shaders): key preparation by scene format and skip multisample variants
Some checks failed
PR description / Title and description (pull_request_target) Successful in 9s
CI / What the change needs (pull_request) Successful in 11s
CI / Third-party parts and guide screenshots (pull_request) Successful in 15s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m14s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m54s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m52s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m58s
CI / Website build and checks (pull_request) Successful in 1m38s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 20m30s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 36m11s
e2c1cab6f9
As the review on #2765 asked.
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The change can prepare candidate RGBX16F pipelines, but its effect on first-draw compilation and its preparation cost are unmeasured. Hardware validation of the new path is also still missing. Recommend approval; not approved on the forge.

What @fix changed
I changed this pull request: the new head is e2c1cab6f9. I merged main (a3e0d2316e) into it, as it has merge commits. I edited its description to match the change.

Changed

  • Preparation reuse at builder/crates/build-driver/src/shaders.rs:711: Added the effective scene mode to local and shared preparation keys, passed the profile through fast checks, and added shared-cache coverage. Tests were not run.
  • State-list fixtures at tests/test_pipeline_state_portable.py:237: Extended the existing duplication fixture with multisampled and unpromoted targets; the three fixtures already include the helper and format declarations. Tests were not run.
  • Scene-mode parsing and reuse: Updated builder/crates/build-driver/src/shaders.rs:766 to select scene settings before parsing and added a reuse regression test with a large auto_for value at line 1782. Tests were not run, as requested.

Changed in part (the rest is for the author)

  • Skip ineligible variants at gpu/vk/vk_draw.cpp:2686: Skipped multisampled records and added fixture coverage. The author must measure preparation time, pipelines built and first-draw compilation against main.
  • Scene pipeline preparation review: Added multisample and unpromoted-target coverage and documented refresh scope at docs/dev/reference/shader-preparation.md:33. The author must run the requested matched Radeon 8060S preparations and Market entries, record time, pipeline counts and pop-in, and separately retest an already-prepared run and an in-game switch.

Already done

  • Profile environment at builder/crates/build-driver/src/shaders.rs:274: The child restores the selected profile after environment sanitization; existing tests cover early full-build and shader-only preparation at shaders.rs:1400 and build.rs:1050.
  • Scene switch at gpu/vk/vk_draw.cpp:2651: The renderer uses env_on_or; tests/test_pipeline_state_portable.py covers unset, 0, false, off, no and on.

Nothing was built or run: the checks run again on the new head.

Preparation now includes candidate scene pipelines for Native HDR with PsychoV35 and keys reuse by scene mode. This may reduce first-draw compilation at the cost of additional preparation work; the size of either effect is unknown.

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

  • L2 gpu/vk/vk_draw.cpp:2685: The first-draw compilation reduction and extra preparation cost remain unmeasured; multisampled records are now excluded. When: With Native HDR and PsychoV35 enabled, preparation builds additional candidate pipelines, but their cost and effect on first Market entry are unknown. Do: Compare matched cold preparations and Market entries against main, recording preparation time, pipeline counts, first-draw compiles and visible pop-in.
  • L3 gpu/vk/vk_draw.cpp:2678: The new preparation path has no reported Tier 1 hardware coverage. When: The added pipeline variants are passed to Vulkan drivers on Windows and Linux, including Steam Deck, and no run on this head shows that preparation and subsequent play complete on those systems. Do: Run preparation and a representative scene on the affected Tier 1 NVIDIA and AMD Windows and Linux configurations and Steam Deck, recording failures and preparation cost.

Checks: they run again on this head (CI / Third-party parts and guide screenshots (pull_request), CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request), CI / Website build and checks (pull_request), CI / Game-free checks (run_all.py, part 1/2) (pull_request), CI / Game-free checks (run_all.py, part 2/2) (pull_request) failed on the last one); a failure shows on the pull request.

Also noticed (2; not asked for, not blocking)
  • The pull request description still says an ordinary start does not refresh preparation after a tone-mapper change; the new scene-mode reuse key makes the Builder fast check request preparation when that mode changes.
  • The reported checkout head is 7d4deb299f, while the checked-out HEAD is 8308f43fabfff7f3f06a23bce1cd2d21e2419a7f.
More: does it help, other systems, switches, what was read

Does it help: Unproven: no matched preparation times, pipeline counts, first-draw compilation counts, or pop-in results are reported against main.

Other systems: The renderer path affects Vulkan drivers and both Windows and Linux. The selected profile and shared preparation cache also affect Builder reuse; the new shared-cache test is present but has not been reported running.

Switches: No switch added or changed. Existing HOS_SCENE_RGBA16F defaults to enabled and also controls live scene promotion; preparation now uses its existing on/off semantics.

Reviewed: e2c1cab6f9 against a3e0d2316e: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the fix diff, the state-list reader and resolver, the scene-mode key and preparation reuse paths, and relevant environment and options readers. Skimmed the broader base diff, commit log, and test changes; did not read every changed code file in full. No review checklist file was found.; nothing run (a code review).

Checked and fine:

  • The new multisample guard retains the original record and avoids generating its RGBX16F copy.
  • The fix preserves the RGBX16F preparation path for eligible single-sample records.
  • The description records the scene-mode reuse key and the limits of refresh after a tone-mapper change.

Testing: No commands that build or run project code were executed. The description reports no game run or matched measurements, and CI has not run on this head.

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


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

**Recommendation: Approve.** The code is ready: only testing is left. The change can prepare candidate RGBX16F pipelines, but its effect on first-draw compilation and its preparation cost are unmeasured. Hardware validation of the new path is also still missing. Recommend approval; not approved on the forge. **What `@fix` changed** I changed this pull request: the new head is e2c1cab6f923. I merged `main` (a3e0d2316e43) into it, as it has merge commits. I edited its description to match the change. **Changed** - **Preparation reuse at builder/crates/build-driver/src/shaders.rs:711**: Added the effective scene mode to local and shared preparation keys, passed the profile through fast checks, and added shared-cache coverage. Tests were not run. - **State-list fixtures at tests/test_pipeline_state_portable.py:237**: Extended the existing duplication fixture with multisampled and unpromoted targets; the three fixtures already include the helper and format declarations. Tests were not run. - **Scene-mode parsing and reuse**: Updated builder/crates/build-driver/src/shaders.rs:766 to select scene settings before parsing and added a reuse regression test with a large auto_for value at line 1782. Tests were not run, as requested. **Changed in part (the rest is for the author)** - **Skip ineligible variants at gpu/vk/vk_draw.cpp:2686**: Skipped multisampled records and added fixture coverage. The author must measure preparation time, pipelines built and first-draw compilation against main. - **Scene pipeline preparation review**: Added multisample and unpromoted-target coverage and documented refresh scope at docs/dev/reference/shader-preparation.md:33. The author must run the requested matched Radeon 8060S preparations and Market entries, record time, pipeline counts and pop-in, and separately retest an already-prepared run and an in-game switch. **Already done** - **Profile environment at builder/crates/build-driver/src/shaders.rs:274**: The child restores the selected profile after environment sanitization; existing tests cover early full-build and shader-only preparation at shaders.rs:1400 and build.rs:1050. - **Scene switch at gpu/vk/vk_draw.cpp:2651**: The renderer uses env_on_or; tests/test_pipeline_state_portable.py covers unset, 0, false, off, no and on. Nothing was built or run: the checks run again on the new head. Preparation now includes candidate scene pipelines for Native HDR with PsychoV35 and keys reuse by scene mode. This may reduce first-draw compilation at the cost of additional preparation work; the size of either effect is unknown. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_draw.cpp:2685`: The first-draw compilation reduction and extra preparation cost remain unmeasured; multisampled records are now excluded. *When:* With Native HDR and PsychoV35 enabled, preparation builds additional candidate pipelines, but their cost and effect on first Market entry are unknown. **Do:** Compare matched cold preparations and Market entries against main, recording preparation time, pipeline counts, first-draw compiles and visible pop-in. - **L3** `gpu/vk/vk_draw.cpp:2678`: The new preparation path has no reported Tier 1 hardware coverage. *When:* The added pipeline variants are passed to Vulkan drivers on Windows and Linux, including Steam Deck, and no run on this head shows that preparation and subsequent play complete on those systems. **Do:** Run preparation and a representative scene on the affected Tier 1 NVIDIA and AMD Windows and Linux configurations and Steam Deck, recording failures and preparation cost. **Checks:** they run again on this head (`CI / Third-party parts and guide screenshots (pull_request)`, `CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request)`, `CI / Website build and checks (pull_request)`, `CI / Game-free checks (run_all.py, part 1/2) (pull_request)`, `CI / Game-free checks (run_all.py, part 2/2) (pull_request)` failed on the last one); a failure shows on the pull request. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The pull request description still says an ordinary start does not refresh preparation after a tone-mapper change; the new scene-mode reuse key makes the Builder fast check request preparation when that mode changes. - The reported checkout head is 7d4deb299fcc, while the checked-out HEAD is 8308f43fabfff7f3f06a23bce1cd2d21e2419a7f. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: no matched preparation times, pipeline counts, first-draw compilation counts, or pop-in results are reported against main. **Other systems:** The renderer path affects Vulkan drivers and both Windows and Linux. The selected profile and shared preparation cache also affect Builder reuse; the new shared-cache test is present but has not been reported running. **Switches:** No switch added or changed. Existing HOS_SCENE_RGBA16F defaults to enabled and also controls live scene promotion; preparation now uses its existing on/off semantics. **Reviewed:** e2c1cab6f923 against a3e0d2316e43: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the fix diff, the state-list reader and resolver, the scene-mode key and preparation reuse paths, and relevant environment and options readers. Skimmed the broader base diff, commit log, and test changes; did not read every changed code file in full. No review checklist file was found.; nothing run (a code review). **Checked and fine:** - The new multisample guard retains the original record and avoids generating its RGBX16F copy. - The fix preserves the RGBX16F preparation path for eligible single-sample records. - The description records the scene-mode reuse key and the limits of refresh after a tone-mapper change. **Testing:** No commands that build or run project code were executed. The description reports no game run or matched measurements, and CI has not run on this head. **Overlaps and merge order:** Not checked; network access is unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.</sub>
@ -674,0 +766,4 @@
let (setting, max) = match &line[..eq] {
b"hdr" => (&mut hdr, 2),
b"hdr_tone_mapper" => (&mut tone, 1),
_ => continue,
Member

L9 (blocking): The scene-mode reader parses every setting as an i32 before checking its name, so an unrelated large numeric value prevents preparation from being keyed or reused.

When: A profile containing an auto_for or auto_tuned hexadecimal fingerprint whose initial decimal digits exceed i32 returns None from scene_preparation_mode. Preparation::check then returns None, would_prepare requests preparation at each start, and successful preparation cannot save a reuse record.

Do: Select hdr and hdr_tone_mapper before parsing their values, and add a reuse test with an unrelated large numeric setting such as auto_for.

**L9** (blocking): The scene-mode reader parses every setting as an i32 before checking its name, so an unrelated large numeric value prevents preparation from being keyed or reused. *When:* A profile containing an auto_for or auto_tuned hexadecimal fingerprint whose initial decimal digits exceed i32 returns None from scene_preparation_mode. Preparation::check then returns None, would_prepare requests preparation at each start, and successful preparation cannot save a reuse record. **Do:** Select hdr and hdr_tone_mapper before parsing their values, and add a reuse test with an unrelated large numeric setting such as auto_for.
Member

Shader preparation and Radeon gameplay evidence

Two fresh-cache pairs on Windows with an RTX 4070 (NVIDIA 621.01), Native HDR, PsychoV35 and Compile Shaders Most compared baseline 694ae582 with PR revision 7d4deb29. The second pair reversed the run order. Timing covers the shader preparation process.

Pair Baseline PR Added time
Baseline first 464.22 s 490.80 s 26.58 s
PR first 427.29 s 452.25 s 24.95 s

Average overhead was 25.76 s (+5.8%). Both pairs built 38,192 → 68,515 graphics pipelines (+30,323). Compute pipelines held at 5,006. All four preparations completed successfully. First-draw compiles and gameplay frame times still need a matched route test.

Nwgat reported that pop-in was largely gone on the RX 9070 XT, Windows 11, AMD 26.11.2. After teleporting to a new area and toggling HDR with PsychoV35 selected, they saw no white textures or slow reload during that session. Their log identified the build as 7d4deb29-dirty. Broader live-switch behavior and Radeon 8060S coverage remain open.

These results apply to the tested builds. The current PR head still needs a fresh-cache preparation and first-entry route comparison.

### Shader preparation and Radeon gameplay evidence Two fresh-cache pairs on Windows with an RTX 4070 (NVIDIA 621.01), Native HDR, PsychoV35 and Compile Shaders Most compared baseline `694ae582` with PR revision `7d4deb29`. The second pair reversed the run order. Timing covers the shader preparation process. | Pair | Baseline | PR | Added time | | --- | ---: | ---: | ---: | | Baseline first | 464.22 s | 490.80 s | 26.58 s | | PR first | 427.29 s | 452.25 s | 24.95 s | Average overhead was **25.76 s (+5.8%)**. Both pairs built **38,192 → 68,515 graphics pipelines (+30,323)**. Compute pipelines held at 5,006. All four preparations completed successfully. First-draw compiles and gameplay frame times still need a matched route test. Nwgat reported that pop-in was largely gone on the **RX 9070 XT, Windows 11, AMD 26.11.2**. After teleporting to a new area and toggling HDR with PsychoV35 selected, they saw no white textures or slow reload during that session. Their log identified the build as `7d4deb29-dirty`. Broader live-switch behavior and Radeon 8060S coverage remain open. These results apply to the tested builds. The current PR head still needs a fresh-cache preparation and first-entry route comparison.
style(builder): fix PsychoV35 preparation lint
Some checks failed
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Successful in 19s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
PR description / Title and description (pull_request_target) Successful in 8s
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
0d07f3617f
Apply CI rustfmt output and collapse the receipt guard without changing when preparation is recorded.

Assisted-by: OpenAI Codex
fix(builder): key shader preparation by the settings the child reads
Some checks failed
CI / What the change needs (pull_request) Successful in 12s
CI / Third-party parts and guide screenshots (pull_request) Successful in 17s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m7s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m31s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m37s
CI / Website build and checks (pull_request) Failing after 1m24s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m18s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 19m9s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 32m33s
beanstalk/approval can't be tested as asked: see the farm's comment
PR description / Title and description (pull_request_target) Successful in 11s
2f259a85ec
A headless preparation exits before legacy settings are carried into a profile. Use defaults for that case and retire enabled receipts that could have been certified against the wrong file.

Assisted-by: OpenAI Codex
Member

@Beanstalk Please propose a matched cold shader-preparation and first-entry comparison for Longshot PR #2765 at 2f259a85ecea85b3b86650cedf9281421bd170ae against official 1413b172907220e21ae0f9503e040d0b115bcda9. Hold execution until the changed Builder checks have passed and a BigBean approves this exact head. Verify both revisions before building. Use each volunteer’s local game inputs and a disposable profile.

Coverage requested where the available machine can present Native HDR: Windows discrete Radeon RX 6000–9000, Linux desktop Radeon RADV and NVIDIA RTX, and Steam Deck OLED in Gamescope. If Native HDR is unavailable on that system, label it as an SDR control and verify preparation and first entry still work. Local Windows RTX 4070 and volunteer Windows Radeon 8060S are being coordinated separately.

Use Native HDR, PsychoV35, Compile Shaders Most, frame generation Off, and matched resolution and upscaler settings per PC. Start each arm with independent cold shader and driver pipeline caches. Use a fixed initial save and the same first entry from Hyrule Field into Castle Town Market. Verify the effective HDR mode and the preparation ran against the selected profile. Where supported, run two pairs in reversed order. Give preparation elapsed time, graphics and compute pipeline counts, first-entry pipeline compiles or wait time, and build and run outcome. Have an observer report any visible pop-in. If no approved route or expected save is available, record that limitation rather than substituting a warm run. Share only the aggregate results and test environment.

@Beanstalk Please propose a matched cold shader-preparation and first-entry comparison for Longshot PR #2765 at `2f259a85ecea85b3b86650cedf9281421bd170ae` against official `1413b172907220e21ae0f9503e040d0b115bcda9`. Hold execution until the changed Builder checks have passed and a BigBean approves this exact head. Verify both revisions before building. Use each volunteer’s local game inputs and a disposable profile. Coverage requested where the available machine can present Native HDR: Windows discrete Radeon RX 6000–9000, Linux desktop Radeon RADV and NVIDIA RTX, and Steam Deck OLED in Gamescope. If Native HDR is unavailable on that system, label it as an SDR control and verify preparation and first entry still work. Local Windows RTX 4070 and volunteer Windows Radeon 8060S are being coordinated separately. Use Native HDR, PsychoV35, Compile Shaders Most, frame generation Off, and matched resolution and upscaler settings per PC. Start each arm with independent cold shader and driver pipeline caches. Use a fixed initial save and the same first entry from Hyrule Field into Castle Town Market. Verify the effective HDR mode and the preparation ran against the selected profile. Where supported, run two pairs in reversed order. Give preparation elapsed time, graphics and compute pipeline counts, first-entry pipeline compiles or wait time, and build and run outcome. Have an observer report any visible pop-in. If no approved route or expected save is available, record that limitation rather than substituting a warm run. Share only the aggregate results and test environment.
Member

Beanstalk test farm

Commit 0b1ea3d · approved by nobody yet · dashboard

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

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `0b1ea3d` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/2765) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
Merge current main into PsychoV35 preparation
Some checks failed
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Failing after 15s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 15s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m26s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m4s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m45s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 4m54s
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Failing after 12s
CI / Website build and checks (pull_request) Failing after 2m18s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 16m32s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 34m59s
0b1ea3daa5
HumanBean changed title from WIP: fix(vk): with PsychoV35, the shader preparation builds the scene's pipelines in RGBX16F too, so they no longer compile when first drawn to fix(vk): with PsychoV35, the shader preparation builds the scene's pipelines in RGBX16F too, so they no longer compile when first drawn 2026-11-29 18:42:19 +00:00
HumanBean deleted branch fix/psychov35-scene-pipelines 2026-11-29 18:42:28 +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!2765
No description provided.