Commit Graph

5744 Commits

Author SHA1 Message Date
8851927aff bink_index: only an RPF9 header with a +12 that is a multiple of 16 declares a trailer
Review nits on #4035: the '?FPR' check still gives the data start for any RPF header, but +12 is a
measured trailer size only on RPF9, where it is a multiple of 16 in all 22 archives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:24:47 +01:00
8f412bbdef bvh: describe the entry framing of the nested packs in core_bvh4.rpf 2026-11-23 03:22:42 +01:00
d778482db0 docs/bvh.md: say which packs "two of them" means (review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:21:03 +01:00
475ed5660f world_interior_names: cap pool workers, survive unpositioned placements, clean input errors
- The pool goes through pool_workers.process_workers (61 at most on Windows) and the window count
  follows it, so --jobs above the cap no longer fails at pool creation or re-reads extra overlaps.
- A key whose placements carry no position is counted (keys_without_a_placement_position) instead
  of ending the run in min() over nothing; inner-item Pos values that are not three finite numbers
  (empty, false, too short, past float range) are dropped and counted (malformed_positions).
- The interior-box distance uses the same 1e-6 m face tolerance as the room test (EPS), so a point
  on a rotated interior face counts as inside in both measures.
- A names file that is not an InteriorNames table, --start outside the data area (checked before
  any worker starts), a negative --start and --limit below 1 each give one line and exit 2.

Full levels.rpf v1.0.2.1 (--jobs 15): summary identical before and after, both new counters 0,
docs/world.md counts unchanged. tests/test_world_interior_names.py: 27 OK (was 20); the 8 new
tests all fail on d90c1ac.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:07:53 -05:00
0519bc2c81 gameinput: a reading callback's inputKind filter checks what the device supports
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-23 03:05:55 +01:00
ec5773aa2c docs/pipeline_check: disable Mesa's shader cache for measurements 2026-11-23 05:02:50 +03:00
ca6dbf2858 Document compile-only testing on Intel ANV profiles 2026-11-23 02:02:05 +00:00
e0789346de docs/textures.md: textures.rpf's 121 opaque streams are not copies of the TTPF pools
The doc left matching them to the data/ttdb pools as the next check. Against all 1,026,833 chunks of the
57 pools (whole-content SHA-1 as stored and inflated, plus the first 64 bytes): 1 stream (4 KiB) is
identical to a pool chunk, 3 large ones share their first 212-582 KB with a 4 MiB chunk and then diverge,
3 share only a short common leading pattern, and 114 match nothing. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:00:50 +00:00
399b30f69b gameinput: GetRawReport holds hid_mu while it reads the raw reports
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-23 02:59:55 +01:00
dbe5070d18 lds_fuzz: run the hardware oracle on GFX12 (RDNA4); wave64 ds_bpermute reaches all 64 lanes there
On an RX 9070 XT (gfx1201) `lds_fuzz.py --oracle hw` stopped with "the assembler rejected
every program in a chunk: ... s_barrier", and programs with a ds_cmpst were skipped because
ds_cmpstore's operand order was only measured on gfx1150.

- asm.sync_lines: GFX12 has no s_barrier, so a barrier is `s_barrier_signal -1` then
  `s_barrier_wait -1`, and the LDS wait is `s_wait_dscnt 0` instead of the legacy
  `s_waitcnt lgkmcnt(0)` encoding. lds_fuzz's hardware kernels go through it.
- asm.ds_line swaps ds_cmpstore[_rtn]_b32's data operands on GFX12 as on GFX11. Measured on
  gfx1201: with 7 in the dword, data v1 = 9, v2 = 7 stores 9 and v1 = 7, v2 = 9 keeps 7, for
  the rtn and the non-returning form (gfx1036's ds_cmpst does the opposite).
- Measured on the way: a wave64 ds_bpermute_b32 reaches all 64 lanes on GFX12, where RDNA2
  and gfx1150 keep each 32-lane half separate (every lane asking for lane (l + 32) mod 64:
  gfx1201 returns lane l ^ 32, gfx1036 lane l). The model describes RDNA2, so on gfx12xx a
  wave64 program with a ds_bpermute is skipped with that reason; under
  --perturb bpermute_wave64_cross all of them match.

RX 9070 XT, AMD 26.11.2, --programs 1000, seeds 1 and 2: wave32 1000/1000; wave64 537 and 506
match, 0 mismatch, the rest skipped for the bpermute reason. --perturb bpermute_wave64_cross:
wave64 1000/1000. --perturb cmpst_swap: 275 of 1000 wave32 programs mismatch. gfx1036
unchanged: 1000/1000 in both wave sizes and both seeds.

AI-assisted (Claude Code).
2026-11-22 20:58:48 -05:00
ef7ee745eb docs/bvh.md: place the interior's BLAS in the nested packs of core_bvh4.rpf
The first 10 streams are the whole first nested pack (9FPR tag); the other
121 BLAS of the interior lie in 31 other nested packs. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:58:45 +01:00
2988cbba69 docs/bvh.md: what the 0x40 instance key is not (ASSET-350)
Measured over all 269,106 instance descriptors of core_bvh4.rpf: the key is
two uniform populations (below 2^55 and full 64-bit) that follow the BLAS,
is not a hash of any drawable name (name set validated against 228,610 of
228,681 archetype keys), not an entity id or archetype key, and not shared
with the other descriptor streams. What it hashes stays Open.

Counts only; no keys, names or game bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:58:07 +01:00
50b889e3c1 FUZZ-55: Harden binary64 differential probes
AI-assisted (OpenBot team).

Explicitly count FTZ and implementation-defined GPU precision skips, execute known divergence probes, correct compare modeling, and reuse prepared GPU context when shrinking. CPU campaigns and RTX 4070 Vulkan shaderFloat64 campaigns finished with zero unexpected mismatches.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
2026-11-22 22:57:33 -03:00
7b82b01e0b xgameruntime: XNetworking register calls send their initial callback
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-23 02:57:24 +01:00
2d31bd558c docs: gfx1036 measurements for the SMEM cases the row listed as not measured
x16 takes the per-dword bound, NUM_RECORDS >= 2^31 is unsigned, NUM_RECORDS * stride does not wrap at 2^32 and
V# dword1[31:30] changes nothing: 22 cases on native RDNA2 through tools/hw_oracle, wave32 = wave64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:57:17 -05:00
5c72b6f41a fix(tools): report the last observed TLS callback 2026-11-23 01:53:06 +00:00
d264ac9d65 psin_psch: decode PSO-style PMAP/PSCH/PSIG/STNS PSIN containers 2026-11-23 02:53:00 +01:00
8b0c4767d4 docs/bvh.md: where the BLAS of the §4a interior's other entities are (ASSET-351)
The first 10 streams of core_bvh4.rpf cover 10 of the interior's 242 entities.
Matching every BVH stream of core_bvh4.rpf and shared_minigame000_bvh4.rpf
against the interior's drawables, at all four LODs, finds a BLAS for 124 of its
143 archetypes (220 entities), all in core_bvh4.rpf: 23 built from the first
LOD and 101 from the second, which rpf9dump models does not export. One BLAS
per drawable, not per entity; the 115 archetypes past the first 10 streams lie
in a band of streams 231,012 to 261,585. 16 exported archetypes have none, 11
of them as the shader rule predicts, and one shader hash is both kept and left
out. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:52:48 +01:00
59c3a1fc69 fix: bvh_index finds archives with os.walk so an unlistable sub-folder makes the run exit 1 (review) 2026-11-23 02:50:30 +01:00
a0cf874d24 Merge buffer-formats-all-v2 (merged with main 03b09a08) into buffer-stores-rdna2
Conflict in docs/design.md only: v2's rows (main's with the Typed buffer loads sentence) kept, with
this branch's "Others (code 0 and 78 up) give 0".

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 02:48:55 +01:00
405458fb6d docs: drop lines merges left twice, correct two test counts; test_docs_repeated_lines 2026-11-22 20:45:48 -05:00
0f0c85ccbc d3d12: committed resources accept ALLOW_SHADER_ATOMICS with a UAV
CreateCommittedResource refused D3D12_HEAP_FLAG_ALLOW_SHADER_ATOMICS on
every resource. On an RTX 4070 Laptop (621.24) and WARP the host accepts it
on buffers and textures with ALLOW_UNORDERED_ACCESS, refuses it without,
and keeps it in GetHeapProperties. Match that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:45:39 -03:00
3cfc666e7b tools: hello_pixels uses prebuilt vs.spv/ps.spv when spirv-as is absent
The doc already promised the no-SDK path — drop the pair --emit-only
produced on another machine into the work directory — but main() called
assemble() unconditionally, so a machine without spirv-as exited before
the prebuilt files could be used. shaders_into() now reuses an existing
pair only when spirv-as is absent; fresh assembly always wins when it is
on PATH, so a stale pair cannot shadow the sources. shdann's report on

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 18:45:15 -07:00
db73bcfb37 docs/testing: name the vkd3d-proton null-argument crashes 2026-11-23 04:44:54 +03:00
609ebf1400 docs: fold the llvmpipe and RTX 5070 LOD results into the S# paragraph
Hanioe2 asked for one update covering the non-AMD hosts. The paragraph now says
that llvmpipe and the Apple M2 follow the spec's nearest rule and read level 0 at
LOD_BIAS +0.5 (llvmpipe switches to level 1 at 129/256, for LOD_BIAS and MIN_LOD
alike), while the RTX 5070 reads level 1 and switches at exactly 128/256, so the
NVIDIA sentence is no longer "not measured". The AMD text and the row counts are
unchanged.

AI-assisted.
2026-11-22 19:44:42 -06:00
62e7f03404 rdna2spirv: remove dead GFX9 and invalid opcodes
Remove dead and invalid instructions identified in docs/isa_coverage.md:
- s_and_b32_mask, s_or_b32_mask (invalid instructions not in RDNA2)
  along with unused op.endswith('_mask') check.
- v_subrev_u16, v_and_b16, v_or_b16, v_xor_b16 (dead Vega/GFX9 spellings).

Update docs/isa_coverage.md, docs/design.md, tests/test_isa_coverage.py,
and tests/semantic/test_valu_int16.py accordingly.

tools/valu_int_diff.py generated v_subrev_u16 from its OPS table and
modelled it, so with the translator's support gone the fuzzer stopped with
"harness error: v_subrev_u16" (and --self-test with it); the opcode is
dropped from the table and the model there too.
2026-11-23 03:39:40 +02:00
1674b1be52 Merge origin/main into buffer-formats-all-v2
Conflicts: tools/rdna2spirv.py (main's x_round state next to this branch's fmt_enc_fn, and the
function types of both: both kept), docs/design.md (main's rows, our Typed buffer loads sentence
re-applied), tests/test_shader_checks.py (TOTAL: main's 13 plus cs_fmt_all = 14, and both mock
branches kept; 75 tests pass).

Main's typed-buffer work that overlaps (aa2988cc: byte size of the format from one table, SHADER-429:
DST_SEL=1 on out-of-bounds typed loads) merged without conflict and takes this branch's formats from
Gen.FORMATS. Ten tests in test_mutations, test_cmp_class_f64, test_loop_ballot_barrier and
test_vcmp16_opsel fail on origin/main itself, with and without this branch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 02:39:02 +01:00
7de2d4461b rdna2spirv: ignore omod on f16 results with denormals kept, keep clamp (gfx1036) 2026-11-23 04:39:01 +03:00
45cbda2549 script_qtable: decode 0x71717171 object-tree container in script.rpf 2026-11-23 02:35:53 +01:00
fe9ca02ed9 Document headless RADV pipeline compilation checks 2026-11-23 01:34:16 +00:00
4dc3115297 Keep complete native trace lines in the PowerShell runbook 2026-11-23 02:33:32 +01:00
968f6a7f16 docs(testing): run the Windows suite under Proton's wine
Prefix setup, the emulator flag and WINEDLLOVERRIDES in one place, with
the measured result on Proton 11.0: 127 passed, 20 skipped, seven
host-comparison failures against vkd3d-proton (two of them a crash in
d3d12core.dll when the host device is created).
2026-11-23 04:30:39 +03:00
c43942fddf d3d12: 1D render targets and depth buffers
CreateCommittedResource refused every TEXTURE1D with ALLOW_RENDER_TARGET or
ALLOW_DEPTH_STENCIL ("1D texture cannot be an attachment"), although the PC
runtime creates them: on an RX 6750 XT the AMD adapter and WARP both accept
64 color formats as 1D render targets and 20 as 1D depth-stencils. The 1D
RTV/DSV code already on main was unreachable.

Accepting them also needs a valid attachment view: VulkanBackend::view made
every attachment view VK_IMAGE_VIEW_TYPE_2D_ARRAY, which a VK_IMAGE_TYPE_1D
image can't take (VUID-VkImageViewCreateInfo-subResourceRange-01021). That
already hit rectangle clears of 1D UAV textures on main, whose UAV images
get color-attachment usage. ResourceBinding now records a 1D image, and its
attachment views are 1D arrays. A driver without the 1D attachment image
still refuses through check_image_support.

d3d12_texture1d_target_test compares creation with the host adapter and
WARP, and reads back clears through 1D and 1D-array RTVs and DSVs (whole and
rectangles, mips, slice ranges) and a 1D UAV rectangle clear against WARP.
d3d12_typeless_families_test runs its draws on a 1D target too.
d3d12_vulkan_device_test expected the old refusal.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015z45kpgzff6KvVjAnLtc4h
2026-11-22 22:30:25 -03:00
7640c209db docs: americas-recomp now lists 88 files under MIT; the no-copy rule stays until the maintainer decides (PROC-219)
docs/related_projects.md said americas-recomp is GPL-2.0-only and no code may be copied. Its REUSE.toml on
xbox-series (f1c25d72, 2026-11-22) now lists 88 files under MIT, each with every author's agreement
(realdody/americas-recomp#179, still open): 35 at the top of tools/xbox/, 30 in tools/xbox/platform/, one each
under msvc/ and platform/xgr/, the 20 tools/tests/test_xbox_*.py tests and docs/xbox/BVH_CONTAINER.md.
Everything else stays GPL-2.0-only. The section states those facts and keeps the rule explicit: no code is
copied, MIT-listed or not, until the maintainer decides on reuse. Facts read from REUSE.toml, LICENSE, README
and issue #179 on xbox-series, no code.

AI-assisted (Claude Code, Claude Fable 5.1).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GDgoLQVYG7p8mvxkwBroVz
2026-11-23 02:28:31 +01:00
fbed88b157 docs: link the right comment for the 26.11.2 subgroup data
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 18:28:10 -07:00
606e4ef01c docs/testing.md: a known problem, the RTX 5080 616.92 wave64-emulate crosslane mismatch is the driver (SHADER-720)
@Vonsek's cs_xl64_9100373886 mismatch (seed 91001) fails only on an RTX 5080
with Windows 32.0.16.1692 (616.92). The same SPIR-V matches the model on an
RTX 3060 616.64 (mine), RTX 5060 Ti 621.14 (@etcetera-yt), RTX 5070 Ti 621.24
(@Kam471) and an RTX 5080 with Linux 580.65.06 (@tedin7). The row names the
fix (621.14 or newer) and @tedin7's related Linux wave32 permlane cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:27:43 -03:00
bb360f84d9 Add a reproducible cache extractor and decode the meta chunks
tools/psocache_extract.py walks an RPF9 archive's stream table in order,
inflates each stream to learn its extent and stops at the first stream whose
output starts with the cache magic. It joins the following contiguous streams
until the header's declared total is reached, writes the file inside the
temporary directory and validates it with psocache_inspect. A --budget and
--max-streams bound the search; a folder is scanned in sorted order and the
report carries the archive index and the archive-internal stream offset only.

psocache_inspect.py gains --meta (with --entry N and --limit N): it reports
the chunk-record order, the per-kind 0x41 fields, the 0x42 slot bytes and the
0x41-kind to 0x42-middle-byte correlation over the records whose counts match.
The 0x43 value is never printed.

docs/pso_cache.md records the decoded shape with a confidence per claim and
the remaining unknowns; docs/README.md names the new tool.

tests/test_psocache_extract.py builds synthetic RPF9 archives and covers the
contiguous split, folder scan, budget, stream limit, truncated chain and an
output path outside the temporary directory. The inspect test now covers the
meta decode, an entry listing and the CLI flags.
2026-11-23 04:26:54 +03:00
f09a69a080 wave32_pixel_scan: s_addk_i32 and s_cmpk_* replace SCC; newer-driver subgroup data
An SCC reader after s_addk_i32 or s_cmpk_* reads that instruction's flag, not an earlier lane-mask
SOP's, so it is not a subgroup vote (found by @shdann on #3982). The corpus counts are unchanged
(1,127 wave32 PS; vote 1,127 shaders, 84,150 instructions). Adds @AC-Storm-YT's AMD 26.11.2 stage
lists and live fragment widths (gfx1036 64-wide like the RX 6800, RX 9070 XT exact) to the row.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 18:26:33 -07:00
c3d801b456 docs: required subgroup stages per AMD GPU generation; RDNA2 on Windows can't require pixel or mesh sizes
The "Which stages can be required" row in d3d12_vulkan.md said the AMD Windows driver reports
FRAGMENT | COMPUTE | TASK | MESH, from a Radeon 880M (RDNA3.5). On an RX 6800 (RDNA2, gfx1030) with the
same 26.11.2 release (Windows driver 32.0.21045.29003) it reports COMPUTE only, sizes 32..64, default 64,
measured 2026-11-22. The row is now per GPU, with the 880M kept, the RX 6800 measurement, and
@AC-Storm-YT's 9800X3D iGPU (RDNA2: COMPUTE only) and RX 9070 XT (RDNA4: all four) from #313.

Measured on the RX 6800: no size can be requested for pixel or mesh shaders, and at the default a probe
pixel shader counts 64 live invocations per subgroup (SPIR-V 1.5 and 1.6); ms_w64x_ballot passes natively.
In ps_bitmask_perm lanes 32-63 (2,048 of 4,096 pixels) read v_mbcnt_lo = 32; its check judges lanes 0-31
only. d3d12_subgroup_test, testing.md (tier C pixel fixtures skip here too) and the known gaps say the same.

tools/wave32_pixel_scan.py counts the wave32 pixel shaders with lane-crossing or width-dependent
instructions, by family (counts only; test: tests/test_wave32_pixel_scan.py). Control: 12,101 PS, 1,127
wave32, as in design.md. 1,010 have v_readlane/v_writelane/v_readfirstlane, 146 v_mbcnt, 105 s_bcnt1/s_ff1
of a lane mask, and all 1,127 an EXEC/VCC branch or mask SCC vote.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 18:26:33 -07:00
203b207c7a docs/models.md: the u32 after an effect name is a size computed from the record's fields
@jeremygold02's formula, recomputed here on all 932 records (910 + 22);
the value never equals the serialized record length, so the walk still
finds the next record. Runtime use unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:25:39 -03:00
aed7d9f969 docs: measure the 64-bit constant VOPC forms on gfx1100
Row 376 was CPU-checked only: mask writes, the cleared inactive-lane bits,
V_CMPX's AND into EXEC and the constant predicates ignoring their sources are
all now measured natively on a Radeon RX 7900 XTX with EXEC and VCC preset, so
an untouched mask or an uncleared bit is visible. The run also shows that in
wave32 the instruction writes only the low 32-bit mask register, while the
wave64 pair takes both halves.
2026-11-22 19:22:44 -06:00
ed988486b8 Read UTF-16 boot trace logs from Windows PowerShell 2026-11-23 02:22:00 +01:00
3cbf800bc5 gamedata_blobs: decode common.rpf text preload/VFX settings and binary tables 2026-11-23 02:19:36 +01:00
cf0671b488 frame_pacer: a present before the origin event is armed is not a frame in flight
PresentX presents with sync interval 0 until SetFrameIntervalX and
ScheduleFrameEventX are both done, but the pacer queued each of those
presents for its own vblank as soon as the interval was set. Blank
presents of a loading screen made the first WaitFrameEventX wait one
period for each of them (1000 presents: 1000 periods).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 04:19:12 +03:00
003baa94c1 Merge origin/main into queue-wait-before-signal 2026-11-23 02:15:15 +01:00
85a6cf6095 Merge remote-tracking branch 'origin/main' into bindless-per-queue-retire
# Conflicts:
#	runtime/src/vulkan_replay.h
#	runtime/test/d3d12_descriptor_test.cpp
2026-11-23 02:14:56 +01:00
6fbf84757e docs/navmesh: ASSET-332 review: 5 zero/absent documents, quantisation baseline, TOC as a hypothesis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 14:14:02 +13:00
15435e54da third_party/rpf9-explorer: pin ad41e794 (RbPlus 64 KiB 4 BPP tile order, ASSET-125)
breadbbbb/rpf9-explorer#15 merged: Core/TtpfReader.cs Patterns[2] now uses the
RDNA2/RbPlus (3, -3) order at bits 6..7 (GFX10_SW_64K_D_RBPLUS_PATINFO), as
tools/ttpf_mips.py already does. The pin also brings #13, merged just before it
(32 kHz Opus durations in 48 kHz frames). docs/textures.md "Next step" drops the
Patterns[2] item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:13:03 +03:00
6214c46850 wave64: synchronize scalar flbit reads of lane masks
AI-assisted (Codex).
2026-11-23 04:11:25 +03:00
bf9a2633df gamedata_sps1: decode common.rpf SPS1 shader-preset table and join SGD5 effects 2026-11-23 02:05:27 +01:00