Commit Graph

5744 Commits

Author SHA1 Message Date
352300704d Runtime: skip oversized modules in vk_pipeline_check, and record the corpus pass 2026-11-21 19:17:43 +00:00
4d6733baa2 docs/design.md: whole-wave mask tests are exact only on 64-wide subgroups
The "Whole-wave masks" row said cs_wavemask checks all 64 lanes, which reads as if it passes
everywhere. On an RTX 4090 (subgroup 32) s_bcnt1_i32_b64 of lanes 16-47 counts one half
(#101); check.py skips these tests there since #35. Say so in the row.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 20:16:29 +01:00
464c3903ab Docs: measured common.rpf game-data composition
Measure the XML/config layer of the 1.0.2.1 common.rpf: 954 zlib streams, 50.2 MB inflated, 266 XML documents across 118 roots with no RBF0, PSIN or Bink 2. Add a stdlib index tool and synthetic tests.
2026-11-21 19:15:06 +00:00
008aa3d3b0 Tools: parse the audio-config music record table 2026-11-21 19:13:50 +00:00
241b03c9bf docs: note that all multi-chunk RBF0 resources are wide
The three narrow resources are single-stream; also drop a no-op line from the attribute test.
2026-11-21 19:10:11 +00:00
9bc8453baa docs: measured RBF0 composition in data.rpf, with rbf0_index
1,263 RBF0 resources parse to their exact last byte under the measured record grammar: 1,243 single-stream and 20 multi-chunk, 1,260 with the FB FF 01 00 prologue and 64-bit scalars, 3 without it and 32-bit scalars. No section directory or name-hash table exists. The anim.rpf rig-set blob is the same format with a different root schema.

tools/rbf0_index.py indexes an RPF9 data area or a carved directory and writes CSV/JSON; tests/test_rbf0_index.py builds synthetic headers only. No game data is added.
2026-11-21 19:08:57 +00:00
df508f3444 docs: distinguish hash presence from record confirmation 2026-11-21 19:06:07 +00:00
7f993ac8b4 docs: measured navmesh archive composition
Full RPF9 stream index of navmeshes.rpf (90,295 streams), the measured 0DRP directory-page layout, rejected AABB/NVMS pseudo-magics, and data/levels cross-check counts. Adds a stdlib navmesh_index.py and synthetic tests; no game data.
2026-11-21 19:06:01 +00:00
df86dba224 docs: scope the motion-matcher sample 2026-11-21 19:04:30 +00:00
2a0a77f15b docs: scope the bone-table resource count 2026-11-21 19:04:04 +00:00
018fda6d82 tools: parse RBF0 rig sets and bone-table resources 2026-11-21 19:02:31 +00:00
71d17d05dd Merge pull request #35 from Zmirzz
# Conflicts:
#	runtime/test/shaders/check.py
#	runtime/test/shaders/cs_wave64_ballot.asm
2026-11-21 13:59:47 -05:00
646d48a0d1 Merge pull request #38 from Ewann 2026-11-21 13:58:57 -05:00
af60f909d1 Merge pull request #31 from Kam471 2026-11-21 13:58:56 -05:00
d9eba909c1 Merge pull request #37 from Kam471 2026-11-21 13:58:56 -05:00
46aa35a1ed Merge pull request #91 from Kam471 2026-11-21 13:58:56 -05:00
917e821067 Merge pull request #79 from Ryx
# Conflicts:
#	runtime/CMakeLists.txt
2026-11-21 13:47:02 -05:00
4a513f3db2 Merge pull request #62 from Kam471
# Conflicts:
#	runtime/CMakeLists.txt
2026-11-21 13:47:02 -05:00
6c9085acd5 Merge pull request #73 from eIBart0
# Conflicts:
#	docs/design.md
#	runtime/test/shaders/check.py
#	tools/rdna2spirv.py
2026-11-21 13:46:45 -05:00
eb7c304893 Docs: RPF9 archive and carve-tool guide 2026-11-21 18:46:38 +00:00
b70ddd632c Merge pull request #85 from Kam471
# Conflicts:
#	docs/design.md
2026-11-21 13:46:24 -05:00
7a468c93ab Merge pull request #82 from Kam471
# Conflicts:
#	docs/design.md
2026-11-21 13:46:15 -05:00
bc7761ca36 Merge pull request #76 from andretuta 2026-11-21 13:45:48 -05:00
3358caf2af Merge pull request #83 from SuarezPM 2026-11-21 13:45:48 -05:00
ba6dd8b97c Merge pull request #41 from Kam471 2026-11-21 13:45:46 -05:00
34d4559d17 Merge pull request #81 from Kam471 2026-11-21 13:45:46 -05:00
9925be3225 Merge pull request #86 from Kam471 2026-11-21 13:45:46 -05:00
87ff57a65f Merge pull request #75 from Kam471 2026-11-21 13:45:46 -05:00
16029fc5a2 Merge pull request #39 from Kam471 2026-11-21 13:45:45 -05:00
fa54b20fc5 docs: state the RBF0 block-boundary evidence 2026-11-21 18:40:02 +00:00
672ecbb8eb docs: tighten the measured claims and caveats 2026-11-21 18:38:54 +00:00
bbd15cf20d Tools: clean-room FSSM pixel input table decoder 2026-11-21 18:38:26 +00:00
63e0069eb7 docs: correct type-hash and packed-clip measured counts 2026-11-21 18:38:15 +00:00
5e79a65c68 docs: identify the name-table hash as joaat32 of the path stem 2026-11-21 18:37:12 +00:00
0c2b4f6783 docs: exact packed-clip counts and manifest comparison 2026-11-21 18:34:32 +00:00
3b569cd4e7 docs: use exact readable percentages 2026-11-21 18:33:12 +00:00
d5c861cc8f docs: clarify RBF0 token counts and page-count range 2026-11-21 18:32:31 +00:00
dc26450232 docs: correct observed 0DRP page-count range 2026-11-21 18:31:21 +00:00
319f984226 docs: measured animation archive composition and container index 2026-11-21 18:30:05 +00:00
e09fd70be3 Docs: record independent validation of the model decoder fix 2026-11-21 18:28:33 +00:00
caa767d8d0 Translator: shader index identity (src/fssm hashes, ISG1 signature, wave64_emulated) + Turing atlas
- shader_meta: src_sha256, optional fssm_sha256 (--fssm-dir), full
  vertex_input_signature, wave64_emulated (VS/PS/GS), dynamic_format /
  fixed_format_codes; unknown static formats raise Unsupported with code.
- tests/test_shader_index.py: 10 tests (stdlib only, no llvm-mc needed).
- tools/turing_atlas.py: vulkaninfo matrix + spirv-as/val at vulkan1.4,
  5 synthetic cases for the Turing bring-up report.
- docs/design.md: contract table documents the new index fields.
2026-11-21 15:26:31 -03:00
9015a62748 Runtime: Xbox-ABI device proxy (slots 9/10/62/76)
- Wrap the PC ID3D12Device in a copied-vtable proxy: per-slot thunks swap `this` to the PC device, with IUnknown refcounting/QueryInterface, per-slot hit counters and XS_TRACE=1 first-call logging.
- Override Xbox slot 62 to the PC CreateComputePipelineState (PC slot 62 is CreateStateObject) and Xbox slot 76 to CreateCommittedResource (PC slot 27). The 56-byte description prefix is copied and its 0x101/0x1 layout word replaced by ROW_MAJOR for buffers and UNKNOWN for textures.
- Slot 14 wraps the created descriptor heap. On the measured PC runtime the heap getters take the hidden return pointer in RDX, while the Xbox ABI expects the 8-byte handle in RAX; heap slots 9/10 convert between them. Device slots 9/10 stay CreateCommandAllocator/CreateGraphicsPipelineState, because the measured handle getters are ID3D12DescriptorHeap methods.
- Heap slot 7 GetDevice returns the device proxy, not the raw PC device. The heap holds a device-proxy reference, so GetDevice cannot dangle; the device proxy does not reference heap proxies, so there is no cycle.
- Add device_proxy_test (WARP, no game executable): shim-created proxy, QI/refcount, slot 14 heap, heap GetDevice/refcount, raw RAX handles vs the PC hidden-pointer result, slot 9/16/30/43 forwarding, slot 76 buffer and texture, slot 62 compute PSO, and counter checks. Register it with ctest.
- Wire both CMake and scripts/build_runtime.ps1.

Verified against Windows SDK 10.0.26100 d3d12.h (slot counts through ID3D12Device14; no Device15/16 exists there) and a live WARP device. Still unknown: PresentX, queue/fence/command-list extensions, Xbox vtable order beyond the measured slots, and struct returns other than the heap handles.

Clean-room: implemented from the measured ABI-facts spec; no americas-recomp or AnyPS5 source was read or copied.
2026-11-21 18:26:19 +00:00
df87229ce4 docs: measure the BCPack texture gap and the next step 2026-11-21 18:26:19 +00:00
b406270b53 Docs: measured d3d12_xs surface from SCARAB
Records the 116-export contract (23 functions + 93 GUIDs), the 28 D3D12 IIDs and the 10 console-only IIDs from SCARAB, with per-item provenance and file:line references. The IID block ordinals 72-99 are derived from the alphabetical export order anchored by IID_ID3D12Debug @76. Includes a checker/test that re-verifies the 116-slot arithmetic and the 83 standard GUIDs against the Windows SDK.
2026-11-21 18:23:05 +00:00
Ryx
6052bf0bd5 Runtime: rectangle clears, layout tracking, enhanced barriers, COM list/queue/fence
Closes the gaps left by the barrier/clear slice:

- Rectangle clears: ClearRenderTargetView/ClearDepthStencilView rects are
  recorded and replayed with vkCmdClearAttachments in a dynamic-rendering
  scope, clipped to the mip.
- LayoutTracker: the current Vulkan layout per image subresource, so barriers
  start from the real layout. This honours implicit promotion and decay
  (COMMON is GENERAL; simultaneous-access textures stay GENERAL) and, with
  separateDepthStencilLayouts, lets one depth/stencil plane be cleared or
  transitioned while the other stays in another state.
- Enhanced barriers (global, buffer, texture, split, discard) mapped to
  vkCmdPipelineBarrier2.
- vulkan_backend.h: VulkanContext, VulkanQueue (ExecuteCommandLists checks
  every list before writing any; Wait is attached to the next submission),
  VulkanFence on timeline semaphores.
- d3d12_com.cpp: ID3D12GraphicsCommandList7, ID3D12CommandQueue,
  ID3D12CommandAllocator and ID3D12Fence1. Unimplemented methods are stubs
  generated at build time from the SDK's d3d12.h (tools/gen_d3d12_stubs.py),
  so vtables follow the SDK order and nothing SDK-derived is checked in.

Tests: command_list_test and d3d12_state_map_test (every copied D3D12
constant checked against d3d12.h) in ctest; vk_command_replay_test and the new
d3d12_com_test on the GPU, clean under the Khronos validation layer.
2026-11-21 19:19:31 +01:00
f980852e23 movies: index Bink 2 streams and document the container 2026-11-21 18:14:41 +00:00
2151d4ef47 Translator: map vcc_lo/vcc_hi halves, use wave_lane() in s_bfm_b64, update docs/tests
- Map vcc_lo -> MASK_LO and vcc_hi -> MASK_HI in lane_masks.kind() when vcc
  holds a lane mask, and support wave64 vcc_hi mask reads in rdna2spirv.py.
- Use wave_lane() instead of %sg_lane in s_bfm_b64 so wave32-in-subgroup64
  lane positions match wave_mask().
- Strengthen test_translate.py half-compare checks to assert the exact
  lane < 32 / lane >= 32 SSA guard pattern feeding OpGroupNonUniformAll/Any,
  and add vcc_lo/vcc_hi half-mask tests in test_lane_masks.py and test_translate.py.
- Update lane_masks.py docstrings, docs/design.md (OpGroupNonUniformBitwiseOr
  and known remaining gaps), and blank-line formatting in test_lane_masks.py.
2026-11-21 18:11:52 +00:00
d9db324af6 Docs+tool: add CPU reference for differential shader validation
Add docs/shader_validation.md describing why spirv-val is not enough, the CPU/GPU differential model, test-program construction with llvm-mc, the harness design, coverage plan, limits, and prior art.

Add tools/cpu_ref.py, a standard-library interpreter for a small straight-line RDNA2 subset from a shader_ir listing. It models SGPR/VGPR state, VCC/EXEC/SCC, one or 64 lanes, inline constants and literals, exact f32 FMA and the requested integer/float ops. Anything outside the subset raises Unsupported.

Add tests/test_cpu_ref.py with hand-written listings pinning NaN, signed zero, denormals, FMA single rounding, cndmask, EXEC masking, 16-bit packed halves and shifts.
2026-11-21 18:09:38 +00:00
ddd837aa83 Docs: correct stale status claims in the design document 2026-11-21 18:09:01 +00:00
6af5524df7 Docs: link issue 29 and the upstream rpf9-explorer fix 2026-11-21 18:03:10 +00:00