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>
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.
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.
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.
- 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.
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.
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.
- 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.
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.