Commit Graph

18350 Commits

Author SHA1 Message Date
29a4630688 test(tools): add test_fssm_unpack covering container carving, headers, alignment, and CRC bounds 2026-11-21 19:00:13 +01:00
Ryx
7f6e8f059d Runtime: D3D12 barriers and depth-stencil clears in the command-list IR
The IR (command_list.h, was clear_commands.h) now records transition, UAV and
aliasing barriers (split barriers record their end half) and full-view
ClearDepthStencilView next to ClearRenderTargetView.

vulkan_replay.h (was vulkan_clear.h) maps D3D12 resource states to Vulkan
layout/access/stage (section 4.3 table), decodes subresource indices including
depth/stencil planes, validates the whole list before emitting anything, and
wraps clears in a layout round trip so images stay in their D3D12 state. The
caller no longer manages layouts by hand.

Tests: command_list_test (recording rules), d3d12_state_map_test (state table,
subresource decoding, constants checked against d3d12.h; needs Vulkan headers
only) and vk_command_replay_test (GPU readback of colour, depth and stencil;
LEONIDA_VK_VALIDATION=1 runs it under the Khronos validation layer).
2026-11-21 18:58:48 +01:00
f38de0470b Docs: measured model recovery state and the rpf9-explorer fix 2026-11-21 17:58:43 +00:00
8eff3c4965 test(tools): add unit tests for hashdict joaat, harvesting, and lookup 2026-11-21 18:57:13 +01:00
f654ae73e8 Docs: measured imports of the 16 shipped Xbox modules
gta6rt --dry-run maps every DLL in the package at its preferred base,
binds all imports, and reports zero unimplemented. The six unique
Xbox-specific imports are the xmem/d3d12_xs set already documented.
2026-11-21 17:56:10 +00:00
c13ce17f14 amd_swizzle: parse pattern cells instead of eval
eval(cell, {}, env) still exposes builtins, so a crafted header
passed via AMD_SWIZZLE_HEADER could run code. addrlib's tables only
use symbols, integers and ^, so parse exactly that and reject the rest.
2026-11-21 14:47:23 -03:00
6582fa2dcb Make Vulkan shader checks aware of wave64 support 2026-11-21 19:46:32 +02:00
e065f6f355 Audio: readable AWC bank/stream manifest without exporting
Add tools/awc_manifest.py, a stdlib CSV/JSON manifest of every stream in .awc banks. It reads the layout through awc_opus.parse_awc/music_channels, reports durations and suspicious metadata, and skips unreadable banks with a warning. Add a synthetic-bank unittest (PCM16, float32, Opus, streamed music, bad magic); music_channels gains a default-on collect_packets flag so metadata callers avoid packet copies.
2026-11-21 17:44:26 +00:00
ad7691790b Runtime: tests for the measured xmem shim ABI 2026-11-21 17:42:40 +00:00
4f749583f1 Docs: audio guide, related projects, and a README truth pass
README: audio row now says lossless Ogg Opus, PCM codec 0/2 as WAV, XMA2 via ffmpeg and 16-bit --wav; D3D12 row reflects the design doc and xmem/d3d12_xs shims with no device proxy; LLVM_MC is documented as a whole command; link the two new docs. docs/audio.md covers the ADAT layout, tags, codecs, exporters, song/station/venue distinctions and the no-sharing rule. docs/related_projects.md records the PercyStar and americas-recomp licence boundaries.
2026-11-21 17:42:01 +00:00
793b06f127 docs: root-signature ABI facts from the console D3D12 libraries (register-based by default, memory-based opt-in, spill pointer)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 12:39:42 -05:00
74799a9ef6 Update README.md 2026-11-21 12:37:20 -05:00
58cb83df2c Report model decode failure reasons in rpf9dump 2026-11-22 01:35:55 +08:00
8ecbfa9d52 tests: run test_awc_opus's main() serially (--jobs 1); the pool can't pickle the privately loaded module
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 12:28:46 -05:00
f20ea6dde8 Merge pull request #28 from Eremia Brinzoi Razvan Andrei 2026-11-21 12:26:30 -05:00
0a9dc48d72 Merge pull request #27 from Kam471 2026-11-21 12:26:30 -05:00
6a56334db1 Merge pull request #26 from Kam471 2026-11-21 12:26:30 -05:00
c116ba0286 Merge pull request #24 from Kam471 2026-11-21 12:26:30 -05:00
3c400001c0 Merge pull request #23 from Kam471 2026-11-21 12:26:30 -05:00
964fce8289 Merge pull request #22 from dependabot[bot] 2026-11-21 12:26:29 -05:00
34d2e63c65 Runtime: match the measured Xbox xmem/d3d12_xs ABI
- xmem: XMemVirtualQuery(process, address, out64) fills the known MEMORY_BASIC_INFORMATION prefix and zeroes the rest; the working-set size goes at +8 with a TRUE return; allocator alignment and size-0 behaviour are documented.
- d3d12_xs: copy root-signature descriptors and clear the Xbox high flag byte (0x03000000) before forwarding to the PC serializer; add the legacy serializer; keep the deserializer.
- d3d12_xs: add D3D12XboxCreateDevice, create a PC device and log the 24-word params block. The Xbox ABI proxy is not implemented; measured slot overrides are documented as TODO and logged at runtime.
- test: root_sig_test serializes synthetic flags=0x03000000 descriptors through the PC d3d12.dll, checks the untouched copy is rejected and the cleared copy is accepted, and exercises the registered shim.

Clean-room: implemented from an ABI-facts spec derived from public write-ups; no source from americas-recomp or AnyPS5 was read or copied.
2026-11-21 17:23:05 +00:00
770c496630 Record full-view color clears and replay them on Vulkan 2026-11-21 19:20:39 +02:00
0aa9840021 vk_pipeline_check: compile on --jobs threads, name compiles stuck past 60 s, resume from the cache (saved every 10 min), --start/--count, line-buffered failures
A full-corpus run stalled for hours inside one compute pipeline with its failure lines stuck in stdout's buffer and no cache written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 12:12:27 -05:00
9f79505a88 CI: leave pytest-based test files to the translator-tests job
The stdlib loop in the check job ran every tests/test_*.py as a script with 'python -I', which fails for any file that
imports pytest (and for ones that import sibling helpers). It skipped tests/test_translate.py by name; skip every file
that imports pytest instead. They all run in the translator-tests job (pytest tests --ignore=tests/semantic).
2026-11-21 18:11:57 +01:00
348494dd88 Docs: prior art and measured Xbox D3D12 ABI
Add section 7 with the americas-recomp measurements: 6 Xbox-specific static imports, D3D12XboxCreateDevice, device slots 14/62/76, descriptor-heap start handles in RAX, root-signature flags 0x03000000, and the BVH builder's Xbox DXIL shaders. Update the device, descriptor, resource, ray-tracing, milestone, risk, reference and open-question text. ABI/format facts and links only; GPL-2.0-only prior art, no code copied.
2026-11-21 17:10:44 +00:00
51b79339fb Manifest: hash files with --jobs (parallel create/verify)
Default is half the CPU count; --jobs 1 keeps serial hashing. create rebuilds entries in walk order so the JSON does not depend on completion order, and verify prints problems in manifest order so its output and exit code are identical for every job count. Progress now reports completed file counts from the main thread instead of per-file worker lines.
2026-11-21 17:00:39 +00:00
056dafe073 ci: bump the actions group with 3 updates
Bumps the actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-dotnet](https://github.com/actions/setup-dotnet).


Updates `actions/checkout` from 4 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

Updates `actions/setup-python` from 5 to 7
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v7)

Updates `actions/setup-dotnet` from 4 to 6
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-dotnet
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 16:59:35 +00:00
dd637c9975 Tests: AWC packaging (PCM16, float32, Ogg Opus) with synthetic banks 2026-11-21 16:59:27 +00:00
718b714871 CI: run the stdlib test scripts without test_translate.py (it needs pytest; the translator-tests job runs it) 2026-11-21 11:51:28 -05:00
4b251d1cb6 Merge pull request #15 from Mulkku
# Conflicts:
#	runtime/test/vk_store_test.cpp
#	runtime/test/vk_texture_test.cpp
#	runtime/test/vulkan_loader.h
#	tools/rdna2spirv.py
2026-11-21 11:47:52 -05:00
ab4fb9c6c1 CI: fix the translator-tests / semantic-tests job merge 2026-11-21 11:47:20 -05:00
af5dc7be3b Merge pull request #20 from ttd0x
# Conflicts:
#	.github/workflows/ci.yml
2026-11-21 11:47:13 -05:00
f967ab8959 Merge pull request #18 from ttd0x
# Conflicts:
#	runtime/CMakeLists.txt
2026-11-21 11:47:07 -05:00
324a787f3c Merge pull request #21 from Kam471 2026-11-21 11:46:55 -05:00
d70f44b292 Merge pull request #1 from Ewann 2026-11-21 11:46:54 -05:00
53d903930a Merge pull request #14 from eIBart0 2026-11-21 11:46:54 -05:00
6f486f75d3 Merge pull request #13 from eIBart0 2026-11-21 11:46:54 -05:00
000861252c Merge pull request #2 from Nairo Martins 2026-11-21 11:46:53 -05:00
797b13473d Merge pull request #9 from Adrià 2026-11-21 11:46:53 -05:00
3fe7b7feac Merge pull request #8 from Adrià 2026-11-21 11:46:53 -05:00
660f252d5c Merge pull request #11 from Adrià 2026-11-21 11:46:53 -05:00
ad27984923 Merge pull request #12 from Adrià 2026-11-21 11:46:52 -05:00
a984b9e766 Merge pull request #10 from Adrià 2026-11-21 11:46:52 -05:00
693cc4f841 Merge pull request #17 from Kam471 2026-11-21 11:46:52 -05:00
966a4096af Merge pull request #19 from Kam471 2026-11-21 11:46:52 -05:00
cb33aa7591 Merge pull request #6 from Adrià 2026-11-21 11:46:52 -05:00
8d19580169 Merge pull request #16 from Kam471 2026-11-21 11:46:52 -05:00
b99b4c7793 Merge pull request #5 from Adrià 2026-11-21 11:46:51 -05:00
439887f04f Tests: check computed values with a small SPIR-V interpreter
tests/spirv_interp.py runs the straight-line, single-lane SPIR-V the translator
emits for branch-free shaders (binary32 rounding after every op, GLSL.std.450
subset, Function/Output variables). Unknown opcodes raise NotImplementedError.

- test_values.py: 49 value checks over the supported instruction families, with
  references written in plain Python from the ISA definitions.
- test_f16_op_sel_values.py: 84 value checks for op_sel on f16 VOP3 ops (all
  select combinations, neg/abs/clamp, fmac).
- listing.py: hand-written listing helper. shader_ir.parse_file treats the first
  line of a listing as its header, so the helper writes one; test_f16_op_sel.py
  used to lose its first instruction and now uses the helper.

None of these need llvm-mc or spirv-tools. Mutation-checked: breaking the
op_sel source index or the destination merge makes them fail.
2026-11-21 17:46:28 +01:00
a7a1c01658 Translator: support op_sel on f16 VOP3 ops
v_fma_f16, v_med3_f16, v_add/sub/mul/max/min_f16, the f16 unary ops and v_fmac_f16
used to raise Unsupported when op_sel was present. Source bit i now reads the high
half of source i and the last bit writes the high half of the destination, the
other half being kept (Mesa ACO can_use_opsel, RDNA2 ISA VOP3 OP_SEL).

The f16 read/write sequences move into f16_in/f16_out/opsel_bits. Output without
op_sel is unchanged apart from SSA numbering.

Tests: tests/test_f16_op_sel.py uses hand-written listings (no llvm-mc needed).
2026-11-21 17:46:28 +01:00