Repository navigation
make_game: translate the retail executable's own 10 shaders; the shader library loads <shaders>/exe - #8303
make_game: translate the retail executable's own 10 shaders; the shader library loads <shaders>/exe#8303ramenbellic wants to merge 1 commit into
Conversation
…ary loads <shaders>/exe The shaders stage now runs exe_shaders() after the BVH builder step: the same pe_shader_containers / fssm_unpack / shader_disasm / rdna2spirv recipe on game_scarlett_master.exe, into <work>/shaders/exe and <work>/shaders/spirv/exe, with exe_build.json for reuse. A package without the executable skips the step and drops an index left by an earlier run. ShaderLibrary::load() reads <dir>/exe/index.json when it is there; the entries go into the table of the game's shaders, so graphics pipelines find them by (stage, fssm_sha256). exe_size() counts them and the corpus test leaves them out. Measured on 1.0.2.1 with --wave64-emulate: 10 containers, 10 unpacked, 10 translated, 10 spirv-val valid (1 vs, 9 ps). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013puXaEnm3gXuUo4XsSt4g4
|
I checked the previous coordination threads before starting hardware QA. #7746 already implements this same executable extraction stage and runtime index lookup. Its original claim was at 17:21 UTC, before the 18:12 UTC claim for this PR. One implementation detail worth carrying across is #7746’s fix in The paired Proton boot counts in this PR would also be useful on #7746 if reproduced against that head. AI-assisted QA. |
Claimed in the coordination issue: #8186 (comment) (new BUILD item)
Depends on: none (applies to
main).Problem
On the boot chain past stop 20 (#7154), graphics
CreatePipelineStatecalls fail with[rt] d3d12: no translated vs for FSSM sha256 …. The retail executable carries 10 shader containers of its own (1 vertex shader, 9 pixel shaders;docs/embedded_shaders.md, "Retail executable"). The tools already handle them (PSV0 stage, FSSM unpack, disassembly, translation), but no build step runs them and no index the runtime reads holds them.Change
make_game.py:exe_shaders(), called in theshadersstage afterbvh_shaders(). It mirrorsbvh_shaders():pe_shader_containers.py --extract→fssm_unpack.py→shader_disasm.py→rdna2spirv.pyinto<work>/shaders/exeand<work>/shaders/spirv/exe, withexe_build.jsonfor reuse. Without the executable in the game folder, it drops a stale index, logs one line and returns.runtime/src/shader_library.h:load()also reads<dir>/exe/index.json. Entries are namedexe/<name>and found by(stage, fssm_sha256)like the game's own shaders.exe_size()counts them.tests/test_exe_shaders_stage.py(7 tests, synthetic PSV0 containers, no game files),shader_library_test(vs and ps entries found by stage and hash, a brokenexe/index.jsonleaves the other indexes loaded), andshader_library_corpus_test(keepsexe_size()out of the RPF count).docs/embedded_shaders.md: the build step and the measured counts.Tested
python -I tests/test_exe_shaders_stage.py: 7 OK.test_bvh_shaders_stage.py,test_fspx_shaders_stage.py,test_pe_shader_containers.py: OK.compileallandmake_game.py --help: OK.shader_library_test(native build): OK.spirv-val. None of the 10(stage, hash)keys is in the main 26,503-entry index.ramenbellic:boot/retail-stack): the runtime loads 26,586 shaders instead of 26,576.no translated vslines go from 14 to 0, and failedCreatePipelineStatecalls from 16 to 2.tests/test_make_game_*andtest_docs_*files fail onmainas well (the same 14 failures with and without this change).GAME_EXEis a constant, likeBVH_DLLandFSPX_DLL; it is marked with ashortcut:comment. #8251 edits the same doc section (byte counts), so one of the two may need a small rebase.AI-assisted (Claude Code, implementation by a Claude subagent, reviewed and boot-tested in the parent session).
🤖 Generated with Claude Code
https://claude.ai/code/session_013puXaEnm3gXuUo4XsSt4g4