Skip to content

make_game, runtime: translate and load game_scarlett_master.exe embedded shaders - #7746

Closed
Faterek wants to merge 2 commits into
ProjectLeonida:mainfrom
Faterek:rt5-exe-embedded-shaders
Closed

Faterek wants to merge 2 commits into
ProjectLeonida:mainfrom
Faterek:rt5-exe-embedded-shaders

Conversation

@Faterek

@Faterek Faterek commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Claim: #7599 (comment)
Depends on: none

Summary

Wires game_scarlett_master.exe's 10 embedded console DXBC/XBCH/FSSM shaders (1 VS + 9 PS, documented in docs/embedded_shaders.md §2 via #6840) into make_game.py's shaders stage and runtime/src/shader_library.h, mirroring bvh_shaders() and <dir>/bvh/index.json:

  • make_game.py: adds EXE_FILE = "game_scarlett_master.exe", exe_settings(), exe_report(), and exe_shaders(), invoked from shaders() right after bvh_shaders().
    • Extracts into <work>/shaders/exe and translates into <work>/shaders/spirv/exe (without --max-shared-memory, since these are graphics shaders, while forwarding --no-asm, --wave64-emulate, and fallback flags).
    • Tracks inputs in <work>/shaders/spirv/exe/exe_build.json, cleans stale .dxbc/.fssm/.s/.spv/.spvasm before re-extracting, reports translated and missing stems on every run, and fails if 0 programs translate.
    • When game_scarlett_master.exe is absent, drops any stale spirv/exe/index.json + exe_build.json and skips cleanly so packages without the executable are unaffected.
  • runtime/src/shader_library.h: loads <dir>/exe/index.json alongside fspx and bvh under the "exe/" prefix (keyed by (stage, fssm_sha256)) and exposes exe_size(). Missing or malformed exe/index.json leaves the other indexes loaded.
  • runtime/test/shader_library_corpus_test.cpp: subtracts library.exe_size() from rpf_entries and prints executable index entry counts.
  • runtime/test/shader_library_test.cpp: adds synthetic tests for <dir>/exe/index.json (VS + PS lookup, input_signature, spirv(), exe_size(), coexistence with fspx//bvh//main, duplicate hash ordering, and missing/malformed exe/index.json).
  • tests/test_exe_shaders_stage.py: adds 10 synthetic standard-library unit tests (no game data) covering PSV0 VS/PS extraction + fssm_sha256 metadata, caching/invalidation, missing/removed executable cleanup, partial/empty translation handling, and whole-shaders() integration.
  • docs/embedded_shaders.md: updates §7 to document exe_shaders(), <dir>/exe/index.json, exe_size(), and the measured end-to-end counts.

Testing

  • python3 -m compileall -q make_game.py tools tests — pass
  • python3 -I make_game.py --help — pass
  • python3 -I tests/test_exe_shaders_stage.py — 10/10 OK
  • python3 -I tests/test_bvh_shaders_stage.py — 13/13 OK
  • python3 -I tests/test_fspx_shaders_stage.py — 22/22 OK
  • python3 -I tests/test_pe_shader_containers.py — 19/19 OK
  • python3 -I tests/test_docs_list_items.py and tests/test_docs_repo_paths.py — OK
  • python3 -I scripts/check_no_game_data.py on all 6 changed/added files — pass
  • cmake -S runtime -B runtime/build && cmake --build runtime/build && ctest --test-dir runtime/build --output-on-failure — 62/62 passed (2 skipped: shader_library_corpus, vk_sync_validation); shader_library_test passed
  • End-to-end check on local retail 1.0.2.1 game_scarlett_master.exe (temporary folder outside repo, deleted afterward):
    • make_game.exe_shaders() native: 10/10 translated and spirv-val valid (1 VS + 9 PS), 0.52 s; cached reuse 0.05 s
    • make_game.exe_shaders() --wave64-emulate: 10/10 translated and spirv-val valid (1 VS + 9 PS), 0.40 s; cached reuse 0.05 s
    • ShaderLibrary::load() on <work>/shaders/spirv: size=10, exe_size=10, all 10/10 (1 VS + 9 PS) found by (stage, fssm_sha256) with non-empty spirv()
    • vk_pipeline_check (native and --wave64-emulate):
      • AMD Radeon RX 9070 XT (RADV GFX1201, Mesa 26.2.6, Linux 7.3.4): 10/10 modules OK, 10/10 pipelines OK (0 failed, 0 skipped)
      • AMD Ryzen 7 9800X3D iGPU / Radeon 610M (RADV RAPHAEL_MENDOCINO, Mesa 26.2.6, Linux 7.3.4): 10/10 modules OK, 10/10 pipelines OK (0 failed, 0 skipped)

AI-assisted.

@shdann

shdann commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

AI-assisted review of ab03d8dd1 on Windows 11. The executable shader stage accepts an empty cached translation index. A fresh run treats the same result as a failure.

From the repository root, run this script with py -3.14 -I. It uses the PR’s synthetic fixture.

import sys
from pathlib import Path
sys.path[:0] = ["tests", "."]
from test_exe_shaders_stage import ExeStage
case = ExeStage()
case.setUp()
try:
    print(case.run_step())
    Path(case.spirv, "index.json").write_text("{}", encoding="utf-8")
    for attempt in range(2):
        print(case.run_step(), case.logs)
finally:
    case.doCleanups()

The first run calls all four tools. After the index changes to {}, both retries return [] and report 0 of 3. The runtime cannot find any executable shaders through that index. Please apply the fresh-build check to the cached result before returning. With these three translatable inputs, the first retry should rebuild the index and the second should reuse it.

py -3.14 -I tests/test_exe_shaders_stage.py passes all 10 tests on this head.

@LukeOsland1

Copy link
Copy Markdown
Contributor

Verified on native Windows at PR head ab03d8dd1 using a local Xbox Series 1.0.2.1 package. Both Windows drivers created all ten graphics pipelines in each translation mode, with zero failures or skips.

GPU and Windows driver Native translation Wave64 emulation enabled
NVIDIA GeForce RTX 4070 Ti SUPER, 610.88 10/10 10/10
AMD Radeon integrated graphics, 32.0.21042.62 10/10 10/10

Each run covered one vertex shader and nine pixel shaders. In both translation modes, all ten modules passed spirv-val --target-env vulkan1.2. I also checked lookup from the original containers: the runtime library resolved all ten to their expected executable-index entries and read a nonempty SPIR-V module for each.

A second shader-stage run in each mode preserved the translated output files and their modification times. All ten executable-shader stage tests and the synthetic runtime shader-library test passed. The hardware checks exercised pipeline creation; pixel output and retail boot remain unverified.

MSVC 19.51, RelWithDebInfo. AI-assisted with Codex. Coordination claim

@Impre-visible

Copy link
Copy Markdown

Tested ab03d8d on NVIDIA GeForce GTX 1660 (Turing, TU116, subgroup 32..32), driver 620.73.04 (proprietary, Vulkan 1.4.357), Arch Linux (kernel 6.18), Python 3.14.10, llvm-mc 23.1.5, SPIRV-Tools v2026.4, with my own package 1.0.2.1 including game_scarlett_master.exe (--check: "all files present. Executable found."): pass.

exe_shaders() and bvh_shaders() called from this head on a scratch --work folder, once with wave64 emulation and once without:

  • game_scarlett_master.exe: 10 of 10 programs translated (1 VS + 9 PS, as the PR says), 10 of 10 pass spirv-val, in both modes.
  • XboxBvhBuilder.dll (unchanged step, as a control): 52 of 52 translated, 52 of 52 pass spirv-val, in both modes.
  • vk_pipeline_check (built at 4c52ce2) on spirv/exe: 1 VS and 9 PS modules ok, 10 of 10 pipelines created, 0 failed, 0 skipped, in both modes. All 10 are wave64 graphics, created here without a required subgroup size (32-wide device).
  • vk_pipeline_check on spirv/bvh: 52 of 52 compute pipelines created, 0 failed, in both modes.
  • python -I tests/test_exe_shaders_stage.py: 10 tests OK.

Not run: the full shaders stage through make_game.py (I called the two steps directly), and the runtime's shader_library tests.

AI-assisted run (Claude). Counts only; nothing from the game leaves this machine.

@Faterek

Faterek commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @shdann for catching that — fixed in bc5fc47b9. exe_shaders() now checks if programs and len(programs[1]) < len(programs[0]): before reusing a cached result (matching the fresh-build check), and tests/test_exe_shaders_stage.py::ExeStage::test_empty_cached_index_is_rebuilt now covers both empty {} and all-error cached index.json files (rebuilding on the first retry and reusing on the second). Verified with your reproducer and python3 -I tests/test_exe_shaders_stage.py (11/11 OK).

Thanks also to @LukeOsland1 and @Impre-visible for the independent Windows and Linux hardware checks. AI-assisted.

@shdann

shdann commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

AI-assisted recheck of bc5fc47b9 on Windows. My empty-index case now passes. The first retry runs all four tools and restores all three synthetic shaders. The second retry reuses the index. All 11 tests pass with py -3.14 -I tests/test_exe_shaders_stage.py. I also ran the new regression test against parent ab03d8dd1. It fails there because the first retry runs zero tools. This resolves my finding.

@Doffi4

Doffi4 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Independent synthetic integration check for the boot stack: I combined #7529 b93ffa5 with both #7746 commits through bc5fc47. The three merge conflicts were in make_game.py (keep both stages), shader_library.h (keep both optional indexes), and shader_library_test.cpp (keep both fixtures). On Windows x64 MSVC Release / CPython 3.12.10, executable stage 11/11, compute-library stage 6/6, and CTest shader_library all passed. I also checked one ShaderLibrary instance loading both indexes simultaneously: the embedded VS resolved by its stage/FSSM key, and the library CS by FSPX code/state keys. This is synthetic integration, not retail boot or a rendered frame. AI-assisted testing.

@freemanovec

Copy link
Copy Markdown
Contributor

Tested bc5fc47b9 on the retail executable, AMD RX 7900 XTX, RADV Mesa 26.3.1, Linux (CachyOS, kernel 7.3.5), Python 3.14.10, llvm-mc 23.1.5: pass. This is the first check of the current head with an executable, and the first on RADV. Run by an AI agent (Claude Code) on this account; outcomes only.

  • exe_shaders() was called from this head on my own 1.0.2.1 package, with game_scarlett_master.exe (all 108 manifest files at their sizes), into a scratch work folder. It extracts 10 containers (1 rejected DXBC hit), and fssm_unpack finds 10 FSSM blobs with no problems. The disassembly is 10 clean. The translation gives 10 translated, 10 pass spirv-val, all tier A.

  • The same with emulate=True (--wave64-emulate) gives 10/10 translated and valid.

  • vk_pipeline_check (from main, with MESA_SHADER_CACHE_DISABLE=true):

    mode PS VS
    native 9/9 pipelines ok 1/1 pipelines ok
    --wave64-emulate 9/9 pipelines ok 1/1 pipelines ok
  • python -I tests/test_exe_shaders_stage.py: 11 tests OK.

  • Not run: the runtime shader_library tests and the full make_game.py shaders stage with this head.

@Doffi4

Doffi4 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Windows x64 integration result, using #7746 bc5fc47 with #7529 b93ffa5 and #6446 fb40ed3. Static extraction from a local 1.0.2.1 executable produced one VS and nine PS. LLVM 23.1.6 and SPIRV-Tools 2026.4: 10/10 translated and passed spirv-val for Vulkan 1.2 in each of the native and wave64-emulated configurations. vk_pipeline_check created 10/10 pipelines with zero skips in both configurations on Radeon 780M and RTX 5060 Laptop. The probe could not request 64-wide subgroups for those stages on the RTX, so this establishes compilation only, not native wave64 execution or a rendered frame. The executable was not run; all inputs and generated files stayed local. AI-assisted testing.

@ramenbellic

Copy link
Copy Markdown

Tested bc5fc47b against the retail executable under Proton (wine 11), RTX 3070, clang-cl 23.1.6 + xwin, own 1.0.2.1 copy, on the boot chain past stop 20 (#7154; ramenbellic:boot/retail-stack). Outcomes only: pass.

  • This PR's exe_shaders(), run alone on an existing work folder: 10 containers, 10/10 translated, 10 pass spirv-val (wave64 tier A: 10).
  • gta6rt --run: the shader library loads 26,586 entries (26,576 without the step). no translated vs lines go from 14 to 0, and failed CreatePipelineState calls from 16 to 2 (the remaining two aren't vertex-shader lookups).

I opened #8303 for the same change without seeing this one, and it is closed in favour of this PR. The results above are this PR's own code: the step was rerun from its branch and gta6rt built from it.

AI-assisted (Claude Code); outcomes only, no game data.

@Stalkerino

Copy link
Copy Markdown

I ran retail 1.0.2.1 under Proton CachyOS 11.0-20261015 with an RX 9070 XT (RADV) and Gamescope. I compared the same six graphics pipeline creations at device slot 86 on our local boot integration, which also includes #7880, #7286 and #7593.

Embedded programs available to Leonida Result of the six early CreatePipelineState calls
None 0 succeeded. All six stopped at the same missing VS.
Original VS only 0 succeeded. All six reached the PS lookup and stopped there.
Original VS + all nine PS 6 succeeded. No missing VS/PS messages.

The first three runs used the same binary with only the shader catalogue changed. I also built the integration with both commits from this PR, placed the ten translations in its normal spirv/exe directory, and repeated the retail launch without a catalogue override. All six creations again succeeded. The shader stage from bc5fc47b9 produced one VS and nine PS in native mode, and all ten modules passed spirv-val --target-env vulkan1.3.

This gives the executable shader change a measurable effect during retail startup. On this integration the runtime then accepted two ExecuteCommandLists calls and presented one black plane; the engine still reported Game Init, frame 0. No DrawInstanced or DrawIndexedInstanced appeared before exit. AI-assisted testing.

@airp1ane

Copy link
Copy Markdown
Contributor

Tested bc5fc47 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass.

Ran the test files this PR adds or changes, from a clean checkout of the PR head: test_exe_shaders_stage.py - all exit 0.

AI-assisted (Claude Code).

@Yoshi-OOF

Copy link
Copy Markdown

Independent Windows 11 / RTX 5070 Ti (621.24) integration: extracted 10 executable shaders (1 VS / 9 PS), all 10 translated and passed spirv-val with wave64 emulation (tier A). The runtime loaded all 10 from the optional exe subindex alongside the original corpus and FSPX/BVH/library subindexes. With the audio memory shims also integrated, the title reached its frame loop without skipping guest assertions: 118 DrawInstanced calls and 41 successful PresentX in 300 s. There were still 41 failed command-list closes and captured frames were black; this is evidence for shader ingestion and frame-loop progress, not visible output.

@MarcPique

Copy link
Copy Markdown

Tested bc5fc47b9c7b57f155166963b880154a7c0aa95d on native Windows 11 build 26200, CPython 3.12, LLVM 23.1.6 and SPIRV-Tools 2026.4. tests/test_exe_shaders_stage.py passed 11/11. Calling the PR's exe_shaders() on the local 1.0.2.1 executable translated and validated all 10 embedded programs with wave64 emulation.

Separate retail A/B on an RTX 4090 (driver 32.0.16.1656, Vulkan 1.4.351), using one offline integration binary based on #8134, with the slot-86 pipeline route and the A8 fix from #7403 already in both runs. The only A/B change was whether the runtime could see the optional index of the 10 embedded programs.

Embedded index Slot-86 pipeline objects DrawInstanced calls PresentX successes
Absent 0/14 (14 missing vertex shader lookups) 0 1
Present 14/14 1 1

Both runs still hit a later 0xC0000005. This isolates the value of the embedded shader stage without conflating it with the A8 change or claiming a playable boot. AI-assisted testing.

@miguelsilva5989

Copy link
Copy Markdown

Tested bc5fc47 on CachyOS, LLVM 23.1.5, RTX 5080 (620.70.06) and Ryzen 9 9900X Raphael iGPU (RADV Mesa 26.2.6). Called the PR's executable shader stage with a local copy. Both native and wave64-emulated translation produced 10/10 modules (1 VS, 9 PS). All passed spirv-val for Vulkan 1.2. vk_pipeline_check created 10/10 pipelines per GPU in each configuration, with zero skips. The probe compiled stages without a forced subgroup size where the device does not support requesting it.

The synthetic stage tests passed 11/11 and the shader-library unit test passed. This covers Linux translation, loading logic and pipeline creation. No title execution or captured frame. AI-assisted verification.

@KevinPratap

Copy link
Copy Markdown

Tested bc5fc47b9 on RTX 4050 Laptop (NVIDIA 592.82), Windows 11, MSVC 14.44 RelWithDebInfo, LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, gta6rt --run offline: pass.

Merged onto @tibzejoker's rt5-integration 5fef1f1b1 (no conflicts), with #7922. I ran this PR's exe_shaders steps by hand: pe_shader_containers.py --extract, fssm_unpack.py, shader_disasm.py --mcpu gfx1013, then rdna2spirv.py --no-asm --wave64-emulate. That gave 10 containers extracted, 10/10 disassembled clean and 10/10 translated, all wave64 tier A, into <work>/shaders/spirv/exe.

  • Before: the runtime logged no translated vs for FSSM sha256 … six times, and six ID3D12Device2::CreatePipelineState calls failed.
  • With it: the library loads 26,594 modules (the 10 from exe/ included), there are 0 no translated vs lines, and those six PSOs are created. The run's D3D12 trace goes from 7 failed calls to 1 (an unrelated Close).

Traces stay local; no game data. AI-assisted (Claude Code).

@tedin7

tedin7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

checked: #7746 | head bc5fc47b9c7b57f155166963b880154a7c0aa95d (2 commits) merged onto origin/main 867d922f09b86583859796a174df89555fb32da8, clean merge | on: Wine 11 on RunPod RTX 4090 (Linux) for the C++ target, CPython 3.12.3 on the same Linux pod for the Python tests; not native Windows; no game files, so the retail 10-of-10 translation claim in the docs was NOT reproduced

Ran:

  • python3 -I -m unittest discover -s tests -p test_exe_shaders_stage.py: Ran 11 tests, OK.
  • test_bvh_shaders_stage.py (closest existing stage test, shares the helpers): Ran 13 tests, OK.
  • shader_library_test (clang-cl cross-build, run under Wine): builds and prints its final OK line on the PR tree; same on a clean origin/main copy. Note that the harness script's own exit code is 0 even when a test prints an assertion failure, so I read the output, not the exit code.
  • Not run: shader_library_corpus_test (needs a carved game corpus).

Negative control (once): in make_game.py I changed the reuse test back to if programs: (the state before bc5fc47b9: a cached index with 0 translated programs is accepted). test_empty_cached_index_is_rebuilt then FAILS (11 run, 1 failure); with the PR line it passes. So the follow-up fix is guarded by a test.

Diff review (6 files, +567/-19):

  • exe_shaders() is wired after bvh_shaders(); it is skipped cleanly, and it drops a stale exe/index.json, when the package has no executable. Sensible: the runtime loads <shaders>/exe/index.json whenever it exists.
  • The reuse rule reuses the step when at least one program is translated, even if some are missing (they are reported on every run). That is a design choice, not a bug, but a partly translated cache is never retried until inputs change.
  • Behaviour change to be aware of: fail() is called when none of the executable's programs translate, which stops the whole shaders stage. Before this PR such a package could not fail there. Reasonable, since otherwise the index would look finished, but it is a new way for make_game.py to stop.
  • shader_library.h: exe_size() and the exe folder are added the same way as bvh; the new C++ case covers lookup by (stage, hash), main-index-first ordering, a broken index and a missing index resetting the count to 0. The corpus test subtracts exe_size() correctly.
  • Test scope is honest: the Python test uses synthetic containers and a stand-in translator, so it checks the stage's plumbing, not translation quality.
  • No game files or secrets in the diff.

Not verified: translation of the real 10 executable shaders, spirv-val, vk_pipeline_check, native Windows (MSVC), the corpus test.

AI-assisted.

@ilyasssif

Copy link
Copy Markdown

checked: #7746bc5fc47 | with: clean merge onto main@867d922f0, python3 -I tests/test_exe_shaders_stage.py, python3 -I tests/test_shader_library.py, cmake --build runtime/build --target shader_library_test shader_library_corpus_test + ctest --test-dir runtime/build --output-on-failure -R '^shader_library', negative control against origin/main, and python3 -I scripts/check_no_game_data.py | on: Fedora Linux 43, GCC 15.3.1, Python 3.14, NVIDIA RTX 4050 Laptop (synthetic tests only, no game copy) | result: pass (test_exe_shaders_stage.py: 11/11 OK; test_shader_library.py: 10/10 OK; CTest shader_library: Passed, shader_library_corpus: Skipped without local game corpus; check_no_game_data.py: exit 0). Negative control with origin/main production files: test_exe_shaders_stage.py errors 11/11 (EXE_FILE missing) and shader_library_test fails to compile (ShaderLibrary::exe_size missing). Code review looks clean (reuses BVH_TOOLS, cleans stale container/index files, pins encoding="utf-8", newline="\n").

agent: yes

@rideinstead

Copy link
Copy Markdown

✅ Automated security review: CLEAN (commit bc5fc47b)

  • No findings.

Scope: static analysis of added diff lines only; no code was executed. Please review findings manually.

@lunarminus

Copy link
Copy Markdown

Retail result for bc5fc47b9: my own 1.0.2.1 executable, Wine 11.22 on an AMD Radeon 760M (RADV Mesa 26.3.1), gta6rt cross-built with clang-cl 23.1.5 + xwin. Pass.

Base and stack in #7154. AI-assisted (Claude Code).

@jtrudeau1530

Copy link
Copy Markdown

@Faterek

checked: #7746bc5fc47 | on: Arch Linux, Wine 11.18, RX 7900 XT / RADV Mesa 26.2.3, clang-cl 23.1.6 + xwin | result: six graphics CreatePipelineState failures become six successes in a controlled executable-index comparison. The same worker-thread title breakpoint remains.

Runtime control is our frozen c3p stack and its linked ancestry/limitations. c3q adds only this PR's shader_library.h, shader_library_test.cpp and shader_library_corpus_test.cpp changes. The folder list retains both library/ and exe/, and both independent test blocks are kept. No other runtime change. Pipeline source is main dde82f2 plus #7529b93ffa5 and this PR. Its executable-only stage runs separately; the previous four indexes and modules remain unchanged.

Executable stage: 10 programs (one VS, nine PS), all 10 translated and spirv-val valid. LLVM 23.1.6, SPIRV-Tools v2026.3, wave64 emulation enabled, no fallback flags; translator digest and llvm-mc signature match the original frozen pipeline. The previously missing VS key matches the new executable index. Every indexed module exists.

Both bounded offline runs use the SAME five-index overlay. Binary/PDB, patch, tool and all five index hashes are retained locally in each run's provenance.

  • Control c3p ignores exe/: loads 28,349 translations, reproduces six missing-VS lookups for one key and six failed ID3D12Device2::CreatePipelineState calls.
  • c3q loads 28,359 translations: no missing-VS lookup, and those same six pipeline calls now return success.
  • Both trace 2,334 D3D12 calls. Outcomes change from 1,645 ok / seven failed to 1,651 ok / one failed. The other totals remain 93 called, 586 unsupported, two ignored and one console-only. Apart from the six changed outcomes, the queue's console-only event moves across the first Barrier/Clear/Barrier group, consistent with thread ordering.
  • The remaining failed call is command-list Close; its HRESULT is not logged. Slot 67 still has 11 failures for eight distinct missing compute keys. Both runs initialize successfully, exit 3, and hit the same worker-thread title breakpoint. Presentation-window initialization is logged, but this is not evidence of a rendered frame.

Validation: 27 Python tests pass (11 executable-stage, six library-stage, 10 shader-library). The selected 51 runtime tests give 45 passed, five unchanged baseline failures and one corpus skip without its environment. The corpus test then passes separately on the overlay: 26,503 main entries reached, 1,794 FSPX including library/, 52 BVH and 10 executable entries, zero failures. The five baseline failures remain device_proxy/device_proxy_trace under Wine WARP, the two known Wine environment cases, and the pre-existing mesh Close check. Existing slot-74 and XG stand-ins still limit this integration stack.

This resolves the six graphics PSO creation failures on this stack. Together with #7529's 31 recovered compute calls, it is still insufficient to clear the worker-thread assertion; the cause of that assertion remains unclassified. No game data or raw logs attached.

AI-assisted testing (Claude), review/reporting (Codex).
agent: yes

@byPreaZy

Copy link
Copy Markdown

checked: #7746 | with: applied the diff on main 6312c05, ran tests/test_exe_shaders_stage.py (11 tests OK), built and ran shader_library_test (PASS) and shader_library_corpus_test (SKIP, no LEONIDA_SHADERS corpus on this machine) | on: Windows 11, MSVC 14.44, RX 9060 XT | result: PASS

Code read: make_game.py adds exe_shaders() after bvh_shaders() with its own exe_build.json reuse key, cleans stale outputs, reports translated/missing stems and fails on zero translations, and skips cleanly when the executable is absent; shader_library.h loads exe/index.json under the exe/ prefix keyed by (stage, fssm_sha256) with exe_size(), tolerant of missing or malformed index; the corpus test subtracts library.exe_size() from rpf_entries. Docs updated.

AI-assisted check.

dadnotdaddy pushed a commit to dadnotdaddy/Leonida that referenced this pull request Nov 23, 2026
…game_scarlett_master.exe embedded shaders

Squashed from ItsNotRexed#7746 by Faterek, head bc5fc47 (security scan PASS).

Applied as the PR's own diff (gh pr diff); head bc5fc47; prescan flags (cleanup unlinks, test subprocesses) read by Haiku: PASS, and make_game's drop() removes only the files named. Taken for the slot-86 gap: the retail boot's untranslated vertex shader is the executable's one embedded VS (its FSSM hash is in none of the 26,503 carved containers and matches one of the exe's 10). Conflicts with ItsNotRexed#7529: the shaders stage runs library_shaders() then exe_shaders(); ShaderLibrary::load reads fspx, bvh, library and exe, each folder keeping its own key and count; both PRs' shader_library_test sections kept. Fixed after the apply: the library section of shader_library_test is closed before the exe section starts.
dadnotdaddy pushed a commit to dadnotdaddy/Leonida that referenced this pull request Nov 23, 2026
…lder programs into pipeline_cache.bin first (gets a slow GPU past the builder)

Squashed from ItsNotRexed#8858 by KevinPratap, head 1848d44 (security scan PASS).

Applied as the PR's own diff (gh pr diff); head 1848d44 matches the watcher's Haiku scan. Taken instead of ItsNotRexed#7586, which it overlaps. docs/embedded_shaders.md keeps ItsNotRexed#7746's exe_shaders() paragraph ahead of this PR's compile-time section.
Raxstreams added a commit to Raxstreams/Leonida that referenced this pull request Nov 23, 2026
Reviewed head: bc5fc47
Review: ItsNotRexed#7746 (comment)
Board: ItsNotRexed#8919
AI-assisted integration.
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.