Commit Graph

894 Commits

Author SHA1 Message Date
eb739d2b0d docs: Windows paths in the story000 command, as in the rest of the page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:53:59 +00:00
69111ebe5e docs: anim_clips on story000.rpf (9,190 clip dictionaries, all animations decode)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:53:48 +00:00
590225ad0d anim_clips: join the 36 unresolved dictionaries and resolve .motion children
The 36 roots whose second system page is not the next listed stream have it
right after the first stream: a zlib stream inflating to 16-48 bytes, which
anim_index.py does not list (it keeps streams of 64 bytes or more), or a
16-byte raw page. group() now tries that page and joins it only when the
pages parse as a clip dictionary. All 36 join; 191,042 animations decode.

.motion clips list their children as {u64 0; u32 clip hash; u32 dictionary
hash} at +0x60, and the root's hash-only +0x70 references are dictionary
hashes. scan() joins both across the archive: 111,948 of the 114,925
children whose dictionary is in anim.rpf name a .clip of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:45:31 +00:00
7ec7fbf391 Merge pull request #1074 from 465d6a0eac
# Conflicts:
#	docs/design.md
2026-11-22 01:38:18 -05:00
97cbbcf94a Merge pull request #1072 from Lucy 2026-11-22 01:38:15 -05:00
0e996c35fc Merge pull request #1071 from Lucy 2026-11-22 01:38:15 -05:00
94959628bb Merge pull request #1058 from Lucy 2026-11-22 01:38:09 -05:00
a4cae04e89 Merge pull request #1057 from cxchhh 2026-11-22 01:38:08 -05:00
78f80b74e9 Merge pull request #1054 from nicolas 2026-11-22 01:38:07 -05:00
b91eb99cbe Merge pull request #1051 from 1TrickOmen 2026-11-22 01:38:05 -05:00
956eaa6122 Merge pull request #1033 from undeadhuman37 2026-11-22 01:37:59 -05:00
d494e10ef5 Merge pull request #1015 from Vonsek 2026-11-22 01:37:57 -05:00
2d93239c82 Merge pull request #912 from nicolas 2026-11-22 01:37:55 -05:00
6d25ad0972 Merge pull request #889 from gabrielsteglich 2026-11-22 01:37:54 -05:00
d1d23d842d Merge pull request #804 from Jess-Doit 2026-11-22 01:37:54 -05:00
4fa8336202 Translator: gather LOD ties select the upper mip (SHADER-152)
#973 clamps the explicit-gather LOD to the S# bounds and records that, at exactly 0.5 with bounds [0,1],
native OpImageGather Lod (VK_AMD_texture_gather_bias_lod) selected mip 1 on Radeon Graphics 26.10.1 while
the emulation's RoundEven selected mip 0. image_gather4_l(_o) now picks the mip as Floor(clamp(LOD) + 0.5):
ties go up like the native draw, and every non-tie LOD selects the same mip as before. The [0, levels-1]
clamp is unchanged.

Tests: 232 gather sites in the 16 corpus shaders that use image_gather4_l/_o now emit FAdd+Floor instead of
RoundEven and still assemble and pass spirv-val (16/16 translated, 16/16 valid, 946 fetches unchanged); a
200-shader corpus slice is 200/200 translated and valid before and after; the full suite passes (3498 passed,
61 skipped). The 0.5 rule is the Radeon measurement; the guest's own gfx1013 tie behaviour is still not
hardware-verified.
2026-11-22 03:35:24 -03:00
7e990164a6 Docs: name two more grass-list members (slodID, SLODArchetypeList)
Found by joaat over common engine words; the member table gives offsets 0xB0
and 0x158.

AI-assisted (Claude).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:34:12 +00:00
558fd50776 Docs: OceanSimPresets layout and the Beaufort sea-state variable
gamedata_xml.py lists the OceanSimPresets root without describing it. Adds
its element tree with counts (10 regional presets with Location/Direction and
3 four-point octave curves each, four WavefrontShape curves) and the link to
the timecycle's water_ocean_beaufort_scale (26 documents, 676 values, 0-10).
What is measured and what is a hypothesis are kept apart. Structure and
counts only.

AI-assisted (Claude). Measured on my own copy (1.0.2.1); docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:32:59 +00:00
532f854184 Merge main indirect and ray tracing changes into binary occlusion fix 2026-11-22 03:31:47 -03:00
9a87c348bb Docs: meaning of the shader RenderBucket and RenderBucketMask fields
rpf9dump exports both raw. On a 3,000-model sample (27,435 shaders) the mask
is 0xFF00 | 1 << (bucket & 0x7F) in every shader, bit 7 of the bucket is a
separate flag, and the bucket values 0-6 follow GTA V's drawable bucket list
(opaque, alpha, decal, cutout, no splash, no water, water), checked against
model-name tokens. Counts only.

AI-assisted (Claude). Measured on my own copy (1.0.2.1); docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:31:11 +00:00
f040a941f7 Translator: --bary-fallback takes the lowest free location, not one past the highest
A PS whose only attribute is attr30 put %bary at Location 31, which Khronos
validation rejects on drivers with 128 fragment input components (found by
@Vonsek on #804). The lowest location no attribute uses is always available
and is 0 there. The corpus is unchanged: the 321 fallback shaders keep
locations 1-5, since their attributes are dense. New semantic test for the
sparse case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSJXX67xeoorUsLJ2f9zms
2026-11-21 22:28:26 -08:00
4030a386fb Translator: --bary-fallback for raw barycentrics without VK_KHR_fragment_shader_barycentric (SHADER-98)
The 321 pixel shaders that read the raw barycentric pair are translated to
BuiltIn BaryCoordKHR, so they can't run on a device without the extension
(NVIDIA Pascal, for one). With --bary-fallback the pair comes from an
ordinary vec3 input one location past the shader's attributes; the module
needs neither the capability nor the extension, and the index records the
location as bary_fallback_input. tools/bary_fallback_gs.py writes the
pass-through geometry shader that fills it: Position and the PS's inputs
copied unchanged, plus (1,0,0), (0,1,0), (0,0,1) at the three vertices,
whose perspective interpolation is the BaryCoordKHR value.

- LEONIDA_BARY_FALLBACK=1 for build.py, check.py and run_gpu_tests.py
  (like LEONIDA_W64_EMULATE): translate with the flag, build
  <name>.bary_gs.spv, draw those shaders through it.
- vk_harness: VKH_GS_HELPER=1 keeps VKH_SUBGROUP_SIZE on the fragment
  stage when the GS only feeds the pixel shader under test.
- tests/semantic/test_bary_fallback.py and the ps_bary fixture.
- docs/design.md contract row and index key, docs/testing.md section.

GTX 1060 (Pascal): ps_bary 4096/4096 exact, ps_uniform_branch and
ps_scc_mask32 pass with the fallback (SKIP without it). Pixel-shader corpus:
12,101/12,101 translate and pass spirv-val with and without the flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSJXX67xeoorUsLJ2f9zms
2026-11-21 22:28:25 -08:00
3d62823f63 Docs: instanced props and grass in map resources (full corpus)
Follow-up to #936 (merged as b0f891c): documents the four instance-list
structs with their schema-named members, the InstanceList array format, and
the full run of tools/instance_lists.py over levels.rpf, story000.rpf and
shared_minigame000.rpf (237,318 map resources, 26.5 million prop and 225.5
million grass instances). Counts only.

AI-assisted (Claude). Measured on my own copy (1.0.2.1); docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:22:58 +00:00
d2b9d9da3d Merge main into binary occlusion fix 2026-11-22 03:21:07 -03:00
09d3841df8 anim_clips: decode the clip dictionaries in anim.rpf to keyframes
tools/anim_clips.py groups the stream walk of anim_index.py into RAGE
resources via the page map at the +0x08 pointer, finds the clip
dictionaries (system-only, 1 or 2 pages) and decodes dictionary -> clips
-> packs -> animations -> sequences -> channels. Channel types 0-5, 7, 8
and the GTA VI type 10 (second-order delta coding) are decoded. Output is
counts and per-dictionary rows only; --decode prints one dictionary's
values to stdout for local use.

docs/animation.md gets a "Keyframe decoding" section with the layouts and
the measured full-archive counts, and the statements it makes stale are
updated: 0x98e1750c is joaat32("bonerotation"), the 2/3 packed streams
are second system pages of 0DRP resources, and keyframes are decoded for
the clip dictionaries. tests/test_anim_clips.py builds synthetic
resources, including a type-10 encoder for a round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:17:56 +00:00
9b66ba9c3b Docs + tests: AMD driver quirk losing the f16 keep (valu_fuzz seed 3 programme 38) 2026-11-22 06:16:31 +00:00
326e8490bb test(runtime): distinguish integer and fractional array LOD clamps
An integer image-view minimum is permitted by Vulkan and was observed on Intel. Check an effective integer minimum separately and report both view groups before returning a mismatch.
2026-11-22 07:10:00 +01:00
eaffde2993 Merge pull request #1037 from KanameS 2026-11-22 01:08:30 -05:00
21bbceabed Merge pull request #1033 from undeadhuman37 2026-11-22 01:08:29 -05:00
c171a0fa2f docs: note Resizable BAR state in descriptor_lookup_ada.md
nvidia-smi reports a 16,384 MiB BAR1 aperture, so Resizable BAR was on.
Say so, and that the ReBAR rows are absent where the benchmark skips that
placement (review on #1033).

AI-assisted
2026-11-22 09:08:28 +03:00
bd4a3aeeff Merge pull request #1030 from bobcatchris 2026-11-22 01:08:28 -05:00
bf6a2e0481 Merge pull request #1019 from Kam471 2026-11-22 01:08:24 -05:00
3d15db456b Merge pull request #1017 from Vonsek 2026-11-22 01:08:23 -05:00
075b0a312a Merge pull request #1015 from Vonsek 2026-11-22 01:08:22 -05:00
1a38b7e808 Merge pull request #1014 from whattheflop 2026-11-22 01:08:22 -05:00
a9527fd9b4 Merge pull request #1012 from nicolas 2026-11-22 01:08:21 -05:00
986b74e2dd Merge pull request #1005 from caua-an 2026-11-22 01:08:18 -05:00
f061d2b2bb Merge pull request #995 from whattheflop 2026-11-22 01:08:13 -05:00
c01e64787b Merge pull request #979 from bbareth 2026-11-22 01:08:09 -05:00
54884a5dde Merge pull request #944 from bobcatchris 2026-11-22 01:08:09 -05:00
63bb76f079 Merge pull request #820 from kapitche 2026-11-22 01:08:06 -05:00
126de88e22 Merge pull request #743 from totonii 2026-11-22 01:08:06 -05:00
998924fea8 feat(d3d12): add ExecuteIndirect CountBuffer and optional BLAS/TLAS/RayQueryKHR support 2026-11-22 03:04:35 -03:00
09cfe2e854 rpf9_names: skip Bink 2 videos whole and keep inflation inside the --limit window
scan_archive() stepped three bytes past a KB2 signature and went on looking
for zlib headers inside the video body, so a stream embedded in a video was
reported with its names and the video's bytes were counted as zero padding or
unread. It now applies rpf9_carve.py's header test (length at +4, width and
height at +0x14) and skips a plausible video whole, counted in the new
bink2_files and bink2_bytes summary keys.

The inflate loop was bounded by the file size, not by the scan window, so a
stream crossing the end of a --limit window was still reported with a stored
size larger than the span. It is bounded by the window now, as in
rpf9_carve.py.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 13:04:28 +07:00
6d7bb1755a Tests: shader tools honor LEONIDA_VK_DEVICE
The GPU tools picked a device with the shared ranker but never applied the
name filter the D3D12 tests have used since #861. Filter candidates through
vulkan_device_wanted in vk_device_pick.h, report a filter that matches nothing
instead of dereferencing a null device, and cover the filter cases in the
picker test. docs/testing.md no longer says the tools ignore it.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 00:02:29 -06:00
9eaf37e96f Distinguish identical connected gamepads in device-ID lookup 2026-11-21 22:59:21 -07:00
d0050c98f5 docs: D3D-56 descriptor lookup numbers on RTX 4070 SUPER (Ada)
vk_descriptor_bench at dcd8ecf on Windows 11 (25H2, 26200.9974), NVIDIA
621.01: 1k/10k/100k live entries in device-local, host-visible and ReBAR
memory, median of 12 process medians with the same round order as
descriptor_lookup_apple.md. Adds a row to docs/README.md.

AI-assisted
2026-11-22 08:59:02 +03:00
f53fc3fa48 Merge upstream large-module scheduling with cache feedback 2026-11-21 22:56:39 -07:00
f6e0ffbe6b Merge remote-tracking branch 'origin/main' into feat/image-load-dmask 2026-11-22 02:52:03 -03:00
2fda452e09 Stream joined music records and report their source-file offsets 2026-11-21 22:51:22 -07:00