Skip to content

RT-191: README: say what the pipelines stage does today - #2815

Merged
ItsNotRexed merged 2 commits into
ProjectLeonida:mainfrom
iurysf:leonida/readme-pipeline-cache
Nov 22, 2026
Merged

ItsNotRexed merged 2 commits into
ProjectLeonida:mainfrom
iurysf:leonida/readme-pipeline-cache

Conversation

@iurysf

@iurysf iurysf commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

RT-191. Claimed in #2716 (#2716 (comment)), from @gkissel's finding (#2716 (comment)).

The README said the pipelines stage saves a pipeline cache "so the first boot doesn't compile them". Nothing in runtime/src or runtime/shims reads pipeline_cache.bin yet: make_game.py runs vk_pipeline_check (from runtime/test), which writes it to --out (make_game.py:1395-1438), and the only runtime mention is the D3D-34 note in runtime/src/cached_pso.h:3.

The sentence now says what the stage does: create every translated shader on the GPU driver, check that they compile, save pipeline_cache.bin in --out, and that the runtime doesn't load it yet.

When D3D-34 (#367) lands, this sentence should change back to the first-boot benefit; #367 doesn't touch this line today (it edits README around line 55), so there is no textual conflict.

Docs only, 1 file, +3/-2.

Tested on ec8ec4c9 (Windows 11, Python 3.14): python -I tests/test_docs_design_rows.py, test_docs_links.py, test_docs_list_items.py, test_docs_repo_paths.py, test_i18n_index.py, test_text_write_line_endings.py: all pass, same counts as main. No GPU involved.

AI-assisted: written and checked with Claude (via OpenBot); reviewed before submitting.

The README said the pipelines stage saves a pipeline cache "so the first
boot doesn't compile them". Nothing in runtime/src or runtime/shims reads
pipeline_cache.bin yet (only vk_pipeline_check in runtime/test writes it;
D3D-34 / ProjectLeonida#367 is meant to load it), so the sentence promised something the
runtime does not do.

Reword it to what make_game.py does: create every translated shader on the
GPU driver, check that they compile, and save the cache to
pipeline_cache.bin in --out, and say the runtime does not load it yet.

Claimed in ProjectLeonida#2716. Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_{design_rows,links,list_items,repo_paths}.py,
tests/test_i18n_index.py and tests/test_text_write_line_endings.py pass
(Windows 11, docs only; no GPU involved).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
@iurysf iurysf changed the title README: say what the pipelines stage does today RT-191: README: say what the pipelines stage does today Nov 22, 2026
@Yourrespawn

Copy link
Copy Markdown
Contributor

Verified against the tree on Windows 11 Pro 10.0.26200: the new sentence is accurate.

  • Nothing in runtime/src or runtime/shims references pipeline_cache.bin at all — zero hits for pipeline_cache across both trees. The nearest thing is the D3D-34 note in runtime/src/cached_pso.h:3, which mentions the concept ("D3D-34 seeds a VkPipelineCache from the build") but no file — so "the runtime doesn't load that cache yet" is exactly right, and the README's old claim ("so the first boot doesn't compile them") was wrong as written.
  • make_game.py confirmed: the pipelines stage writes the cache to os.path.join(out, "pipeline_cache.bin") (make_game.py:1398) and runs vk_pipeline_check over every module — "creates every translated shader on your GPU driver, checks that they compile, and saves a pipeline cache to pipeline_cache.bin in --out" maps one-to-one onto that code.
  • The no-conflict claim about Runtime: use the Vulkan pipeline cache produced by the build (D3D-34) #367 also holds: its README edit is at line ~52, this edits line ~134.

Docs-only, no test runs needed; the line numbers in the body (make_game.py:1395-1438) match the code on ec8ec4c9.

AI-assisted (ZCode agent): the verification was executed by a coding agent on this machine.

@ramenbellic

Copy link
Copy Markdown

Code read of ac028aa: confirmed. make_game.py:1397 writes pipeline_cache.bin into --out, and nothing in runtime/src or runtime/shims reads it (the only mention is the D3D-34 note at runtime/src/cached_pso.h:3), so "doesn't speed up the first boot" is accurate.

One nit on README.md:137, "checks that they compile": the stage's own log line (make_game.py:1394, "creating every shader module and compute pipeline") says it creates a module for every shader and a pipeline only for compute shaders. For graphics shaders, module creation usually doesn't run the driver's compiler, so "creates every translated shader module (and a pipeline for each compute shader)" would match the tool. Docs tests (design_rows, links, list_items, repo_paths) pass on ac028aa.

AI-assisted code read (Claude Code).

@iurysf

iurysf commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the read. I checked the nit: make_game.py runs vk_pipeline_check with no --stage filter (base = [exe, spirv, cache, ...], make_game.py:1402), and the checker's header (runtime/test/vk_pipeline_check.cpp:2-9) says it builds a real pipeline for every entry: compute through vkCreateComputePipelines, and ps/vs/ms/gs through vkCreateGraphicsPipelines with partner stubs from tools/spirv_stubs.py; shaders without the needed features or stubs are skipped. So graphics shaders do go through the driver's compiler, and "checks that they compile" holds. It's the log line at make_game.py:1394 ("creating every shader module and compute pipeline") that is out of date; I'll post that as a finding: rather than widen this PR.

AI-assisted (Claude, via OpenBot).

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on the PR head: docs checks test_docs_links.py 5, test_docs_repo_paths.py 2, test_docs_list_items.py 2, test_docs_design_rows.py 2; git diff --check clean.

Fact-check: make_game.py:1397 writes <out>/pipeline_cache.bin, and nothing in runtime/src or runtime/shims reads it; the only reference is the future-work note in runtime/src/cached_pso.h. The new README wording is accurate.

Non-blocking: make_game.py:26-27 still says the cache is saved "so the first boot doesn't compile", which now contradicts the README. Approve.

@tupacfan04

Copy link
Copy Markdown
Contributor

Docs tests pass on the merged tree (design rows 2, links 5, list items 2, repo paths 2, i18n 5, line endings 2). The core correction matches make_game.py:1386-1439 and runtime/test/vk_pipeline_check.cpp: the stage writes <out>/pipeline_cache.bin, and the runtime has no loader for it yet.

One wording nit: "creates every translated shader ... checks that they compile" overstates it - unsupported shaders are reported skipped rather than failed (vk_pipeline_check.cpp:8-9, and it exits 0 when only skips occurred). "every shader the GPU supports, with skipped ones reported" would be exact.

AI-assisted review, docs only.

… claim

Review follow-ups on ProjectLeonida#2815 (RT-191):
- vk_pipeline_check reports shaders whose features or partner stubs are
  unavailable as skipped rather than failed (vk_pipeline_check.cpp:8-9),
  so the README now says the stage reports any it has to skip.
- make_game.py's module docstring still said the cache is saved "so the
  first boot doesn't compile", which contradicts the README; it now says
  the stage builds pipelines for every shader (not only compute), reports
  rejected and skipped ones, and that the runtime doesn't load the cache yet.

Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_*.py, test_i18n_index.py,
test_text_write_line_endings.py and every tests/test_make_game_*.py pass;
compileall clean (Windows 11, Python 3.14; no GPU involved).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
@iurysf

iurysf commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @Kam471 and @tupacfan04. Pushed 3a52b21 with both follow-ups:

  • README: the stage now "reports any it has to skip", since vk_pipeline_check reports shaders without the needed features or partner stubs as skipped, not failed (vk_pipeline_check.cpp:8-9).
  • make_game.py docstring (lines 26-28): no longer says the cache is saved "so the first boot doesn't compile"; it now says the stage builds a pipeline for every shader (not only compute), reports rejected and skipped ones, and that the runtime doesn't load the cache yet. This doesn't touch line 1394, which make_game.py: the pipelines stage log names graphics pipelines too #2923 fixes.

Tested on this head: tests/test_docs_*.py, test_i18n_index.py, test_text_write_line_endings.py and every tests/test_make_game_*.py pass; compileall is clean (Windows 11, Python 3.14).

AI-assisted (Claude, via OpenBot).

@ItsNotRexed
ItsNotRexed merged commit 8a84bf5 into ProjectLeonida:main Nov 22, 2026
ItsNotRexed pushed a commit that referenced this pull request Nov 22, 2026
The stage runs vk_pipeline_check without a --stage filter and the checker's default is all: cs become
compute pipelines, ps/vs/ms/gs become graphics pipelines with partner stubs (runtime/test/vk_pipeline_check.cpp),
so the announce line claiming compute only misled a review of #2815 (RT-191) into thinking graphics shaders
are only turned into modules. The line now says compute and graphics; a regression test pins the announce
line and fails on the old wording. Found by @iurysf.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants