docs/d3d12_vulkan.md section 3.5 infers where root arguments arrive from the user SGPRs the shaders read and calls
the graphics bases (s8 for VS/PS/GS, s16 for mesh) a hypothesis: the SGPR census cannot see root-parameter indices
or a spill. Each native program's FSSM record names two tables that state it directly: a root-layout table (root
type, user-data dwords, first user-data dword and root parameter index per parameter) and a used-resource table.
The record layout is the one VIctory reads (Marvisak/VIctory, GPL-3.0, crates/victory-shader/src/native.rs). The
parser is written for this repository from that layout and contains no VIctory code.
tools/fssm_root_layout.py is a new module on its own. root_tables(fssm) returns the programs of one blob with both
tables. It raises FssmLayoutError (a ValueError) for a header that is not version 0x101 with a matching payload
size, a record or code range outside the payload, records that overlap each other or the slot table, and a table
that runs past the payload or overlaps a record, its program's code or the program's other table. Unnamed types
and non-zero reserved fields are kept so they can be counted. Its command line prints the tables of a file or a
folder as JSON, or writes them with --out, one file in memory at a time.
tools/root_layout_census.py reads the user's own .fssm blobs or carved containers and prints counts per hardware
stage: the lowest SGPR a parameter arrives in, the dwords each root type takes, root types and used-resource kinds,
compute programs with a spilled parameter and the first spilled dword, and how many programs agree with the
section 3.5 hypothesis, with the reasons for the rest. It also counts what would show the reading to be wrong
(unread blobs by reason, record offsets, reserved fields, unnamed types). With no input it says so.
No retranslation: tools/fssm_unpack.py and every other file in make_game's TRANSLATION_SOURCES are untouched, and
neither new file is imported by the translator or make_game.py, so a translated shader library stays valid. A
test holds the two new names out of make_game.py, translator_deps.cmake, fssm_unpack.py, rdna2spirv.py and
shader_meta.py.
Nothing here was run on real shader data. Which fields are VIctory's reading and which this corpus's earlier
measurements already support (the two table offsets are the header's `code_end` and `meta_ptr`) is in section 3.5,
with the commands and the open questions. The runtime does not use the tables yet.
Tested: tests/test_fssm_root_layout.py (32 tests: hand-built records with constants, a root descriptor, tables, an
immediate sampler, a heap and a spilled compute layout; truncated, overlapping and overflowing tables; every
prefix and 4,000 seeded corruptions of a three-program blob; both command lines) and the fssm_unpack, pal_stages,
fssm_header, fssm_crosscheck, missing-input, line-ending and CI-registration tests pass. The repository-consistency
set gives 578 passed, 5 skipped. No game files.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
The VOP1/VOP3 op saturates each signed i16 half of SRC0 to unsigned
8-bit and packs the pair into the low 16 bits of VDST, preserving the
high half (GFX9+ partial write; LLVM VOP1Inst_t16, Mesa ACO
instr_is_16bit). Neg/abs/clamp/omod are refused; _sdwa restricts to the
documented source/destination selects; _e32 rejects all modifiers.
Adds a hand-written fixture and a semantic test driving the SPIR-V
through spirv_mini_interp against a plain-Python reference (lane edge
values, SGPR/literal sources, sdwa selects, refused modifiers), the
docs/design.md contract row, and drops the op from the
fssm_crosscheck unhandled list. The two tests that used the mnemonic
as the still-unsupported canary now use v_mullit_f32.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
With it, d3d12_xs reads list slot 48 as the console's IASetVertexBuffers, so the PC-shaped fixture list's
ClearRenderTargetView never runs and Close fails. The branch also changes runtime/src/pe_loader.cpp and carried
committed conflict markers in docs/fssm_crosscheck.md. Its docs rows go with it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also: #2490's committed conflict markers in fssm_crosscheck.md resolved to main's text, the SHADER-605 section
moved below the troubleshooting table it split, a header rule for the export-format table, two backticked
paths that name no Leonida file, and the BOM dropped from anim_move.py and its test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xdat_entries_all, the last-wins xdat_entries view and unpack's
payload flag (--payload) are on main with their tests, but the doc
still called the duplicate tag-0x0D handling a repro expectedFailure
with the fix out of scope.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
#2479 added fssm_unpack.xdat_entries_all() and unpack(payload="first"|"last"), and the CLI's --payload, but this note still described the bug as open and cited a repro test that is no longer in the tree.
Correct the five spots that say so, and point at the tests that exist.
Decode the filler, header, 20-byte records and name record after
code_end, and add a --bindings summary. Measured over 26,503 blobs:
5,640,704 records, all parse.
Adds a fact-level comparison of SCARAB's FSSM, rDNA2 classification and XBSC notes with Leonida's tools, plus a synthetic repro for the duplicate tag-0x0D XBCH loss.