Precompile separate shader indexes (BUILD-LIBRARY-PIPELINE-PRECOMPILE) #1157

Closed
github-bot wants to merge 1 commit from gh-pr/1157/head into gh-pr/1157/base
Owner

@⁠silas-rbus on GitHub · 2026-11-24 19:21 UTC · original
codex/library-pipeline-precompile → main · +125 −25 · 3 files · 1 commits · closed without merging

Claimed in the coordination issue as: BUILD-LIBRARY-PIPELINE-PRECOMPILE (claim)

What and why

The pipelines stage checked only the main translated shader index. The shader stage also writes separate library, FSPX and executable indexes. Their pipelines could therefore be compiled during boot even after an offline pipelines pass.

  • Check each available separate index before the main corpus, saving all passes into the same pipeline_cache.bin that the runtime loads. This includes the library compute pipelines requested through slot 67.
  • Keep separate in-flight, skip and JSON crash reports for each index. A module name skipped in one index can still compile in another, and a validation failure does not hide later indexes.
  • Require a checker with report and bounded-range support when separate indexes exist. The existing corpus-only fallback for older checkers remains.
  • Document the build order and reporting.

This changes offline cache coverage. A retail startup or cache-hit speedup has not been measured here. Related: #984 tracks BVH precompilation separately; this PR does not include BVH behavior.

Tested

  • Windows 11, Python 3.14.7: python -I tests/test_make_game_pipeline_batches.py (19 passed).
  • Windows 11, Python 3.14.7: python -I tests/test_make_game_pipelines.py (18 passed).
  • python -m compileall -q make_game.py tools tests.
  • python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_pipeline_batches.py docs/pipeline_check.md.
  • git show --check HEAD.
  • Baseline translator suite: python -I scripts/run_semantic_tests.py tests/semantic (470 files, 6,168 tests, 0 failed). This run started before the pipeline-stage edit; translator code is unchanged.

GPUs tested: none for this change (the checker in these tests is synthetic). Host GPU: NVIDIA GeForce RTX 5060 Ti, driver 610.88, Windows 11.

AI-assisted: yes (OpenAI Codex).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption, including in reports quoted here.
  • Translator contract table: not applicable; no translator rule changed.
**@⁠silas-rbus** on GitHub · 2026-11-24 19:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1157) `codex/library-pipeline-precompile` → `main` · +125 −25 · 3 files · 1 commits · closed without merging Claimed in the coordination issue as: BUILD-LIBRARY-PIPELINE-PRECOMPILE ([claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14)) ### What and why The pipelines stage checked only the main translated shader index. The shader stage also writes separate library, FSPX and executable indexes. Their pipelines could therefore be compiled during boot even after an offline pipelines pass. - Check each available separate index before the main corpus, saving all passes into the same pipeline_cache.bin that the runtime loads. This includes the library compute pipelines requested through slot 67. - Keep separate in-flight, skip and JSON crash reports for each index. A module name skipped in one index can still compile in another, and a validation failure does not hide later indexes. - Require a checker with report and bounded-range support when separate indexes exist. The existing corpus-only fallback for older checkers remains. - Document the build order and reporting. This changes offline cache coverage. A retail startup or cache-hit speedup has not been measured here. Related: #984 tracks BVH precompilation separately; this PR does not include BVH behavior. ### Tested - Windows 11, Python 3.14.7: python -I tests/test_make_game_pipeline_batches.py (19 passed). - Windows 11, Python 3.14.7: python -I tests/test_make_game_pipelines.py (18 passed). - python -m compileall -q make_game.py tools tests. - python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_pipeline_batches.py docs/pipeline_check.md. - git show --check HEAD. - Baseline translator suite: python -I scripts/run_semantic_tests.py tests/semantic (470 files, 6,168 tests, 0 failed). This run started before the pipeline-stage edit; translator code is unchanged. GPUs tested: none for this change (the checker in these tests is synthetic). Host GPU: NVIDIA GeForce RTX 5060 Ti, driver 610.88, Windows 11. AI-assisted: yes (OpenAI Codex). ### Checklist - [x] Based on current main and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption, including in reports quoted here. - [x] Translator contract table: not applicable; no translator rule changed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:40:44 +00:00
github-bot closed this pull request 2026-11-26 09:40:44 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:24 UTC · original · approved these changes

Reviewed and verified. Essential build pipeline enhancement in make_game.py (BUILD-LIBRARY-PIPELINE-PRECOMPILE). Safely precompiles separate library/, fspx/, and exe/ translation indexes into the shared pipeline_cache.bin before the main corpus index, with dedicated in-flight, skip, and crash-reporting files per index. Verified with tests/test_make_game_pipeline_batches.py. 100% clean-room.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1157#pullrequestreview-6045866138) · **approved these changes** Reviewed and verified. Essential build pipeline enhancement in make_game.py (BUILD-LIBRARY-PIPELINE-PRECOMPILE). Safely precompiles separate library/, fspx/, and exe/ translation indexes into the shared pipeline_cache.bin before the main corpus index, with dedicated in-flight, skip, and crash-reporting files per index. Verified with tests/test_make_game_pipeline_batches.py. 100% clean-room.
Author
Owner

@⁠silas-rbus on GitHub · 2026-11-24 19:24 UTC · original

CI and No Game Data are awaiting maintainer approval for this first-time fork. The focused local tests and game-data guard passed (details in the PR description). Please approve the workflows when convenient so I can address any failures.

**@⁠silas-rbus** on GitHub · 2026-11-24 19:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1157#issuecomment-7142049379) CI and No Game Data are awaiting maintainer approval for this first-time fork. The focused local tests and game-data guard passed (details in the PR description). Please approve the workflows when convenient so I can address any failures.
Author
Owner

@⁠hubeton on GitHub · 2026-11-24 19:32 UTC · original · edited 2026-11-24 19:50 UTC

Independent GPU check on Windows 11 build 26300, RTX 3060 Ti 8 GB (NVIDIA 621.24), Python 3.13.14. I ran make_game.py --stages check,pipelines on the same bounded sample with separate fresh caches and the same previously working vk_pipeline_check.exe (two jobs).
Test system: Intel Core i9-13900K (24 cores, 32 threads), 64 GB RAM, RTX 3060 Ti 8 GB, NVIDIA driver 621.24, Windows 11 build 26300.9974.

Revision Corpus Library FSPX EXE Final cache
Base 6293c1c4 8 2,110,798 B
PR 66dc3ab0 8 16 26 12 7,439,988 B

The PR compiled all 62 sample pipelines with zero failures or skips. The library, FSPX, EXE and corpus passes each wrote to the same cache, in that order. Both focused Python test suites passed (37 tests total).

A freshly built checker exited with 0xc0000409 under both versions of the pipeline stage on this machine. The table uses the older checker for both runs. This verifies offline pipeline coverage on this GPU. I did not measure runtime cache hits or boot time.

AI-assisted testing and report.

**@⁠hubeton** on GitHub · 2026-11-24 19:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1157#issuecomment-7142238051) · edited 2026-11-24 19:50 UTC Independent GPU check on Windows 11 build 26300, RTX 3060 Ti 8 GB (NVIDIA 621.24), Python 3.13.14. I ran `make_game.py --stages check,pipelines` on the same bounded sample with separate fresh caches and the same previously working `vk_pipeline_check.exe` (two jobs). Test system: Intel Core i9-13900K (24 cores, 32 threads), 64 GB RAM, RTX 3060 Ti 8 GB, NVIDIA driver 621.24, Windows 11 build 26300.9974. | Revision | Corpus | Library | FSPX | EXE | Final cache | |---|---:|---:|---:|---:|---:| | Base `6293c1c4` | 8 | | | | 2,110,798 B | | PR `66dc3ab0` | 8 | 16 | 26 | 12 | 7,439,988 B | The PR compiled all 62 sample pipelines with zero failures or skips. The library, FSPX, EXE and corpus passes each wrote to the same cache, in that order. Both focused Python test suites passed (37 tests total). A freshly built checker exited with `0xc0000409` under both versions of the pipeline stage on this machine. The table uses the older checker for both runs. This verifies offline pipeline coverage on this GPU. I did not measure runtime cache hits or boot time. AI-assisted testing and report.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:12 UTC · original

Recommendation: [MERGE]

Reasoning: The make_game pipelines stage also precompiles the separate library/FSPX/executable shader indexes into the same pipeline_cache.bin, so those pipelines aren't compiled at boot after an offline pass. Moderate build-pipeline change with tests. Independently verified by hubeton on an RTX 3060 Ti. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 4/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:12 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1157#issuecomment-7143186396) **Recommendation:** [MERGE] **Reasoning:** The `make_game` pipelines stage also precompiles the separate library/FSPX/executable shader indexes into the same `pipeline_cache.bin`, so those pipelines aren't compiled at boot after an offline pass. Moderate build-pipeline change with tests. Independently verified by hubeton on an RTX 3060 Ti. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 4/10

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.