mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #387] make_game, runtime: the executable's embedded shaders are translated and loaded, again (RT-EXE-SHADERS) #439
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#439
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/387
Author: @Mumogg
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:exe-shaders📝 Commits (1)
54bcd56make_game, runtime: translate and load game_scarlett_master.exe embedded shaders📊 Changes
6 files changed (+558 additions, -19 deletions)
View changed files
📝
docs/embedded_shaders.md(+20 -8)📝
make_game.py(+84 -1)📝
runtime/src/shader_library.h(+14 -6)📝
runtime/test/shader_library_corpus_test.cpp(+4 -4)📝
runtime/test/shader_library_test.cpp(+60 -0)➕
tests/test_exe_shaders_stage.py(+376 -0)📄 Description
Claimed in #14 as
RT-EXE-SHADERS. Independent of my other open pull requests: it is based onmainalone.What and why
The retail executable carries a few shaders of its own (FSSM programs in DXIL containers,
docs/embedded_shaders.md). At startup the title creates six pipelines from them. Onmainnothing translates them and the runtime's shader library does not look for them, so each creation fails withno translated vs for FSSM sha256 ....Commit
ab03d8dd1by Faterek (-x, authorship kept; an ancestor ofmainwhose content is not in the tree) does both halves:make_game.py: anexe_shadersstep in the shaders stage carves, unpacks, disassembles and translates the executable's containers into<work>/shaders/spirv/exe, after the BVH builder's.runtime/src/shader_library.h:load()also reads<dir>/exe/index.json; its entries are namedexe/<name>, found byfssm_sha256like the game's own shaders, and counted byexe_size().Adapted to
main, as the commit message says: theexefolder is loaded aftermain'slibraryfolder (#19),shaders()callsexe_shadersafterlibrary_shaders, and the test's fake FSPX index carriesfspx_code_sha256, whichfspx_cache_completeneeds now.Overlap with #303: that draft carries tedin7's later version of the build half (old PR 10036) with its own
tests/test_exe_shaders_stage.py. It does not have the runtime half. The two cannot both land as they are: if #303 is preferred formake_game.py, I will cut this down to theshader_library.hchange and its tests. I took the one fix this copy of the test needed from that newer copy.Measured
Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off. The boot run is on
mainece4ba5b3with my stacked pull requests up to #385 and with #142, #219 and #328, because the pipelines are only reached that far in; the work folder already held the translatedexefolder (13 files) from an earlier build of the same step.--runID3D12Device2::CreatePipelineStateThe run then goes on as before, to command-queue slot 35 being refused.
Tests, all without game files:
python -I tests/test_exe_shaders_stage.py: 10 tests, OK.tests/test_library_shaders_stage.pyandtests/test_bvh_shaders_stage.py: OK.python -m compileall -q make_game.py tools tests: clean.shader_library_testunder Wine: passes, with the commit'sexefolder case (entries found by FSSM hash, the main index first when both hold a program, a broken or missingexe/index.jsonleaves the others loaded).Not run here: the
exe_shadersstep itself against my copy on this tree (the measurement above uses the folder an earlier build made), MSVC, Windows.AI-assisted (Claude Code); built and run on the machine above.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.