fix(pipelines): run All prediction after preparing on Most #713

Merged
HumanBean merged 3 commits from klimovich008/Longshot:fix/prepare-all-after-most into main 2026-11-15 17:51:18 +00:00
Contributor

Type: fix · Risk: low · Tested on: Windows, RX 9070 XT (26.10.2 and 26.11.1); Linux clang 21 · Needs: none

Why

Choosing All after preparing on Most can finish without predicting any pipelines. Those missing pipelines must then be built during play.

How to reproduce

Seen on: Windows 11, RX 9070 XT, driver 26.10.2.
Settings and switches: prepare on Most, then request All without changing the input or driver.
Steps: run longshot.exe --prepare-shaders --compile-shaders all on that folder.
Expected: prediction runs.
Actual: preparation returns without prediction.

What changed

Explicit All also runs when its prediction-completion record is missing or invalid. Valid completed work, including zero keys, stays skipped.

  • vk_main.cpp: check completion before skipping explicit All.
  • vk_draw.cpp: share the stamped reader; reject truncated or trailing data before allocating.
  • Tests and two tested-run files record the regression.

Measurements

Verdict: Fails on the old code, passes now. This fixes the skipped prediction; it does not claim universal pipeline coverage or a gameplay speedup.

main: 35465d12 (2026-11-15)
this PR: codex/prepare-all-after-most @ d252a220

Baseline: API22 base 82886e89; both native arms retain identical pipeline-cache/progress changes. The source difference is this fix; the new pack also restores the base renderer profile. No timings are compared.
Hardware: Windows 11 Home N 26300; RX 9070 XT, 26.10.2; Ryzen 7 5700X3D, 64 GB.
Scene: preparation before the title; no gameplay frames.
How to reproduce: finish Most preparation, then run longshot.exe --prepare-shaders --compile-shaders all.
Method: preparation CLI before the title; completion files set aside to match the genuine Most base. Both arms use RX_VK_PREDICT_S=1.

Check Before: baseline @ f7fc0b73 After: backport @ a3e58d2f
Prediction entered No Yes; deliberately limited

Flags and settings

No new switches. The short native regression check used the same limit in both arms; the separate All sanity used defaults.

Flag Before this PR After this PR Effect Recommendation
RX_VK_PREDICT_S 1 in regression check; unset in sanity Same Limits the regression check to entering prediction Leave unset for normal preparation

Testing

Tested: python -I -B tests/test_prepare_cache_save.py --cxx clang++; missing/corrupt/zero-key records, scheduling, progress, save. Native AMD red/green above.

python -I -B tests/run_all.py --jobs 4: 536 pass, 19 fail, 38 skip. All 19 fail on clean35465d12 too: test_appimage_player_build, test_cpm_discovery, test_cpp_preflight, test_crash_dialog, test_env_on, test_fpx_sticky, test_lift_cleanup_error, test_linux_preflight, test_make_game_cache, test_make_game_prepare, test_missing_nup, test_oot_state_tap, test_readback_late, test_release, test_spawn_emit, test_tested_configurations, test_vk_pgo, test_vram_budget_row, test_walk_key.

Linux clang 21: the regression fixture passes and both changed C++ files compile with the project's Linux flags. Windows native backport linked and ran. No Linux module link or gameplay run.

Not tested: gameplay performance, other GPU drivers, an isolated full same-driver Most-to-All upgrade.

Default-All sanity on AMD26.11.1 also completed in both API22 integration builds, with zero failed/missing noted graphics or computes. These include other cache fixes; their times are not compared. The new tested records name those builds.

Must be tested: None for the scheduling regression. This does not claim universal pipeline coverage.

Risks

What could break: invalid completion records cause an explicit All request to predict again.
Turning it off: revert the commit.
Compatibility: saves, options, translated shaders, GPU cache format and renderer ABI stay unchanged. Automatic startup retry/give-up rules are unchanged.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (tracker searched; no matching issue).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).

  • A game-free test added for the fix, failing on main and passing here.

  • A check under tests/ that reads changed source updated in this PR, not weakened.

  • Docs updated.

  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.

**Type:** fix · **Risk:** low · **Tested on:** Windows, RX 9070 XT (26.10.2 and 26.11.1); Linux clang 21 · **Needs:** none ## Why Choosing All after preparing on Most can finish without predicting any pipelines. Those missing pipelines must then be built during play. ## How to reproduce **Seen on:** Windows 11, RX 9070 XT, driver 26.10.2. **Settings and switches:** prepare on Most, then request All without changing the input or driver. **Steps:** run `longshot.exe --prepare-shaders --compile-shaders all` on that folder. **Expected:** prediction runs. **Actual:** preparation returns without prediction. ## What changed Explicit All also runs when its prediction-completion record is missing or invalid. Valid completed work, including zero keys, stays skipped. - `vk_main.cpp`: check completion before skipping explicit All. - `vk_draw.cpp`: share the stamped reader; reject truncated or trailing data before allocating. - Tests and two tested-run files record the regression. ## Measurements **Verdict:** Fails on the old code, passes now. This fixes the skipped prediction; it does not claim universal pipeline coverage or a gameplay speedup. main: 35465d12 (2026-11-15) this PR: codex/prepare-all-after-most @ d252a220 **Baseline:** API22 base 82886e89; both native arms retain identical pipeline-cache/progress changes. The source difference is this fix; the new pack also restores the base renderer profile. No timings are compared. Hardware: Windows 11 Home N 26300; RX 9070 XT, 26.10.2; Ryzen 7 5700X3D, 64 GB. Scene: preparation before the title; no gameplay frames. How to reproduce: finish Most preparation, then run `longshot.exe --prepare-shaders --compile-shaders all`. Method: preparation CLI before the title; completion files set aside to match the genuine Most base. Both arms use `RX_VK_PREDICT_S=1`. | Check | Before: baseline @ f7fc0b73 | After: backport @ a3e58d2f | |---|---|---| | Prediction entered | No | Yes; deliberately limited | ### Flags and settings No new switches. The short native regression check used the same limit in both arms; the separate All sanity used defaults. | Flag | Before this PR | After this PR | Effect | Recommendation | |---|---|---|---|---| | `RX_VK_PREDICT_S` | 1 in regression check; unset in sanity | Same | Limits the regression check to entering prediction | Leave unset for normal preparation | ## Testing **Tested:** `python -I -B tests/test_prepare_cache_save.py --cxx clang++`; missing/corrupt/zero-key records, scheduling, progress, save. Native AMD red/green above. `python -I -B tests/run_all.py --jobs 4`: 536 pass, 19 fail, 38 skip. All 19 fail on clean35465d12 too: `test_appimage_player_build`, `test_cpm_discovery`, `test_cpp_preflight`, `test_crash_dialog`, `test_env_on`, `test_fpx_sticky`, `test_lift_cleanup_error`, `test_linux_preflight`, `test_make_game_cache`, `test_make_game_prepare`, `test_missing_nup`, `test_oot_state_tap`, `test_readback_late`, `test_release`, `test_spawn_emit`, `test_tested_configurations`, `test_vk_pgo`, `test_vram_budget_row`, `test_walk_key`. Linux clang 21: the regression fixture passes and both changed C++ files compile with the project's Linux flags. Windows native backport linked and ran. No Linux module link or gameplay run. **Not tested:** gameplay performance, other GPU drivers, an isolated full same-driver Most-to-All upgrade. Default-All sanity on AMD26.11.1 also completed in both API22 integration builds, with zero failed/missing noted graphics or computes. These include other cache fixes; their times are not compared. The new tested records name those builds. **Must be tested:** None for the scheduling regression. This does not claim universal pipeline coverage. ## Risks **What could break:** invalid completion records cause an explicit All request to predict again. **Turning it off:** revert the commit. **Compatibility:** saves, options, translated shaders, GPU cache format and renderer ABI stay unchanged. Automatic startup retry/give-up rules are unchanged. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (tracker searched; no matching issue). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. - [x] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths.
Assisted-by: OpenAI Codex
docs(tested): record Most-to-All preparation regression
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 16s
3a30d7a7fc
Assisted-by: OpenAI Codex
klimovich008 changed title from WIP: fix(vk): All after a Most preparation predicts the pipelines it skipped to WIP: fix(pipelines): run All prediction after preparing on Most 2026-11-15 05:46:33 +00:00
klimovich008 force-pushed fix/prepare-all-after-most from 3a30d7a7fc
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 16s
to d252a220a1
All checks were successful
PR description / Description follows the template (pull_request_target) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
2026-11-15 10:45:20 +00:00
Compare
Author
Contributor

Rebased onto main 35465d12 (d252a220, Codex's source; only this PR's five files plus two sanity run records). Both default-All preparations on the new AMD driver 26.11.1 completed (24,626 graphics + 9,687 compute pipelines noted, none missing); full suite 536/19/38 with the same 19 failures as clean main; Linux clang 21 compiles the changed files. Taking it out of WIP.

Rebased onto main 35465d12 (d252a220, Codex's source; only this PR's five files plus two sanity run records). Both default-All preparations on the new AMD driver 26.11.1 completed (24,626 graphics + 9,687 compute pipelines noted, none missing); full suite 536/19/38 with the same 19 failures as clean main; Linux clang 21 compiles the changed files. Taking it out of WIP.
klimovich008 changed title from WIP: fix(pipelines): run All prediction after preparing on Most to fix(pipelines): run All prediction after preparing on Most 2026-11-15 10:45:23 +00:00
Author
Contributor

Refreshed onto main 35465d12 (d252a220; the fix c6d896f4 plus two tested-run records): the regression fixture fails on the old code and passes here, the full suite fails only the 19 tests that also fail on clean 35465d12, and default All preparation on AMD 26.11.1 completed with nothing missing in both integration builds. The tracker search found no matching issue. Out of WIP.

Refreshed onto main 35465d12 (d252a220; the fix c6d896f4 plus two tested-run records): the regression fixture fails on the old code and passes here, the full suite fails only the 19 tests that also fail on clean 35465d12, and default All preparation on AMD 26.11.1 completed with nothing missing in both integration builds. The tracker search found no matching issue. Out of WIP.
HumanBean deleted branch fix/prepare-all-after-most 2026-11-15 17:51:20 +00:00
All checks were successful
PR description / Description follows the template (pull_request_target) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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!713
No description provided.