Repository navigation
Backlog
Description
Summary
On a fresh full build (--stages shaders,runtime), the shaders stage stops with:
ERROR: shaders: the translation index holds 26502 of the 26503 carved shaders (1 were refused or failed spirv-val, listed in this stage's output): a port built from it would lack them. Fix the translator for that class and translate again
The translating shard's summary shows the reason: 1 branch without encoding. The shader is one whose disassembly listing was truncated at the end of the file, so its last instruction has no encoding comment and the translator refuses it. Re-disassembling the same FSSM gives a complete listing, and translating that passes spirv-val.
Environment
- Windows 10 22H2 (10.0.19045)
- AMD RX 6750 GRE 12 GB, Vulkan through the current Adrenalin driver
- Python 3.12, Visual Studio 2022 + Windows SDK 10.0.26100, Vulkan SDK for
spirv-as/spirv-val, ffmpeg LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc(Ubuntu LLVM 21.1.8, AMDGPU target present; tested withs_endpgm)- commit
d442851(the build was run on this;mainhas moved since) - command:
python -I make_game.py --game <copy> --out <out> --work <work> --stages shaders,runtime --jobs 8 --no-tui
What happened
- The missing shader is
@ped_standard_eye_emissive_CS_RaytracingResolve_f21e9178_Wrapped(compute). - Its listing under
<work>/shaders/dxbc/disasm/is cut short: the file ends in the middle of the final line's encoding comment (the text stops at; encod), and the listing has nos_endpgm. The repaired listing for the same FSSM is much longer (2,432 lines vs 2,266) and ends withs_endpgm. - Re-running
tools/shader_disasm.pyon that single.fssm, with the sameLLVM_MC, writes a complete listing, andtools/rdna2spirv.pyon it translates the shader and passesspirv-val(1/1). - After replacing that one listing, re-disassembling and adding the entry to the translation index, the
shadersstage completes (26,503/26,503) and the rest of the build continues.
Notes
tools/shader_disasm.pywrites to a temporary file andos.replace()s it into place, so a partial file should not normally be published; this happened on a fresh full run (no--skip-existing), with--jobs 8.- The shard that produced it reported only the reason count (
1 branch without encoding); the affected shader's name was not printed anywhere I could find, so I located it by comparing the carved.dxbcnames against the translated index. - The build's disassembly validation accepted the truncated listing, which is why the failure surfaced only later, in translation.
Possible fixes
- When validating disassembly (
disassembly_status/disassembly_listings), also check that each listing ends with a complete final line ands_endpgm; re-runshader_disasm.pyfor the listings that fail the check. - Print the failing shader's name with the reason in the shard summary (it would make this class much faster to find).
- If the truncation can come from a race (two jobs writing the same listing, or a short read of
llvm-mc's output), a retry for a listing that fails the completeness check would cover it.
I can test a patch against this copy (the original .dxbc/.fssm are kept locally; I did not attach any game files or generated shader text here).
Metadata
Metadata
Assignees
Labels
No labels
Activity
LGlong1 commentedon Nov 28, 2026
Two notes from retesting, in case they save someone time:
v_fma_mixliteral cut in the text only, closed), but it is the same family of "the text is cut" problem, and the same LLVM version. scripts: build llvm-mc 23.1.5 by default, so the pipeline library translates #1923 (build llvm-mc 23.1.5 by default) may be relevant.tools/shader_disasm.pyon that single FSSM with the same LLVM 21.1.8 and got a complete listing (2,432 lines, ends withs_endpgm), while the build's run (8 jobs,--unpack-index) had left the truncated one. So the cut may be in the parallel disassembly path or its publish step (shader_disasm: restore write mode before unlink on replace failure and publish mode (SHADER-DISASM-STAGE-CLEANUP) #861, SHADER-DISASM-PER-RUN-FAILED: shader_disasm: use a per-run failed list in main() and handle read OSError #908) rather than in llvm-mc itself; the missings_endpgmcheck would catch either way.I can rerun the same build with llvm-mc 23.1.5 if it would help narrow it down.
KoabraFang commentedon Nov 28, 2026
IDK what's going on just wanted to say keep up the work ;) we believe in you