Commit Graph

309 Commits

Author SHA1 Message Date
3eb5ad9892 docs: drop the open-question rows the #284 merge duplicated again
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 18:14:04 -05:00
dbc785f9e5 Merge pull request #332 from fearkov
# Conflicts:
#	tests/semantic/regen_fixtures.py
2026-11-21 18:09:52 -05:00
273e53c8fc Merge pull request #300 from FreddyxS
# Conflicts:
#	tests/semantic/regen_fixtures.py
2026-11-21 18:09:14 -05:00
03ff5f4bd8 Merge pull request #338 from mrb-eel 2026-11-21 18:08:03 -05:00
2f076083fe Merge pull request #327 from Parakeet-Wheat 2026-11-21 18:08:00 -05:00
b98068ea7c Merge pull request #318 from 73N1X 2026-11-21 18:08:00 -05:00
099a5c8848 Merge pull request #309 from Luis Baker 2026-11-21 18:08:00 -05:00
68ade67da9 Merge pull request #324 from Luis Baker 2026-11-21 18:07:59 -05:00
6eb245f59d Merge pull request #284 from S1m0ne1997
# Conflicts:
#	docs/d3d12_vulkan.md
#	tools/feature_scan.py
2026-11-21 18:07:59 -05:00
7761916406 Merge pull request #303 from mrb-eel 2026-11-21 18:07:42 -05:00
77fb672cf2 Merge pull request #312 from Tim Elery
# Conflicts:
#	docs/textures.md
2026-11-21 18:07:40 -05:00
1d2e9cc5ae Merge pull request #323 from Ayinaki 2026-11-21 18:07:37 -05:00
93953ebd75 Merge pull request #320 from Rayhan Robin 2026-11-21 18:07:37 -05:00
17072e2237 Merge pull request #322 from Koert Lichtendonk 2026-11-21 18:07:36 -05:00
a42b1990da Merge pull request #311 from Kam471 2026-11-21 18:07:35 -05:00
489258fda5 Resolve colour MSAA regions into destination offsets 2026-11-22 00:05:17 +01:00
1186f99340 Merge updated Leonida GPU runner into class compare fix 2026-11-21 23:57:44 +01:00
437081fdb6 Runtime: parse version 1.2 root signatures, and read RTS0 table ranges from their offset
parse_rts0 refused D3D_ROOT_SIGNATURE_VERSION_1_2 blobs. 1.2 is 1.1 plus
D3D12_STATIC_SAMPLER_DESC1::Flags: the PC serializer writes RTS0 version 3 with
14-dword static samplers (13 before). The model gains Version::V1_2 and
StaticSampler::flags. The canonical codec writes the flags only for 1.2, so 1.0/1.1
encodings are byte-for-byte unchanged.

Checking it against the real serializer found an older bug: a descriptor table's
payload is {num_ranges, ranges_offset} with the ranges at that offset, but the
parser read them inline after the count. Every table came back with a wrong range
type and count. The oracle test only covered constants and a CBV, so it never saw it.

root_signature_oracle_test now serializes 1.0, 1.1 and 1.2 signatures with a
two-range table, a root SRV and two static samplers (1.2 with a UINT border colour,
then non-normalized coordinates). Every sampler field, the ranges and the canonical
round trip must match. root_signature_test adds hand-built 1.2 and table payloads
and their truncation controls.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:57:07 +01:00
eb629d41a8 Decode BVH4 header and node pointer fields
The indexer treated the pre-header wrapper words as the root and labelled the real header fields as counts. Parse the documented XboxBvh4Header fields, decode root node pointers, and document the runtime node and leaf layouts while keeping the dehydrated packed stream open.
2026-11-21 22:55:52 +00:00
257e3856cc Runtime: GetResourceAllocationInfo on the Vulkan device (D3D-23)
GetResourceAllocationInfo, GetResourceAllocationInfo1 and
GetResourceAllocationInfo2 were generated stubs. Buffers take their width
rounded up to 64 KiB. A texture's size is what its VkImage needs
(vkGetDeviceImageMemoryRequirements, or a throwaway image without it),
rounded up to its D3D12 alignment: 64 KiB, 4 MiB with MSAA, or the small
alignment the description asks for. A 4 KiB request that doesn't qualify
is invalid, as on the PC runtime; the MSAA 64 KiB one has no size limit
there. Texture creation and these queries share one VkImageCreateInfo.

d3d12_vulkan_device_test compares buffer sizes, alignments and invalid
descriptions with the host PC runtime, and checks the per-resource layout
of the Device4/Device8 variants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:55:11 +11:00
dd4c763c11 Docs: the SCC row covers s_min_i32 and s_max_i32 2026-11-21 18:54:42 -04:00
fe8cd6bc72 Tools: reject out-of-range --start/--limit in RPF index tools
Adds the #283 argparse validators to anim_index, rbf0_index, restofworld_index and rpf9_carve: --start >= 0, --limit >= 1 (decimal or 0x hex), and --max-inflate >= 1 in restofworld_index. Bad ranges now exit 2 before any scan or output instead of silently scanning everything, less, or nothing. Synthetic CLI tests in all four test files; docs notes for each tool.

New item claimed in #156. AI-assisted (OpenCode).
2026-11-21 16:53:41 -06:00
75e666e615 Runtime: convert UINT render-target clear values numerically 2026-11-21 18:53:21 -04:00
4d18ef9d62 Merge branch 'main' into fix/rdna2-float-to-int-saturation 2026-11-21 23:51:23 +01:00
307d5e4c1a Docs: a guide to running the GPU tests
Collects what testers in #166 needed to find out themselves: llvm-mc
with the AMDGPU target per OS, building the test programs, the two ways
to run the suite, wave64 emulation on 32-wide GPUs (set
LEONIDA_W64_EMULATE for build.py too), choosing a GPU, and the problems
reported so far with their fixes. Linked from CONTRIBUTING.md and the
docs index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:50:59 +01:00
526e123878 Docs: measure the BCPack block structure and limits
Record the 48-byte lane header, block counts, the exact BC1/BC4 constant-lane check, and the 200-chunk entropy convergence. A public BC1 candidate is mip-consistent on 40/200 chunks but has no byte-exact plaintext check and an unpublished predictor window, so no decoder is added. Also record that no shipped DLL contains a BCPack/BCn/DStorage decoder or dispatcher.
2026-11-21 22:48:49 +00:00
b262056ac7 Tools: measure the common.rpf content-set graph
Add gamedata_graph.py, which rebuilds the XML payloads from a carve and measures document -> content-set -> target edges. Include ids are joined only on exact equality; missing ids stay dangling and common:/ is not normalized to $(common)/.

Add synthetic tests for includes, a cycle, reachability, prefix classification, unparsed payloads and output redaction. Add a measured docs page linked from the index.
2026-11-21 22:47:26 +00:00
8bd0087d2d docs: full-corpus pipeline build: 26,503 of 26,503 shaders compile on NVIDIA, 3.81 GB pipeline cache
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:46:23 -05:00
80fb7f2e41 Textures: add clean-room BCPack decoder (rANS + BC1/BC3/BC4/BC5) 2026-11-21 14:44:27 -08:00
2442ad124a tests/docs: follow this round's both-side merges (shader_profile test uses #263's run_profile, drop duplicated table rows)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:42:27 -05:00
ce1eb6ae85 Merge latest Leonida main into class compare fix 2026-11-21 23:42:07 +01:00
44a94f35ca Runtime: widen enhanced-barrier stages so every access has a stage that can perform it
D3D12 lets an access be named with a sync scope whose Vulkan stages cannot perform it:
SYNC_ALL_SHADING with ACCESS_VERTEX_BUFFER is valid D3D12, but VERTEX_ATTRIBUTE_READ needs
VERTEX_ATTRIBUTE_INPUT. Vulkan rejects such barriers (docs/d3d12_vulkan.md listed it as a known gap).

vulkan_barrier_scope maps each side of a global, buffer or texture barrier and adds the narrowest
stage that supports any access left without one (the synchronization2 "supported access types"
table). The access is never dropped, so the dependency still covers everything the application
named. CLEAR only writes, and ALL_GRAPHICS holds no transfer stage, so transfer reads get ALL_TRANSFER.

vk_command_replay_test part D records all 360 D3D12 sync/access pairs as global, buffer and texture
barriers: 462 validation errors before, 0 after, on Intel(R) Graphics. d3d12_state_map_test checks
that stages only grow, accesses never change, and pairs Vulkan already accepts are left alone.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:42:05 +01:00
4d010bf4bd Merge pull request #176 from Spaghetih 2026-11-21 17:38:46 -05:00
fafcc4197b Merge pull request #284 from S1m0ne1997
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-21 17:38:43 -05:00
30ad4802c4 Merge pull request #298 from AlxcBTW
# Conflicts:
#	docs/design.md
#	tests/test_translate.py
2026-11-21 17:38:35 -05:00
8183bb5610 Merge pull request #272 from LuanFreitas
# Conflicts:
#	docs/design.md
#	tests/test_translate.py
2026-11-21 17:38:33 -05:00
b779cc17e1 Merge pull request #301 from Shuvam Pandey 2026-11-21 17:38:32 -05:00
eaea09434b Merge pull request #274 from SuarezPM 2026-11-21 17:38:31 -05:00
1c62e91b1a Merge pull request #261 from Tim Elery 2026-11-21 17:38:24 -05:00
263fcbdba8 Merge pull request #270 from nicolas 2026-11-21 17:38:23 -05:00
09cee3344b Merge pull request #283 from Diego Casares 2026-11-21 17:38:21 -05:00
6da439da0f Merge pull request #289 from Ayinaki 2026-11-21 17:38:21 -05:00
8cd141e5a3 Merge pull request #305 from Kam471 2026-11-21 17:38:20 -05:00
a15ed8817d Merge pull request #292 from Kam471 2026-11-21 17:38:20 -05:00
5a499f2598 Merge pull request #285 from Kam471 2026-11-21 17:38:20 -05:00
9db1ab28c0 Merge pull request #273 from Kam471 2026-11-21 17:38:20 -05:00
9eac62dce9 Merge pull request #266 from Kam471 2026-11-21 17:38:20 -05:00
83d1ce8a7b Merge pull request #264 from Kam471 2026-11-21 17:38:20 -05:00
1f48889812 d3d12_vulkan.md: the translator's uses_code_base confirms the per-stage code-base counts
AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:38:14 +01:00
e8a07da4ff feature_scan: count s_getpc_b64 kept for code-embedded data per stage; d3d12_vulkan.md: answer §8.2 #10, per-stage counts for #14, tiled resources for #18
AI-assisted (Claude Code).

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