Commit Graph

5744 Commits

Author SHA1 Message Date
3823eb1a84 docs(i18n): list @t91a60 as a pl-PL maintainer
Keeps @Dom-in, the author of the original Polish quickstart, and adds the contributor who now keeps its synced commit up to date.
2026-11-22 22:58:34 +01:00
9628bf207e anim_clips: count the +0x20 array of multi-axis motion nodes
From @ismailchaka1's check on #3341: types 4-8 have a {ptr, count} array at
+0x20 (null on type 4 and on 431 of 482 type-5 nodes; on every type-6/8 node,
items {u32, 0, u32, 0}). Counted as motion_node_pairs:<type>:<count|null> and
documented; the values are not decoded. Rechecked on anim.rpf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:58:31 +01:00
63cb07c069 Merge upstream main and preserve Vulkan runtime behavior 2026-11-22 18:58:22 -03:00
411b761e99 Document the standalone FSSM float-mode candidate (SHADER-190) 2026-11-22 22:58:19 +01:00
08d6d755c5 docs: shore waves' lateralCoord runs along the line; what waveType changes (ASSET-307)
Measured over the 434 ShoreWavePlacementData patches and 7,839 control
points of my own 1.0.2.1 package (aggregate numbers only):

- lateralCoord is linear in arc length along the polyline, at one rate
  everywhere: |b| median 0.00200 per world unit, 1.0 every ~500 units,
  the same for every waveType. It decreases strictly along 416 of the
  434 patches (b < 0 on 426); only 197 of 7,405 steps reverse, by a
  median 0.018. The earlier "not monotonic along 433 of 434" counted
  increasing values only.
- waveType doesn't change amplitude (1.0 everywhere) or that rate. Type 3
  has the shortest reach (maxDistance median 64.6, the only values below
  17), and the six type 2 patches lie in one area. What the types select
  stays open.
2026-11-22 21:58:11 +00:00
b27f24045e build: stop on inconclusive pipeline crash probes (BUILD-1030) 2026-11-22 18:57:37 -03:00
42e20d695a Merge pull request #367 from mrb-eel 2026-11-22 16:56:52 -05:00
53658edd6e Document same-row carriage model-set matches (ASSET-297) 2026-11-22 22:56:15 +01:00
5c1e3f7dbd navmesh_nodes: count bits 8 and 13 in combination; name only what was measured
The first version called +0x18 bit 13 road surface. The count cannot
tell it from bit 8: both lie under about nine in ten lane nodes. The
tool now also counts the four combinations of the two bits (both, only
one, neither) for nodes and area: 89.6% of the nodes stand on polygons
with both bits, which cover 2.5% of the area, and bit 13 alone covers
9.5% with 0.6% of the nodes. The doc reports that, keeps SixNG's label
as its visual reading, and leaves which bit means road surface open.
docs/related_projects.md gets a SixNG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:56:12 +00:00
4c52ce27a6 Seven fixes from an outside contributor (sent as patches, applied without the author's name)
- rdna2spirv: declare each packed vertex input register once; a register whose elements disagree on the component
  type is refused (SHADER-644).
- runtime: a title's VirtualAlloc drops the console's MEM_GRAPHICS / MEM_TITLE type bits the host rejects (RT-217).
- runtime: XPersistentLocalStorageImpl is served from <overlay>\persistent with the package's 2048 MB quota
  (RT-219; layout from the public docs, not measured in a caller).
- runtime: G:\ names the package and T:\ a scratch folder in the overlay; paths under the configured folders and
  every path with no folders configured stay host paths (RT-218).
- winhttp_offline: header blocks and timeouts the host WinHTTP rejects are rejected the same way.
- cfg_structure.run: a limit of zero or less runs no blocks.
- shader_meta: an s_movk_i32 with a register operand and a float immediate beyond float32 are left unknown instead
  of raising.

Each comes with a test that fails on the old code. Conflicts with main resolved here (internal_dir() hides T:'s
folder; both file_system_test blocks kept).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:55:46 -05:00
c394c8b224 docs(i18n): sync the Polish quickstart with README at f847748c
Adds --pick and --check --full-check, the updated game-folder search, the low-disk run-only build, the current --wave64-emulate behaviour, the fallback flags, --wav and the Linux/Wine notes, and the claim-before-PR rule. Moves the Polish row's synced commit in docs/i18n/README.md.
2026-11-22 22:54:39 +01:00
c0b821cda7 file_system: CopyFile2 checks its parameter block before the destination
Review on #3655 (kacper-serewis, daemosofchaos, on Windows 11):

- A parameter block shorter than COPYFILE2_EXTENDED_PARAMETERS (dwSize
  0, 4, 31) made the fallback copy and return S_OK, where the host's
  CopyFile2 returns E_INVALIDARG and writes nothing. Both paths now
  check it first, before copy_paths prepares the destination.
- The fallback silently dropped COPY_FILE_SKIP_ALTERNATE_STREAMS and
  copied the stream. Its flags are now sorted: passed on (the ones both
  calls define), dropped (requests that leave the contents as
  CopyFileExW writes them: no offload, compressed traffic, sparse copy,
  ...), or refused with ERROR_NOT_SUPPORTED before anything is written
  (SKIP_ALTERNATE_STREAMS, DIRECTORY, OPEN_AND_COPY_REPARSE_POINT,
  IGNORE_SOURCE_ENCRYPTION, unknown bits, a longer V2 block).
- A cancel flag already set is answered by the fallback itself, since
  Wine 9's CopyFileExW doesn't read it.

rt::fs::force_copy_file2_fallback lets the test run the fallback on
Windows, where the host has CopyFile2 (Maraco91 noted it couldn't be
reached there). file_system_test runs its CopyFile2 checks both ways:
no block, short blocks, fail-if-exists with a hint flag, a set cancel
flag, and in the fallback the refused flags and block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6
2026-11-22 21:54:00 +00:00
19fe19344e navmesh_links: use same_report_path and verify local-tile link endpoints 2026-11-23 00:53:05 +03:00
cb824244cf docs(rendering): record color-pass interface checks
Refs: #3808
2026-11-22 16:52:46 -05:00
e1630bd960 Document the limits of the material slot evidence (ASSET-296) 2026-11-22 22:52:15 +01:00
2d00ce22bb Document grid atlas registrations and tile-name search (ASSET-295) 2026-11-22 22:51:32 +01:00
b8273c0e39 runtime: buffer_at prefers an aliasing buffer that holds the whole view
With placed buffers aliasing in one heap, a large buffer B and a small S
inside it, a vertex or index view that starts in S and runs past its end
resolved to S, the closest start below the VA, and buffer_at cut it at
S's end: the rest read as out of bounds, though B holds all of it. Found
by traeb0n in the review of #2823.

BufferVaIndex::find takes the bytes the lookup needs and returns, among
the ranges that hold the VA, the closest start (larger ID on a tie) that
also holds all of them; when none does, the closest that holds the VA,
as before. Without overlaps the first range it looks at is still the
answer. With a fallback found, the walk stops once no range can hold all
the bytes, bounded by the longest live range. buffer_at passes the
requested size.

buffer_va_index_test checks views that fit in the small buffer, run past
it into the large one, run past every range and have size 0, and three
quarters of the random-table lookups now name a view of up to 32 KiB,
checked against a scan with the same rule.
2026-11-22 22:50:57 +01:00
259360fa28 docs(rendering): specify the replay selection checks
Refs: #3808
2026-11-22 16:49:45 -05:00
9b80fec165 Document vehicle-light recipe reuse in palette tints (ASSET-297) 2026-11-22 22:49:42 +01:00
8fe4242a83 docs/design: merge the duplicated No-op and Scalar select rows 2026-11-23 00:49:17 +03:00
b728d96954 rdna2spirv: LDS 16-bit reads and writes at byte 3 cross into the next dword
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 21:49:12 +00:00
8327ebcc3a docs/models: the fOverallRating weights and the 10 floor, measured (ASSET-299)
Measured over the 504 ratingsRoad/ratingsOffroad blocks of common.rpf's CVehicleBaseRatingsAndEstimatesMap
(252 keys x 2 surfaces) from one retail 1.0.2.1 package: fOverallRating = 0.21 fSpeedRating + 0.38
fHandlingRating + 0.40 fAccelerationRating + 0.01 fBrakesRating, weights summing to 1. The residual is at most
7e-5 on the 345 blocks whose four parts are all above 10, and differencing the road and offroad blocks of the
139 keys that are above 10 on both surfaces recovers 0.2100 / 0.3800 / 0.4000 / 0.0100, so the weights do not
depend on the surface.

The 10 floor is on the overall too: 24 blocks whose parts run 10.0 to 11.97 carry an fOverallRating of exactly
10. The other 159 blocks, which have at least one part at exactly 10, sit up to 4.1 below the weighted mean,
which parts raised to 10 from a lower value would explain; no block without a part at 10 deviates.

Counts, ranges and coefficients only: no model names and no per-vehicle values, and no game file is committed.
2026-11-22 22:47:05 +01:00
a2f8aae55c rbf0_encode: --check fails on a refused resource; refuse attribute records the count does not cover (BUILD-1084)
Four findings by @HQasper on tools/rbf0_encode.py:

- `--check` exited 0 when resources were refused, so a round trip that verified nothing read as success.
  It now exits 0 only when every resource is byte-identical, as rbf0_tree.py does for a resource that is
  not ok.
- The element header count came from `attrs_declared` while every node of `attributes` was written, so an
  attribute appended by hand encoded as the element's first content value: a different tree with status
  ok. encode() now refuses more attribute records than the count (value), and an element short of its
  count that has a value in its content, which would decode as an attribute (order). A parsed element
  short of its count with no such value still round-trips exactly.
- `blob[:doc["size"]]` in resources() could not trim anything. The slice is gone and check() compares
  the joined length with the recorded size; two carved streams of one name are refused instead of the
  last one silently winning.
- docs/rbf0.md 9.6 lists the `value` refusals and says what `--check` exits with.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 18:46:57 -03:00
468edabf79 docs/story.md: story000 normals 94.5% (rounding, review); say the centre counts predate the step exponent 2026-11-22 22:46:02 +01:00
663771c7d6 docs: say what accepting texel-aligned footprints takes, not how big it is
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 21:45:55 +00:00
210f16943b docs(rendering): trace an authored material through its draw passes
Refs: #3574, #2519, #3544
2026-11-22 16:45:48 -05:00
002cd455a3 navmesh_decode: keys_octree also requires one slot per key
Two occupied slots with the same key and distinct payload indices passed
values_bijective, then folded into one dict entry in _grid_slots, so the
octree check passed and the depth and leaf counts lost an entry
(reported by Oblyterium on #3622). Require len(keys) == entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:45:35 +01:00
a8e8b154b0 world: resolve InteriorNames keys to interior archetypes and placements (ASSET-275)
Add tools/world_interior_names.py: reads CMloArchetypeDef, CMloRoomDef and
CMloInstanceDef from levels.rpf and joins them with the InteriorNames section
of GameShape__Data__LocationNameLoopkup. 1,357 of 1,358 keys are interior
archetype names, all confirmed by the 64-bit key; docs/world.md records the
placement and position measurements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:45:17 -05:00
53bc2c4943 GPU tests: wire cs_fma_fused in run_gpu_tests and accept GLSL Fma split on RADV 2026-11-22 21:43:14 +00:00
8e91c39545 docs/story.md: say which groups the 15,997 are; point the centre exponent at #3069 (ASSET-294)
Review fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:43:08 +01:00
eec311d994 docs: why an unaligned placed footprint is refused, and what the PC runtime does
The layer reports UnrestrictedBufferTextureCopyPitchSupported as FALSE and
refuses a footprint whose Offset or RowPitch is not 512/256-aligned, the
pair D3D12 specifies. The PC runtime (RTX 4090, WARP) reports the capability
and accepts such a list. Say that the difference is deliberate, why (Vulkan
takes offsets and row lengths in texels), and what lifting it would take.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 21:42:49 +00:00
b28832bab4 Tests: give each process its own temp folder for its shader library
d3d12_compute and the other tests that write a translator-style shader library under
the temp directory (d3d12_draw, d3d12_set0_compute, d3d12_msaa_draw, d3d12_fspx_compute,
d3d12_pipeline_library, d3d12_subgroup, d3d12_bundle, d3d12_typeless_families,
shader_library) used one fixed folder name. Two copies running at once (ctest -j, or two
suites in one Wine prefix or TMPDIR) shared it, and one copy's remove_all deleted the
modules the other was loading: on an Apple M3 Max under Wine with MoltenVK 1.4.3, four
copies of d3d12_compute at once failed 6 of 40 runs (PSO creation at lines 245/357, or
exit 3 from an uncaught filesystem_error in copy_file), while 125 runs one at a time all
passed.

test_temp_dir.h names the folder <temp>/<name>_<pid>, removes it on scope exit (early
returns included), and copies the compiled-in LEONIDA_TEST_*_SPV files with an error
code, so a missing file is reported by name instead of ending the test with abort().
docs/testing.md lists both symptoms.
2026-11-23 01:41:31 +04:00
4836eb7148 docs/story.md: the 42 40 rules over story000.rpf
All 7,577 mesh streams parse (6 stop at non-mesh data after the chunks);
positions, faces, normals, tangents, radius and cones hold as in the minigame
archive (counts only); the stored centres match the box centre less often.
2026-11-22 22:41:23 +01:00
4a1b7b61be meshlet_page: w2 bits 28-31 are an exponent, step 2^e/16 m (review by zzEmmazz)
e = 0..4 occur; the bit-28-only rule read the 157 minigame meshlets with e = 2
at 1/8 m, where their radius covers none of them (157 of 157 at 1/4 m).
centre_step takes the exponent, coarse_steps counts e > 0, tests cover e = 1..3,
and the docs/story.md tables are recounted.
2026-11-22 22:41:10 +01:00
f6fa3e36d1 meshlet_page: check a group against the 42 40 block its centres fit (ASSET-294)
When several 42 40 blocks in a page have a group's vertex count, summarise_page took the nearest one before the
group. Nothing in the page orders them (in Q0 Q1 G0 G1 pages G0 is built on either block), so it now takes the
block whose vertex boxes are closest to the group's stored centres (centre_distance), keeping the old choice on
a tie. New counters groups_4240_several_blocks and groups_4240_block_by_centres.

Over all of story000.rpf: 16,059 groups have several blocks and 8,668 change block; opposed neighbouring faces
fall from 518,113 to 16,408 of about 36.7 M shared edges, and faces within ~25 degrees rise from 90.8% to 92.7%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:40:40 +01:00
2c51fb2d5c rdna2spirv: the game's BVH descriptor base is a byte address with flags
The game's RT shaders build the BVH descriptor base as (ptr & ~0xFF) | 0x30: a
byte address with flags in the low bits, not the 256-byte-unit field the
emulation assumed (base40 << 8). Masking the low byte fixes the address; a
non-zero base moved every node by 256x the flags.

The semantic test now runs the masked-base case (dword0 0x1030 -> base 0x1000,
node at 0x1040) and fails under the old shift. Measured with the first real
core_bvh4 BLAS (docs/bvh.md 7b): header at VA 0, root 0x4CABC; the game RT
shadow CS returns the CPU walker's children in the same order on the RTX 2060.
2026-11-22 18:40:19 -03:00
654e666416 d3d12: D24 depth stored as D32 gets D24 depth bias and 24-bit depth in draws (D3D-309)
On a GPU without a D24 attachment (AMD) the layer stores D24_UNORM_S8_UINT as
D32_SFLOAT_S8_UINT. Draws then broke two D3D rules: the integer DepthBias was
scaled by the primitive's exponent instead of D24 units, and fragment depth was
not quantised like the clears, so an EQUAL test at a cleared value failed.

Single-sampled graphics pipelines with depth enabled on such a target now have
their pixel stage write FragDepth = quantise(z + D3D bias), with the bias in D24
units and the quantisation of depth24_convert.comp; the rasterizer's own bias is
off for them. A pipeline without a pixel shader, with or without a geometry
shader, gets a built-in one. d3d12_depth24_draw_test covers the finding's cases,
stored depth with constant and slope-scaled bias, a shader that writes depth, and
a VS + GS pipeline without a pixel shader.

Co-authored-by: UlteriorMotive00 <132296248+UlteriorMotive00@users.noreply.github.com>
2026-11-22 22:39:37 +01:00
35909176a1 Document FSSM initial float-mode search (SHADER-190) 2026-11-22 22:36:14 +01:00
a8773a46b1 Runtime: the single-list replay() gives overlapping queries segment pools (D3D-399)
With a `keep` vector and ReplayFunctions::create_segment_pool (plus the sum
helpers), replay() makes one occlusion and one pipeline-statistics segment pool
sized to the list, plans them as the batched path does and hands them to the
caller, instead of refusing a list whose queries overlap. Without them the list
is still refused. replay_query_predication_test case 14 checks both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:34:08 +03:00
8178b9f4a3 tools: decode and verify navmesh +0x88 adjacent edges and +0xA8/+0xB0 special links 2026-11-23 00:32:51 +03:00
9b7edc5add tools: isolate image fuzzer work output 2026-11-22 23:31:20 +02:00
b8fb76cbcb Docs: give the 6a6704df marker counts per stage; date the first scan's breakdown
The breakdown kept from the first marker scan (9,930 PS, 8,666 mesh,
1,115 VS, 923 CS) adds up to 20,634, not to the 21,545 or 21,538 the
row attributes to the markers (review by @kapitche). The row now gives
the per-stage split of the 21,538 measured at 6a6704df (10,031 PS,
9,282 mesh, 1,179 VS, 851 CS, 195 GS; the 16 refused then are wave64
CS by the flag) and says where the older figures came from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:31:17 -03:00
9c86acff63 docs/rpf.md: whole-package name coverage as reported in #1790 (PROC-186)
Folds #1790's 22-archive run into rpf.md: 177,087 of 1,489,677 streams named (11.89%), coverage by stream
type, and its three findings (paths come from the payload, stream alignment differs per archive, anim.rpf
is the richest). Marked as reported there, not re-run; no paths or names copied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:30:46 +00:00
298240a589 navmesh_nodes: count the polygon flag bits under the lane-graph nodes
docs/navmesh.md left the polygon flag bits open and two road/pavement
labels from another project unconfirmed. tools/navmesh_nodes.py puts
every lane-graph node of levels.rpf on the navmesh polygon under it and
counts that polygon's +0x18 and +0x28 bits next to the plan area each
bit covers.

On one 1.0.2.1 package 63,793 of 63,806 nodes have a polygon within 3 m
(median 0.03 m), which confirms vertex = tile minimum + u16 / 65535 *
extent; 90.2% of them stand on a polygon with +0x18 bit 13, which covers
12.0% of the area: road surface, as SixNG labels it from a visual check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 21:28:51 +00:00
f3072c31ee fragment_children: raw child-drawable census of fragments; record the levels.rpf result (ASSET-261)
Walks the fragment drawable array (u16 at +0x30 records, 0x110-byte stride) and scans the system pages for
other drawable bodies, over any plain RPF9 archive, with --jobs/--start/--end. Synthetic tests only.
docs/character_models.md: levels.rpf and data.rpf counts next to the packs.rpf ones.
2026-11-22 16:28:16 -05:00
2f186bb8f3 PROC-183: merge the duplicate no-op and scalar select contract rows
docs/design.md had two rows for the same no-op SOPP/SMEM rule (the shorter one lacked s_atc_probe/s_atc_probe_buffer) and two Scalar select and pack rows, the stale one still saying s_cmov_b64 is Unsupported. Keep the complete rows, merge the s_cmov_b64 support text with the gfx1035/gfx1036 evidence, and drop the duplicates.
2026-11-23 02:28:13 +05:00
0035b2a9c4 docs: which source the core rest-of-world drawables' texture references reach (ASSET-148 follow-up)
Follow-up to #2309, which found the two texture sources (embedded 0x980 textures and the companion ttdb
pools). Over the 1,732 drawables of the two core archives (17,208 references, 675 distinct 64-bit IDs):
543 IDs are in a pool (285 core, 258 shared data/ttdb; 6,403 references), none is a key of the 144
embedded dictionaries or appears in the 145 embedded-texture streams, and 132 (10,805 references) are in
no source. By slot, colour/normal/specular resolve for 93/89/85% of references; most unresolved references
come from six slots with one fixed ID each. Counts only; no IDs, names or slot hashes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:26:49 +00:00
bf73f8ea27 crosslane_fuzz: --ext adds wave64 carries, DS permutes, mask SALU with SCC and loops
Wave64 programs get v_*_co(_ci)_u32 through SGPR pairs and VCC, ds_bpermute_b32,
ds_permute_b32, ds_swizzle_b32, lane selects of 64 and up, the b64 mask ops with
an SCC probe, the saveexec/wrexec family, s_bfm_b64, s_wqm_b64 and SI_LOOP-shaped
loops. Seeds without the flag, and wave32 programs, are unchanged. The model was
checked on RDNA2 (gfx1036): 100/100 programs.

AI-assisted.
2026-11-22 22:26:44 +01:00
5da7fd96f5 docs/i18n: advance pt-BR quickstart sync to f847748c (RDNA1/RDNA2 wave64 and gta6rt --overlay) 2026-11-22 18:26:01 -03:00
c1e47913f0 docs/i18n: sync pt-BR quickstart with README at 16282101 2026-11-22 18:26:01 -03:00