Commit Graph

5744 Commits

Author SHA1 Message Date
2efbe33b6d veh_spawn_intensities: measure the vehicle spawn intensity bands (ASSET-335)
The table is 31 vehicle-class entries, each with 7 intensity bands of
DirtMin/DirtMax and (in most signatures) a 0.8..1.0 mud range in band 7, plus
rain gating fields. 9 distinct band signatures carry the 31 entries; band 7
ladders through recurring endpoints and the bands are draw ranges, not
partitions. The docs row keeps only the channel-numbering hypothesis, which
Pipodi's #3992 answers; whether a spawn picks one band per AlphaChannels entry
is left open. The tool prints the aggregate census only and never prints
entry names, which are game data.
2026-11-22 21:16:06 -03:00
4e624fd7ee smh_groom: decode system-page metadata/style params and document shader class semantics 2026-11-22 16:13:21 -08:00
ea43201238 docs: the older wave64 marker counts left out 769 listings; recount over all 26,503
The "Wave size" row quoted an older marker scan: 9,930 PS, 8,666 mesh shaders, 1,115 VS and
923 CS. 8,666 is the mesh total without the 769 listings whose names start with "." (glob skips
them). The translator's own marker test over all 26,503, on the code translate() keeps, finds
21,554 wave64 (10,031 PS, 9,282 MS, 1,179 VS, 867 CS, 195 GS); with the row's 2,287 flag-only
shaders that is exactly the FSSM flag's 23,841, with no contradiction. Read raw, 104 wave32
listings seem to carry a marker, all from embedded data words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:10:16 +01:00
4dafc809e3 int_hw_probe: valu_cvt_norm_f16, the f16 normalised conversions on RDNA2
67 programs for v_cvt_pknorm_i16/u16_f16 and v_cvt_norm_i16/u16_f16 (near-ties,
saturation, NaN, op_sel on the pk forms, neg/abs) run natively on gfx1036 and
compared with the translator: all bit-identical, wave32 and wave64. The two
design.md rows no longer say not GPU-verified.

AI-assisted.
2026-11-23 01:10:15 +01:00
4866ae5cc6 Preserve the final observed exception in capped startup traces 2026-11-23 00:07:52 +00:00
4f760c1aed Shader: isolate wave32 pixel operations in wider subgroups (SHADER-731) 2026-11-22 20:07:05 -04:00
207cecb2fa docs: name the sampled windows on the remaining cross-check claims 2026-11-23 00:07:01 +00:00
8e3e1b4885 design: the multi-component _d16_hi_ buffer forms are not instructions (SHADER-755)
SHADER-755 asked for `buffer_load_format_d16_hi_xy` and the other multi-component high-half
format forms to be translated on top of #1885. They name no RDNA instruction:

- AMD's machine-readable RDNA1 and RDNA2 ISA XML defines `BUFFER_LOAD_FORMAT_D16_HI_X` and
  `BUFFER_STORE_FORMAT_D16_HI_X` (MUBUF opcodes 0x026/0x027) and no other format D16 high-half
  instruction; the packed widths are 0x080-0x087 with no high-half counterpart.
- LLVM's gfx10 through gfx12 MUBUF tables define the same two, and the console's gfx1013 is
  decoded through the gfx10 table, so no listing can carry one.

So this documents the fact instead of inventing a placement for component 1: a docs/design.md
row, and a semantic test that keeps each multi-component spelling Unsupported while the packed
forms translate as a control. #1885 (SHADER-320) adds the `_x` forms, which do exist.

Docs tests and the new test pass; the semantic suite is checked against aa2988cc (the same
failures are there).
2026-11-23 00:06:19 +00:00
cf2a45fc38 docs: README/d3d12_command_objects reflect the landed console-ABI work
The Xbox D3D12 row listed buffer views, root signatures, pipelines,
draws, placed resources, 1D textures and a swapchain as missing — all
implemented — and predates the console list proxy, the PresentX wiring
and the upload arena. The slot-148 note now describes the arena and VA
translation that replaced the "must" wording.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 17:06:08 -07:00
b318c73e9c docs(gamedata): describe the PAMH tile coordinate label bit
ASSET-346. Derive tile coordinates from their bounds and document why different cells can share the seven-byte label.

Refs: #787, #4084
2026-11-22 19:05:22 -05:00
311736eca0 docs: fssm_crosscheck records the duplicate-XBCH fix that landed
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>
2026-11-22 17:02:10 -07:00
13d4291d29 docs: replace the estimates' math symbols with ASCII and state the observed distinction 2026-11-23 00:02:07 +00:00
ae0b55b75b docs: the SHADER-10 tier A permutes are GPU-checked by TEST-433's fixtures
The partition-invariance row still said ds_bpermute/v_permlane16 (and ds_swizzle,
v_permlanex16) were not GPU-tested for lack of a fixture. ps_w64_a_bpermute,
ps_w64_a_permlane and ps_w64_a_swizzle cover all four, and w64_graphics.py passes
them at required 64 and 32 lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:00:35 -03:00
adf27a1015 rdna2spirv: use OpAtomicLoad in ds_add_f32 CAS preheader and verify row 341 on RDNA2 (gfx1036) 2026-11-23 03:00:21 +03:00
291767e54f CI: verify llvm-mc amdgcn target and retain test compatibility notes (BUILD-923)
- In .github/workflows/runtime.yml, add a sanity check step ensuring /usr/lib/llvm-19/bin/llvm-mc has amdgcn target support after package installation.
- In docs/testing.md, retain the note that older llvm-mc (18+) supports valu_fuzz.py --family mem and lds_fuzz.py, while stock CI fixtures need 19+ and full f16 fuzzing requires 21+.
2026-11-23 01:00:15 +01:00
2be25cee2c shims: wire the measured PresentX queue slots to the presentation core
Queue slots 30 (older layout) and 32 (newer) are the measured PresentX
entry points, with SignalX at 23/25. The queue proxy now detects which
of the two documented console layouts a title uses — a fence reaching
slot 16/17 marks the newer layout — forwards SignalX as PC Signal, and
lazily builds the windowed presentation core for PresentX under
LEONIDA_VULKAN_DEVICE.

Unmodelled console-only queue methods answer S_OK instead of E_NOTIMPL
because frame pacing flows through them; they are still never forwarded.
The mock test now asserts that contract.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 16:57:41 -07:00
bef00bb05d docs: count the compute-shader RSRC2 check over all 2,689 CS by SGPRs read before writing
The "Compute shaders" row said 2,281 of 2,689 CS match COMPUTE_PGM_RSRC2 exactly and the rest
overshoot through loop-carried registers. Recounted with an SGPR read-before-write scan on the
code translate() keeps: 2,540 stay inside USER_SGPR + the enabled TGIDs, the other 149 overshoot
only through loop-carried registers; 22 remain when the CFG is followed, each register written
on some other path; read raw, 119 more come from embedded data words decoded as instructions.
Same numbers in the translator comment. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:56:32 +01:00
563774c585 docs: add Apple M2 S# half-level LOD data point (TEST-915) 2026-11-22 17:56:07 -06:00
9c7a861906 wave64_halves: vote() takes st explicitly; the row says an exported uniform mask stays cross-lane (review nits) 2026-11-23 00:55:44 +01:00
458b107c36 Report partial D3D12 submissions in boot traces 2026-11-23 00:53:59 +01:00
b69c42d3d1 docs: recount mesh v5 reads over all 9,282 mesh shaders (PROC-198)
The census listed shaders with glob.glob("*.s"), which skips names that
start with "." (616 mesh listings). All 9,282 read exactly v5 in the code
translate() keeps. Read raw, 266 of the 309 listings with data words
read more, all after a branch; in 101 the register is written after the
read (the earlier "none" was a counting error).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:53:29 +01:00
c43cc3f33d docs: recount the PS system-input layout over all 12,101 PS (SHADER-726)
The census listed shaders with glob.glob("*.s"), which skips names that
start with "." (118 PS). Over every PS listing the layout holds for
12,098 of 12,101; 345 read front face, 373 read past the last input
(+85 with data words), 364 of them written later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:53:29 +01:00
225f8266a6 shader: measure v_cvt_pknorm_f16 on RDNA2 and support VOP3 clamp and dst op_sel 2026-11-23 00:53:10 +01:00
f4ec24236c ASSET-321: decode the BVH descriptor templates and tie 6,701 BLAS to them
The 24,832 "other descriptor" streams of core_bvh4.rpf are two templates,
told apart by the page word in the block that the 0x08 pointer addresses:

* 2,531 instance descriptors with N > 1 slots (the 208-byte record is the
  N = 1 case). The stream after each holds the BLAS of its non-zero entries
  back to back; each entry's low u32 is that BLAS's declared end rounded up
  to 256. 2,531/2,531 pass and 6,701 BLAS are tied; the N = 1 entry rule
  holds for 269,106/269,106 records.
* 22,301 table streams (page word 0x1): K sorted u32 values and K 32-byte
  items. None is followed by a BVH stream, and no key or value matches
  anything beyond chance.

tools/bvh_groups.py reproduces the template and buffer counts, with
synthetic tests. docs/bvh.md gains §3.2a with the layouts, the rule,
the tested non-links and what stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:52:58 +01:00
d34d1654f4 D3D-315 review: narrow the spill conclusion; --base keeps unnamed defaults
docs: the census shows zero below-base spill-pointer candidates in the
translated shaders, not that no signature spills. How many runtime
signatures exceed the budget and why a given pack() refusal happens stay
open; listed with the at-or-above-base blind spot.

root_spill_census.py: --base overrides only the stages it names. Before,
--base cs=4 alone dropped every other stage from the check (a PS address
read at s7 passed --expect-no-spill). Tests cover that case and the
base-1 / base / base+1 boundary for every default stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:52:20 +01:00
37077102ea ped_catalogues: parse 0DRP v122 and PSIN appearance catalogues (0x8dcb4cf5), preset inheritance, and cull_drawable chains 2026-11-22 15:48:19 -08:00
2441b282ac tools: add modular ped body assembler, coplanar seam stitcher, and pipeline docs 2026-11-22 15:47:07 -08:00
cfe2e3de64 docs/navmesh: prove vehicle navmeshes are stored in navmeshes.rpf dynamic partition and classify models (ASSET-332) 2026-11-23 00:45:31 +01:00
2a9a4e9fb0 docs(i18n): sync the Simplified Chinese quickstart with README at aa2988cc (PROC-203)
Add the Platforms section, the conda route for llvm-mc, the Download ZIP
note, a low-disk-space section, the pipelines stage and its cache, what
the build redoes automatically and how vk_pipeline_check is built on
Linux. Update the --wave64-emulate auto reuse rule. Update the synced
commit in docs/i18n/README.md.
2026-11-23 01:45:16 +02:00
7c28980d73 docs(i18n): sync the German quickstart with README at aa2988cc (PROC-203)
Add the Platforms section, the conda route for llvm-mc, the Download ZIP
note, a low-disk-space section, the four fallback flags, what the build
redoes automatically, the Linux cross-build of the runtime stage and the
AMD Windows driver rule for --wave64-emulate auto. Correct the pipelines
stage: the runtime doesn't load its cache yet. Update the synced commit in
docs/i18n/README.md.
2026-11-23 01:45:16 +02:00
67ce3dc477 docs(i18n): sync the Russian quickstart with README at aa2988cc (PROC-203)
Add the Platforms section, the conda route for llvm-mc, a low-disk-space
section, the AMD Windows driver rule for --wave64-emulate auto, what the
build redoes when llvm-mc, the translator or the decoder changes, and how
vk_pipeline_check is built on Linux. Correct the pipelines stage: the
runtime doesn't load its cache yet. Update the synced commit in
docs/i18n/README.md.
2026-11-23 01:45:16 +02:00
23851b919a docs(i18n): sync the French quickstart with README at aa2988cc (PROC-203)
Add the Platforms section, the conda route for llvm-mc, a low-disk-space
section, the AMD Windows driver rule for --wave64-emulate auto, the four
fallback flags, what the build redoes when llvm-mc, the translator or the
decoder changes, and the Linux cross-build of the runtime stage. Update the
synced commit in docs/i18n/README.md.
2026-11-23 01:45:16 +02:00
3a4bac0373 bink_abi_test: say which BINKSUMMARY bytes are written, not a struct size (review)
@Flyander's review: the highest changed byte bounds the extent, not the
bytes written or the structure's size. With two sentinels a written byte
always differs from one of them, so the test now records every byte that
kept the sentinel in both calls and checks that none below the extent did:
on all 515 streams BinkGetSummary writes every byte of +0x00..+0x8F and
none after. docs/movies.md and the test notes say that, and that the
declared structure may have padding past +0x8F; the source link in the
ABI subsection now points at the .cpp, with the notes linked beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:44:21 +01:00
d8bfb820da Add smh GPU strand groom decoder, RNG/interpolation, GLB exporter, tests and docs 2026-11-22 15:44:11 -08:00
5f16276d12 tests, docs: every clear of the wave64 exchange buffer has a test that fails without it (SHADER-708)
test_w64x_clear_single_writer.py gains a mesh shader and whole-workgroup runs of
programs that take the inline helpers (one wave and several), two local round
loops, and a round loop after a local one. The lockstep interpreter of
test_wave64_emulate_opt.py also fails when one invocation plain-stores a %x_buf
word that another loads or updates between two barriers. With any one of the
four places put back, both files fail. The design.md row has the numbers
measured on main aa2988cc.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 01:43:24 +02:00
687cdf9ce3 docs/i18n: advance pt-BR quickstart sync to f847748c (RDNA1/RDNA2 wave64 and gta6rt --overlay) 2026-11-22 20:41:26 -03:00
c5da97fb52 docs: D3D12.X console ABI — vtable slots, fields and record encodings
Collects the console-side ABI facts the d3d12_xs shim must reproduce:
device/queue/list/heap/resource slot tables (both measured layouts and
the fence-based detection rule between them), the command-list object's
field layout and inline record encodings, descriptor-table and root-
argument wire formats, the unified-memory address model, and the
present path. Sibling-layer findings are marked unverified here; slots
the package's own DLLs confirm are marked as such.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 16:41:17 -07:00
7cd6aa7c93 loader/tools: review fixes for import routing and the inventory
pe_loader: resolve() and resolve_forwarder() key the DLL name with
dll_key() — lower-case, trailing '.' dropped, ".dll" added when there
is no extension — the file-name rule LoadLibrary applies. Without it an
import naming "GameInput" or "gameinput.dll." missed the shim and
owns_dll lookups while LoadLibraryExA still bound a host namesake.

registry: xaudio2_9.dll ordinals 8-10 classify as hresult (host table
measured: XAudio2CreateV2_9 / WithVersionInfo / WithSharedContexts);
the redist's ordinal table is unconfirmed and stays other.

import_inventory: classify parity for the #1 ordinals; the delay-import
directory (entry 13) is read with the loader's checks; the descriptor
table stops at Name == 0 and unreadable names fail like read_string;
host-bound imports report as host instead of unimplemented thunk
(owns_dll ported); thunk tables deduplicate by RVA under a global cap.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 16:41:17 -07:00
d2dbb0b690 tools: hello_pixels draws a synthetic quad through vk_harness
The package-free complement to first_light: hand-written SPIR-V
assembly (no GLSL compiler, spirv-as only), a generated VKH_DRAW_MESH
quad, RGBA32F readback to PPM and a zlib-only PNG, and a --check oracle
(coverage + 7 probe pixels against the pattern's closed form) exercised
by tests/test_hello_pixels.py without a GPU. Measured end to end on
Mesa llvmpipe 20.1.2 at 512x512.

Assisted-by: Devin
2026-11-22 16:41:15 -07:00
1936a36fdf docs/gbuffer: clarify OSG1 vs FSSM +0xFC, 1702/1703 counts, and RTZ truncation vs rounding 2026-11-22 20:41:12 -03:00
bb052d8575 loader: don't bind shim-owned imports to host namesakes; document import routing 2026-11-22 16:40:52 -07:00
75b2ea486c docs: catalogue the console library surface and shim coverage 2026-11-22 16:40:46 -07:00
c1f812ae9a anim_move: decode MoVE v19 state-machine containers in anim.rpf (ASSET-86) 2026-11-22 20:40:36 -03:00
dcb59b5c1e Allow Tier 3 reference on any selected GPU
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-22 19:40:32 -04:00
d220585977 Add native Tier 3 inner coverage reference probe
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-22 19:40:32 -04:00
fc2bd57aa3 d3d12: ClearDepthStencilView ignores a flag for a plane the view lacks (D3D-437)
STENCIL on a D32_FLOAT view used to make prepare return invalid_clear, so
the whole command list was dropped. Like the PC runtime (WARP), the absent
plane is now ignored: STENCIL alone clears nothing, DEPTH | STENCIL clears
the depth plane. d3d12_clear_test compares three such cases with WARP.

AI-assisted.
2026-11-23 00:39:08 +01:00
6edda9355e D3D-315: census of root-signature spill evidence; none in the corpus
tools/root_spill_census.py counts, per stage, user-SGPR reads used as an
address below the stage base (where the compute spill pointer s[0:1] was
measured), the highest user SGPR read and its kind, the RSRC2 USER_SGPR
budget where index.json records it, and RTS0 parts in the carved
containers. --expect-no-spill turns it into a check. Counts only, from
index files; no game bytes.

On Xbox Series 1.0.2.1 (26,501 translated shaders, 26,503 containers):
0 RTS0 parts, 0 spill-pointer candidates in any stage, compute at most
14 user SGPRs (10 of 28 root dwords). docs/d3d12_vulkan.md records the
counts; pack() keeps refusing over 32 dwords, now with the measured
reason that no shader would read a spill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:39:08 +01:00
f325308121 docs: pin the v_fmamk_f16 and v_fmaak_f16 row to measured gfx1100
The row was CPU-checked only. 17 cases on gfx1100 confirm the print order, one rounding to f16 and the kept high
half, and add that f16 VALU keeps denormals (the LDS float adder flushes them), quiet the sNaN with its payload
and give the negative default NaN for inf + -inf.
2026-11-22 17:38:12 -06:00
280f2bce84 docs/bvh.md: the 0x130 "u16 table" is three header words; no prim remap table (ASSET-329)
Counted over all 272,864 complete bvh4 streams with tools/bvh_index.py:
offsetToPrimRemap is 0 on every one; rootNodePtr lands in the node region on
all but 16 single-leaf streams (tri0 root); the element region is numElements *
64 rounded up to 128; offsetToParents is a multiple of 4, negative on 237,347.
The section 4 "u16 table at 0x130" is those words read as u16s. Where the
parent array starts stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:37:49 +03:00
2c108e91bd bvh_packing_check: the §4a packing holds on every BVH4 stream (ASSET-330)
A geometry-free check of the dehydrated packing that bvh_rehydrate reads:
level table, group fit, child counts and override masks, child pointer
targets and widths, one parent per node and leaf, vertex-order bytes and
stored overrides inside sceneBounds. 272,874 of 272,874 streams of
core_bvh4.rpf and shared_minigame000_bvh4.rpf pass; docs/bvh.md gets the
counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:34:49 +01:00