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.
- d3d12_vulkan_device.cpp: an ID3D12Device11 (PC ABI) the device proxy
forwards to. Creates queues, allocators, command lists (incl.
CreateCommandList1), fences, descriptor heaps (32-byte slots; RTV/DSV hold
TargetViews), render-target and depth-stencil views, committed buffers
(upload/readback mapped and zeroed) and 2D textures in the common formats,
and answers feature-level and architecture queries. Everything else is a
generated stub that logs once.
- First use of a new texture zero-fills it and moves it to the layout the
command expects (vulkan_replay.h initialize), as D3D12 committed resources
start zeroed; no submission at creation. CREATE_NOT_ZEROED skips the fill.
- Children hold the proxy, so GetDevice returns the Xbox-ABI object; COM base
classes moved to d3d12_com_object.h. D3D12 queues share one VkQueue behind a
submit lock.
- D3D12XboxCreateDevice: LEONIDA_D3D12=vulkan creates the Vulkan device on its
own instance and wraps it in the same proxy (gta6rt built with the Vulkan
SDK and Python 3); the host PC device stays the default.
Tests: d3d12_vulkan_device_test calls everything through the proxy (heaps via
slot 14 with RAX start handles, a render target via slot 76 with the Xbox
layout word) and reads colour, depth, stencil and a never-written texture
back; it also runs the standalone device. Clean under the Khronos validation
layer with the other GPU tests; all 6 ctest tests pass.
Index the three *_bvh4 RPF9 packs with the fixed carver and record the measured stream/byte composition. Add tools/bvh_index.py for the 0x81020006 header family (tag + 0x140 + 64*n == end), with synthetic tests. No game data, keys or carved payloads are included.
- Pair ps/vs/ms/gs shaders with partner stubs from <spirv>/stubs/ and compile
real pipelines via vkCreateGraphicsPipelines with Vulkan 1.3 dynamic
rendering (color attachments from outputs, depth attachment when writes_depth,
VK_EXT_mesh_shader for ms, vertex input bindings for vs).
- Enable only optional extensions needed by the selected shaders; report
shaders missing required device features or stubs as skipped rather than failed.
- Add --stage all|cs|graphics (--compute-only / --graphics-only), per-stage
module/pipeline/skip/timing reporting, and guard VK_KHR_maintenance8 for
older Vulkan headers. Preserves PR #28 --jobs, cache, --start/--count, and SLOW.
- Add tools/spirv_stubs.py to emit minimal deduplicated SPIR-V 1.0 VS/PS
partner stubs into <spirv>/stubs/ using only the standard library.
- Record writes_depth, gs_input_locations, and gs_output_locations in
shader_meta() (keeping all existing fields intact and avoiding overlap
with PR #76 / PR #83 fields).
- Generate stubs automatically when rdna2spirv.py or build.py writes index.json.
- shader_ir.parse_file() unconditionally skipped lines[0] as a comment header,
while tests/conftest.py wrote raw llvm-mc stdout without a header line.
- On LLVM 14/18/19, llvm-mc emitted a leading '.text' directive on line 0 so
lines[1:] skipped '.text'. On LLVM 21/22, llvm-mc stopped emitting '.text',
causing parse_file() to drop the first instruction (s_mov_b64 exec, -1 in
test_wave64_bfm64_and_half_cmp_emit_wave_ops's vcc_half shader), which left
g.wave64 = False and made s_bcnt1_i32_b32 count both halves.
- Only skip lines[0] in parse_file() when it is not an instruction line, skip
assembler '.' directives (like '.text'), prepend a synthetic header in
tests/conftest.py, and restore the strict assert in tests/test_translate.py.
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>
vk_store_test requested shaderStorageImageReadWithoutFormat for both
modes, so vkCreateDevice failed on GPUs without it (Intel Gen9) and
cs_imgstore failed too, though only image_load needs the feature.
Request it in load mode only, exit 77 when it is missing, and have
check.py list that as skipped instead of failed.
vk_store_test exits 77 when the GPU lacks format-less storage image read/write (Intel Gen9), and check.py
reports it as SKIP. run_gpu_tests.py catches up with check.py: ps_flat (drawn with vs_ids), ps_legacy_mul,
and ps_bitmask_perm judged on lanes 0-31 only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
find_library only searches %LIB%, which a plain shell doesn't set, so configuring with the
Visual Studio generator from a normal terminal (`cmake -S runtime -B runtime/build`, as the
CI workflow's check job does) skipped root_sig_test and device_proxy_test with
"d3d12.lib not found", although the generator links against that SDK. Look in the
generator's target SDK (KitsRoot10/Lib/<version>/um/x64) and in WindowsSdkDir when set.
Tested on Windows 11, VS 2022 Build Tools 14.44, SDK 10.0.26100.0, VS generator from a plain
shell: both libraries found, root_sig_test and device_proxy_test build and pass (WARP).
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.
Mapping an image never ran anything. TLS callbacks and DllMain were documented as the caller's, and
nothing called them, so a module that needs either could not be brought up at all.
Loader::initialise() now allocates the module's TLS slot, copies the template and SizeOfZeroFill into
it, writes the slot index into the image, runs the TLS callbacks with DLL_PROCESS_ATTACH, then calls
the entry point of a DLL as DllMain. Every address it follows is bounded like the rest of the loader:
the directory, the template, the index, the callback table and each callback, with a 1 MiB ceiling on
the block. Only DLLs get DllMain; an EXE's entry point has a different signature and stays the
caller's to run, and --dry-run still runs nothing.
The tests build an image whose TLS callback and DllMain are real machine-code stubs that store a
sentinel, so they check the code actually executed rather than merely being parsed.