Repository navigation
Conversation
|
AI-assisted review of From the repository root, run this script with 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
|
|
Verified on native Windows at PR head
Each run covered one vertex shader and nine pixel shaders. In both translation modes, all ten modules passed 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 |
|
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
Not run: the full AI-assisted run (Claude). Counts only; nothing from the game leaves this machine. |
|
Thanks @shdann for catching that — fixed in Thanks also to @LukeOsland1 and @Impre-visible for the independent Windows and Linux hardware checks. AI-assisted. |
|
AI-assisted recheck of |
|
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. |
|
Tested
|
|
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. |
|
Tested
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 AI-assisted (Claude Code); outcomes only, no game data. |
|
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.
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 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. |
|
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: AI-assisted (Claude Code). |
|
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. |
|
Tested Separate retail A/B on an RTX 4090 (driver
Both runs still hit a later |
|
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. |
|
Tested Merged onto @tibzejoker's
Traces stay local; no game data. AI-assisted (Claude Code). |
|
checked: #7746 | head Ran:
Negative control (once): in Diff review (6 files, +567/-19):
Not verified: translation of the real 10 executable shaders, AI-assisted. |
|
checked: #7746bc5fc47 | with: clean merge onto agent: yes |
|
✅ Automated security review: CLEAN (commit
Scope: static analysis of added diff lines only; no code was executed. Please review findings manually. |
|
Retail result for
Base and stack in #7154. AI-assisted (Claude Code). |
|
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.
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). |
|
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. |
…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.
…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.
Reviewed head: bc5fc47 Review: ItsNotRexed#7746 (comment) Board: ItsNotRexed#8919 AI-assisted integration.
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 indocs/embedded_shaders.md§2 via #6840) intomake_game.py'sshadersstage andruntime/src/shader_library.h, mirroringbvh_shaders()and<dir>/bvh/index.json:make_game.py: addsEXE_FILE = "game_scarlett_master.exe",exe_settings(),exe_report(), andexe_shaders(), invoked fromshaders()right afterbvh_shaders().<work>/shaders/exeand translates into<work>/shaders/spirv/exe(without--max-shared-memory, since these are graphics shaders, while forwarding--no-asm,--wave64-emulate, and fallback flags).<work>/shaders/spirv/exe/exe_build.json, cleans stale.dxbc/.fssm/.s/.spv/.spvasmbefore re-extracting, reports translated and missing stems on every run, and fails if 0 programs translate.game_scarlett_master.exeis absent, drops any stalespirv/exe/index.json+exe_build.jsonand skips cleanly so packages without the executable are unaffected.runtime/src/shader_library.h: loads<dir>/exe/index.jsonalongsidefspxandbvhunder the"exe/"prefix (keyed by(stage, fssm_sha256)) and exposesexe_size(). Missing or malformedexe/index.jsonleaves the other indexes loaded.runtime/test/shader_library_corpus_test.cpp: subtractslibrary.exe_size()fromrpf_entriesand 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 withfspx//bvh//main, duplicate hash ordering, and missing/malformedexe/index.json).tests/test_exe_shaders_stage.py: adds 10 synthetic standard-library unit tests (no game data) covering PSV0 VS/PS extraction +fssm_sha256metadata, caching/invalidation, missing/removed executable cleanup, partial/empty translation handling, and whole-shaders()integration.docs/embedded_shaders.md: updates §7 to documentexe_shaders(),<dir>/exe/index.json,exe_size(), and the measured end-to-end counts.Testing
python3 -m compileall -q make_game.py tools tests— passpython3 -I make_game.py --help— passpython3 -I tests/test_exe_shaders_stage.py— 10/10 OKpython3 -I tests/test_bvh_shaders_stage.py— 13/13 OKpython3 -I tests/test_fspx_shaders_stage.py— 22/22 OKpython3 -I tests/test_pe_shader_containers.py— 19/19 OKpython3 -I tests/test_docs_list_items.pyandtests/test_docs_repo_paths.py— OKpython3 -I scripts/check_no_game_data.pyon all 6 changed/added files — passcmake -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_testpassed1.0.2.1game_scarlett_master.exe(temporary folder outside repo, deleted afterward):make_game.exe_shaders()native: 10/10 translated andspirv-valvalid (1 VS + 9 PS), 0.52 s; cached reuse 0.05 smake_game.exe_shaders()--wave64-emulate: 10/10 translated andspirv-valvalid (1 VS + 9 PS), 0.40 s; cached reuse 0.05 sShaderLibrary::load()on<work>/shaders/spirv:size=10, exe_size=10, all 10/10 (1 VS + 9 PS) found by(stage, fssm_sha256)with non-emptyspirv()vk_pipeline_check(native and--wave64-emulate):AI-assisted.