tooling: scan slot 57 mesh-layout blocks for the unlocated registers #3889
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3889"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T20:48:19Z.
Problem
A reviewed slot 57 profile needs register fields that no decoder reads yet: the colour write masks,
CB_COLOR_CONTROL, the pixel input setup (SPI_PS_INPUT_ADDR/_ENA,SPI_PS_IN_CONTROL), the sample masks,PA_SU_SC_MODE_CNTLandDB_ALPHA_TO_MASK. Their position in the mesh-layout creation blocks is not known. The guest builds state blocks A and B itself, so no source-built pipeline can produce a block with one field changed. The offsets in use today (DB_*at A+0x10C,CB_BLENDn_CONTROLat A+0x124) were found by reading captured blocks against the gfx10 field layouts (#1216, #3503).This advances the profile work in #3416 (part of #2413), and the open location questions in #1216 (
CB_TARGET_MASK) and #1999 item B (PA_SU_SC_MODE_CNTL).Change
tools/startup/mesh57_register_scan.py <request_dir>repeats that comparison over a whole capture corpus without assuming a location. For each register it tests every aligned offset of blocks A and B against a predicate built from the gfx10 field definitions (Mesasrc/amd/registers/gfx10.json) and from evidence the capture holds outside the blocks: the pixel program's exports and interpolation, and the.t57attachment tuple.tests/mesh57_register_scan_check.py(ctestmesh57_register_scan) plants each register in synthetic archives at offsets chosen for the test. Three negative controls: a word moved by one dword in one variant, a corpus whose values never vary, and a corpus without extra bound targets (shader mask and target mask cannot be separated).docs/experiments/native-fixed-mesh57.mdgains the section "Locating the remaining mesh-layout registers" with the evidence and result per register.No runtime code changes. No profile reads the new offsets yet.
Validation
Passes on Windows (MSVC build tree). The check is source-built and needs no GPU and no capture.
Results so far
Three independent capture corpora, 318 to 330 mesh-layout variants each, default threshold. All three gave the same verdict and the same candidates for every row.
CB_COLOR_CONTROLCB_BLENDat A+0x124): the only offset whose words pass the field test (reserved bits zero, a valid ROP3,CB_NORMALmode when colour is exported) in all three captures, with three distinct values. A pattern match, not a mutation proof; no field is read yet.DB_ALPHA_TO_MASKPA_SU_SC_MODE_CNTLpredicateSPI_PS_IN_CONTROLCB_SHADER_MASKPA_SU_SC_MODE_CNTLCB_TARGET_MASKSPI_PS_INPUT_ADDR/_ENA_ENAdepends on_ADDR)PA_SC_AA_MASK_*The evidence is independent of any earlier local measurement: it comes from the public register definitions and from the scan's agreement counts. The repository receives no captured values, no archive names, no keys and no guest data, only the tool, the synthetic check and the offsets above.
Not covered
PA_SC_AA_MASK,PA_SU_SC_MODE_CNTLandDB_ALPHA_TO_MASKhave reserved-bit predicates only, so they can stay ambiguous on a real corpus.CB_SHADER_MASKandCB_TARGET_MASKcan only be separated by variants that bind more targets than their pixel program exports.Refs #2413 #3416 #1216
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T21:08:04Z.
Review: APPROVED
Reviewed
87e3ec18. The scan requires variation, enough informative variants and a unique surviving offset. Its synthetic checks pass for planted locations, a moved word, constant values and coincident shader/target masks. I also reproduced an unreadable.t57stopping the old scan. The follow-up keeps the variant and other independent facts while excluding that attachment evidence, with a source-built regression control.mesh57_register_scan_check.py,mesh57_profile_draft_check.pyanddocs_links_check.pypassed. I independently checked the source-built corpus; the offsets inferred from captured corpora remain candidates for later validation.