feat(tools): build and test a title's shader set as part of the build #33
No reviewers
Labels
No labels
accessibility
bug
ci
docs
documentation
duplicate
enhancement
fixes issue
good first issue
help wanted
invalid
library request
libs
needs rebase
question
relinker
stale
tools
unblocks title
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Dark3581--AnyBox!33
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/33/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Dark3581 on GitHub · 2026-11-22 09:56 UTC · original
Dark3581:feat/shader-build→main· +618 −0 · 8 files · 1 commits · merged 2026-11-22 09:59 UTCWhat
A title's shader set can now be built and tested as part of the build, from your own package and into the build folder, so nothing of it is ever committed.
cmake/Shaders.cmake: with-DANYBOX_GAME_PACKAGE=<package>and-DANYBOX_SHADER_TRANSLATOR=<checkout>(both or neither), configure adds the targetsshaders(the external translator's shader stage intobuild/shaders/work, then the store inbuild/shaders/store),shader_store(store only) andshader_pipelines(every pipeline on this PC's GPU, with its cache inbuild/shaders). Optional:ANYBOX_PIPELINE_CHECK,ANYBOX_SHADER_JOBS,ANYBOX_WAVE64_EMULATE. Without the two paths nothing changes.tools/build_shaders.pyruns those steps and writesbuild/shaders/build.json: translator revision and whether it had local changes, carved and translated counts, store counts, pipeline totals with the name of each failed or skipped pipeline, plustranslate.logandpipelines.log. A new translation drops older store and pipeline results so tests cannot pass on stale data. The translator stays a separate program called by path; AnyBox contains none of it.shaders(registered only when configured):shaders_store(every carved shader translated, a complete store, and the C++ store ind3d12_xfinds every container with the translation's stage),shaders_gpu(gpu_report.py --storefinds a device for every module; skipped without Vulkan),shaders_pipelines(the last pipeline run completed with no failure; skipped until it has run).Tested
shaders_pipelinesskipped), and the default configuration is unchanged.check_conventions.pypasses.tools_test_build_shaders(11 cases, in CI, no game data): a fake translator and a fake checker cover translation, store, pipelines, translator failure, an incomplete store, a failed pipeline, stale-result dropping, missing inputs and the summary parser (including a crashed run with no summary).cmake --build build --target shaderscarved and translated 26,503 shaders in 72 minutes (wave64 emulation on); the store holds 25,889 modules, 614 duplicates, 0 missing, 0 invalid, 0 conflicts.shaders_storefound 26,503 of 26,503 containers through the C++ store (10 s);shaders_gpupasses on an RTX 3070 Ti. The pipeline target is running separately. No game data in the PR.Checklist
main; no other open PR implements the same functionspython tools/check_conventions.pypasses (no comments in code, one declaration per export, Conventional Commit subjects)AbxNotImplemented/AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragmentdocs/dev/debt/changes/<branch>.md(none: no library behaviour changes)