Commit Graph

50 Commits

Author SHA1 Message Date
88a9f133e7 Merge pull request #861 from trigger337/fix/shader-disasm-stage-cleanup
shader_disasm: restore write mode before unlink on replace failure and publish mode (SHADER-DISASM-STAGE-CLEANUP)
2026-12-01 16:05:17 +01:00
c6c8f5f5a3 scripts: build llvm-mc 23.1.5 by default, so the pipeline library translates (#1923)
* scripts, tools: build llvm-mc 23.1.5 by default, so the pipeline library translates

LLVM 21.1.8's gfx1013 decoder cannot decode 840 of the 2,684 compute
programs in the pipeline library of 1.0.2.1: their listings carry 79,490
undecodable words and 8,310 exp invalid_target_N lines, the translator
refuses all of them as "fall-through into undecodable words", and the
shaders stage keeps 1,844 of 2,684. LLVM 21 does translate all 26,503
shaders of shaders.rpf; the library is what it loses.

The same bytes under llvm-mc 23.1.5 have no rejected word in those 840,
and 839 of them translate and pass spirv-val (the last wants s_sethalt,
which the translator does not implement, under either version). The 1,844
that already translated were re-disassembled too: 1,674 listings change
and all 1,674 still translate, the other 170 are byte-identical, so the
stage goes from 1,844/2,684 to 2,683/2,684.

The build helper now builds 23.1.5 by default. The docs that name the
minimum version (README, docs/design.md, docs/testing.md, docs/linux.md)
and the three user-facing messages that still said 21+ (make_game.py's
preflight, shader_disasm.py's probe error, mc_command.py's install hint)
now say 23+, with the tests that assert those texts updated.

AI-assisted (DeepSeek Harness).
Written with an AI assistant.

* docs: LLVM 23 is what the shaders stage needs, and a test pins the script's default
2026-12-01 11:48:54 +01:00
45c15d0528 Merge upstream/main into fix/shader-disasm-stage-cleanup 2026-11-30 13:39:37 +03:00
eeb967c89e shader_disasm: restore write mode before unlink on replace failure and publish mode (SHADER-DISASM-STAGE-CLEANUP)
Apply published_mode(out_file) to temporary listing before atomic replacement,
and restore write permission (0o600) before unlinking in finally block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:20 +03:00
18e0304d57 shader_disasm: use a per-run failed list in main() instead of shared FAILED 2026-11-29 09:45:11 +00:00
fef2f758be tools: fall back to python backend when llvm-mc probe fails in auto mode 2026-11-28 12:49:47 +01:00
15c34d7971 tools: add auto fallback to python disassembler in shader_disasm and shader_library 2026-11-27 14:01:03 +01:00
f25bd7765d shader_disasm: pass wave32 through the dot4 op_sel re-decode (#1317 head)
The copy of #1317 in this branch called with_dot4_op_sel(code, mcpu, bad,
err) and run_mc(bytes(patched), mcpu) without wave32, so a wave64 program
whose v_dot4_i32_i8 op_sel 2 / op_sel_hi 5 word was re-decoded printed its
lane masks as vcc_lo. Take #1317's current head (62237d0e5, by tedin7):
with_dot4_op_sel takes wave32 and hands it to run_mc. Also its newline="\n"
on the test's JSON write, and the two blank lines before MAX_DATA_DWORDS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:50:35 -05:00
c9b3ec1c62 Merge #998 (pipeline-library compute programs llvm-mc refuses)
# Conflicts:
#	tests/semantic/test_salu_flbit_64.py
#	tests/test_fspx_unpack.py
#	tools/fspx_unpack.py
#	tools/rdna2_decode.py
#	tools/rdna2spirv.py
#	tools/shader_library.py
2026-11-25 00:49:31 -05:00
f7b4aa7ee2 Merge #1317 (print the v_dot4_i32_i8 op_sel words llvm-mc rejects)
# Conflicts:
#	docs/fspx.md
#	tests/semantic/test_alu_dot4_i8.py
2026-11-25 00:44:37 -05:00
39879ce0fd Merge main into RT-PROTON-STORY-LOAD (#984)
Merges main at 1154976d4 into the integration branch at 273b3bdf9 (merge base ece4ba5b3). 42 files conflicted;
this commit is the resolution only. Build and test repairs follow in their own commits.

Rule of resolution: where both sides added different things, both stay; where both made the same change in two
forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two
changed the same code for different purposes, both purposes are kept.

Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, registry.cpp):
- d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device
  routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device
  slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the
  console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and
  list slot 139 (#396).
- Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's
  completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is
  attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider
  pc_resource_desc, S_OK for queue slots past the PC table.
- Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its
  undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base
  list proxy, its null-view slot 70 and its refusing slot 133.

Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp):
- Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra
  cases added; main's --env-slots-74 and #984's --env-slots-70.
- Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy,
  the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases.

D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h,
frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp,
d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp,
vk_pipeline_check.cpp, vk_test_device.h):
- Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's
  ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's
  origin, so both pools run on disjoint sets of textures.
- frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter.
- main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4
  stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980).
- shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it.
- Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count
  refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it.

Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp,
runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp):
- ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on
  ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file.
- gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries.
- Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped.

Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1,
make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py,
runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md,
runtime/README.md):
- Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake.
- rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's
  restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped.
- shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags.
- shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants.

One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC
compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 19:38:04 -05:00
4e1ca11a65 fix: shader_disasm prints the v_dot4_i32_i8 op_sel 2 / op_sel_hi 5 words llvm-mc rejects, so the FSR4 FSPX programs translate
The FidelityFX upscaler programs hold 89 such words in 8 programs (docs/fspx.md); the translator already models the form but the listing could not carry it, so the programs were refused as a fall-through into undecodable words.
2026-11-24 16:47:02 -05:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00
ebcb0acad5 tools: decode the pipeline-library compute programs llvm-mc refuses
llvm-mc 21 cannot decode SMEM loads whose SOFFSET is null (0x7D), so whole
pipeline-library compute programs of 1.0.2.1 came out with invalid words
and failed to translate. For compute programs, shader_disasm now falls back
to rdna2_decode when that decodes more of the program, and rdna2_decode
reads VOPC with DPP16/DPP8 as the 8-byte form it is.

rdna2spirv:
- SMEM with vcc as its base reads the vcc_lo/vcc_hi pair.
- s_flbit_i32_b64 of a lane mask reads the wave's 64-bit mask (18 library
  programs), as s_ff1_i32_b64 already does.
- s_bitreplicate_b64_b32 of a lane mask into plain scalar data replicates
  the wave's mask word (6 library programs); into exec/vcc it stays
  Unsupported.

test_salu_flbit_64: the lane-mask case now translates (the subgroup op is
outside the single-invocation interpreter), so the test checks that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:42:10 -08:00
d046559435 rdna2spirv, shader_disasm: VOPC compares in DPP form (SHADER-VOPC-DPP)
Three pipeline-library compute programs of 1.0.2.1 hold v_cmp_gt_f32 with a
DPP16 or DPP8 src0. llvm-mc has no gfx10 decoding for the pair, so the
listing dropped the words and the programs were refused.

shader_disasm.py prints the pair through a VOP2 stand-in that takes the same
DPP word, rdna2_decode.py decodes it directly, and Gen.dpp_insn translates
the compare for the forms where every lane writes its bit. Other forms and
v_cmpx are refused: what an unwritten lane does to VCC is not measured.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 23:41:08 +08:00
fca3be703c fix(linux): find a versioned llvm-mc and give Linux install hints
Debian and Ubuntu's llvm-<N> packages install llvm-mc only as llvm-mc-<N>
and /usr/lib/llvm-<N>/bin/llvm-mc. With LLVM_MC unset, the build looked
for the plain name alone and stopped with Windows advice
(scripts\build_llvm_mc.ps1, WSL), while tests/conftest.py already found
the versioned install, so the pytest suites passed where make_game.py
failed.

mc_command() now keeps the plain llvm-mc when it is on PATH (the name a
work folder's disassembly record holds) and otherwise takes the newest
versioned install, by version number. install_hint() gives each OS its
own advice; the preflight, shader_disasm.py and not_found() use it, and
the SPIRV-Tools hint names the distribution package off Windows and macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:51:04 -05:00
aadfda67e5 Decode FSSM listings at the compiled wave size 2026-11-24 02:56:33 +05:30
00fefcaef9 Merge pull request #4395 from Maxime Mansiet
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:14:19 -05:00
95969c87c7 Merge pull request #4377 from Luis Baker
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:14:10 -05:00
235c0babdd Merge pull request #2786 from Kacper Serewis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:06:08 -05:00
40e540733e shader_disasm: decode llvm-mc's output with errors="replace"
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-23 02:02:23 +01:00
e09ba00074 shader_disasm: refuse a listing that would overwrite its input
A planned <out>/<stem>.s that names an input (a foo.s given with --out at its
own folder, the default ../disasm of a file already in disasm/, FOO.S where
case is ignored, a hard link) replaced the input with its own listing, or with
--skip-existing was counted as a finished listing. A folder where a listing
goes failed per shader inside the worker pool. Both are now one ERROR line,
exit 1, before llvm-mc is probed or --out is created. Path comparison reuses
tools/report_paths.py.

Tests: 7 new cases in tests/test_shader_disasm.py (26 OK; 6 of them fail with
main's tool). Synthetic inputs only, no game files. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:52:02 +01:00
dfcbd362bc Decode VOP3 legacy MAD/FMA according to the shader target 2026-11-22 23:05:56 +01:00
402ef8ce17 Merge commit '998128ec' into HEAD 2026-11-22 23:05:39 +01:00
fa33dd1616 Merge pull request #3647 from Kam471 2026-11-22 17:03:11 -05:00
0fa5d0e25c Merge pull request #3402 from kapitche 2026-11-22 17:01:52 -05:00
9bdb8d5faf Merge pull request #2038 from SweatierKey 2026-11-22 16:58:59 -05:00
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
  deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
  its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
  resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
  the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
  allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
  reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
  orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:54 -05:00
d1490e359e BUILD-1046: missing inputs exit 2; image_query_probe help before oracle
Eleven tools treated a nonexistent input folder as a failed run (1). They now print one ERROR line and return 2, while real read failures keep exit 1. image_query_probe imports the hardware oracle only for a GPU run, so --help stays prompt. A table-driven subprocess test covers all eleven; existing expectations are updated.
2026-11-22 21:11:07 +00:00
2c9b8620bd shader_disasm: end the code range before a trailing constant-data block
Blobs can end with s_endpgm, a dword count N, N dwords of data and a closing s_endpgm. The data was disassembled as code, so llvm-mc reported invalid words.
2026-11-22 15:25:17 -05:00
1ca544a30e rdna2_decode: pure-Python RDNA2 binary ISA decoder (#1901) 2026-11-22 21:23:34 +01:00
af571fc8fb Merge pull request #3198 from bobcatchris 2026-11-22 15:15:38 -05:00
853bbd0a6b Merge pull request #3024 from Vonsek 2026-11-22 15:14:08 -05:00
abf5a5602c shader_disasm: prune only after the decode proved it works 2026-11-22 14:01:33 -06:00
2f23d6b8a5 shader_disasm: drop listings of shaders the folder no longer has 2026-11-22 13:40:09 -06:00
6f898a62dc fix(build): align fallback shader terminator scans
A terminator byte pattern spanning metadata words can look like a clean one-instruction shader. Search for a dword-aligned instruction before decoding the fallback range.
2026-11-22 20:07:35 +01:00
6b783318b3 BUILD-667: resume interrupted shader disassembly
Depends on: #2031. AI-assisted.
2026-11-22 18:24:00 +01:00
c7408a1f7e Keep stale shader files out of resumed builds
Select each stage's inputs from its producer index and refresh downstream
stages when a saved cache contains obsolete shader names.
2026-11-22 23:35:45 +08:00
ec9b6cf22b tools: text reports are written with LF line ends on every platform (BUILD-468)
open(path, "w") without newline= turns each \n into \r\n on Windows, so the same JSON report, manifest or assembly
listing was CRLF there and LF elsewhere. 91 text-mode writes (open, os.fdopen, Path.write_text) under tools/, scripts/,
make_game.py and runtime/test/shaders/ now pass newline="\n". tests/test_text_write_line_endings.py reads the source
with ast and fails for a writer that forgets it; CONTRIBUTING.md names the convention.

AI-assisted (Claude), on behalf of dev-ewann.
2026-11-22 14:20:30 +00:00
613c9866c9 shader_disasm.py: report an --out that is a file as one ERROR line
os.makedirs raised FileExistsError with a traceback when --out named an
existing file. Report it before any work and leave the file alone.
Synthetic regression test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:36:15 +03:00
f698bf2206 tools: a path outside the console's code page no longer crashes a tool's output
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and
PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with
UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts
its __main__ block the same way (stdout errors="replace").

tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes
(analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:27:00 +00:00
84b1f3fd07 fix(tools): close file handles with context managers in tools
Closes unmanaged open() calls in tools/tex_export.py, tools/tex_mode_probe.py,
tools/shader_disasm.py, tools/hashdict.py, and tools/d3d12_xs_surface.py to avoid
leaking file descriptors and ResourceWarning under Python 3.12+. Expands
tests/test_resource_hygiene.py to cover these tools.
2026-11-22 15:27:46 +05:30
2da357da8c shader_disasm: filter regular FSSM files before applying the limit 2026-11-22 04:45:01 -03:00
6e830f5641 shader_disasm.py: an llvm-mc error is a failure, and a run with no listings exits 1
disasm() ignored llvm-mc's exit status, so a shader whose disassembly stopped
partway (llvm-mc printed some lines, then exited 1) was written out and
counted as clean. A nonzero exit now discards the output and the shader is
reported as failed, with llvm-mc's error.

A run in which no shader produced a listing (every one "no s_endpgm") exited
0, and make_game.py writes disasm.done on exit 0. It now exits 1 naming the
source folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:16:30 +01:00
8cce07b917 shader_disasm.py: scan blobs too short for the header instead of crashing the run
A blob shorter than 0xC4 bytes made code_range read the code offset past the end and raise struct.error. The
error came out of ex.map and stopped the whole run, so make_game.py failed at the same blob on every rerun.
Such a blob now goes to the s_endpgm scan like any other header miss and is counted as "scan failed" or
"no s_endpgm".

--jobs and --limit now must be at least 1 (--jobs 0 made ThreadPoolExecutor raise, --limit -1 dropped the
last file). A source with no .fssm files, or one that doesn't exist, ends with an ERROR line instead of an
IndexError or FileNotFoundError traceback.

Tests: tests/test_shader_disasm.py, with a fake llvm-mc (no GPU, no game data).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:48:43 +03:00
5026d36f9c Merge pull request #184 from Mokbul Miah 2026-11-21 16:08:07 -05:00
66a410edf0 Accept LLVM_MC as a whole command in the tests and GPU tools
LLVM_MC may be one executable or a command line such as the WSL llvm-mc documented for Windows. shader_disasm.py already split it, but the tests, runtime/test/shaders/build.py and scripts/run_gpu_tests.py treated it as a single executable, so the documented setup skipped translator tests, and build.py passed a Windows path to WSL. Share the splitter in tools/mc_command.py and feed assembly on stdin.
2026-11-21 21:00:03 +00:00
95b2c091c8 Build a native Windows llvm-mc with the AMDGPU target, no WSL needed
scripts/build_llvm_mc.ps1 sparse-clones the LLVM sources llvm-mc needs,
builds it alone with LLVM_TARGETS_TO_BUILD=AMDGPU, static CRT and the DIA
SDK off (its headers need ATL, which the C++ build tools don't always
include), checks it disassembles an s_endpgm for gfx1013, keeps only
llvm-mc.exe and sets LLVM_MC for the user. README, docs/design.md and the
make_game.py / shader_disasm.py hints mention it next to the WSL route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:50:01 +01:00
e64ab9d3cc Shaders: fail when llvm-mc can't disassemble; accept a WSL command in LLVM_MC
The official Windows LLVM build ships no llvm-mc.exe and has no AMDGPU
target, which is what issue #7 ran into. A tool that existed but could
not disassemble produced empty output, so shader_disasm.py counted 0
invalid words, wrote an empty .s per shader and reported every one as
"clean"; make_game.py then translated nothing.

Probe one s_endpgm before the run and stop with the tool's own error.
Empty per-shader output is now "failed" and exits 1, never "clean".
LLVM_MC may be a whole command line, so Windows can call WSL's llvm-mc:

    set LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc

make_game.py accepts the same form in preflight and need(); README and
design.md now state the real requirement. New tests cover a missing
tool, a missing AMDGPU target, empty output and the success path.
2026-11-21 15:39:35 +00:00
db0dc8bd5e Initial commit: Leonida, build-it-yourself PC port groundwork
Shader pipeline (carve, FSSM unpack, gfx1013 disassembly, RDNA2 to SPIR-V),
asset export via rpf9-explorer's Core (submodule), PE loader and shim
skeleton, and make_game.py, which builds from the user's own copy of the game.
No game data, keys or executables are included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:22:16 -05:00