Commit Graph

5744 Commits

Author SHA1 Message Date
56cd4d6e3b docs/tools: measure timecycle plain-modifier number pairs (ASSET-310) 2026-11-22 23:22:04 +01:00
f02e952272 CI: a macOS (Apple Silicon) job for the runtime on MoltenVK and the Python suites
runtime.yml gets a macos job on macos-26: Homebrew's MoltenVK, Vulkan headers and
loader, llvm-mc, SPIRV-Tools and glslang; the runtime built through sccache; ctest
and run_gpu_tests.py on MoltenVK. ci.yml gets macos-python: the standard-library
loop, the semantic suite alongside it, and the pytest files with Homebrew's llvm-mc.

The hosted runner's Metal device is Apple Paravirtual device (family Mac2), which
MoltenVK runs on; KosmicKrisp finds no device there. macos-15 can't build the
runtime (Xcode 16's libc++ has no floating-point std::from_chars).

The two tests that fail on MoltenVK today, also on an M3 Max, are listed with the
pull requests that fix them (xdxr_build_check: #2423, ps_ssharp: #1845);
scripts/ci_expected_failures.py fails the step on any other failure and notes an
expected one that passes.
2026-11-23 02:21:52 +04:00
0f0611ccc2 docs: depth, stencil and 96-bit footprint copies need a 4-byte offset
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:21:46 +00:00
3986b50821 Merge main into hw4-ps-oracle (#3061)
docs/shader_validation.md

AI-assisted.
2026-11-22 23:21:41 +01:00
2b71db44d6 navmesh_nodes: refuse a data start outside the archive; name the approximations
Review on #3834: an archive whose data offset pointed past its end was
scanned as an empty archive (exit 0). The tool now refuses a data start
outside 8..file size with exit 2. --out is compared with the inputs
through report_paths.same_report_path, as the other tools do. The
docstring and docs/navmesh.md now say that a polygon's height is the
mean of its vertex heights, and that surfaces above one another (a
bridge, stacked tiles of one sector) each add their plan area.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:20:14 +00:00
ce7242107b rdna2spirv: read v_cmp(x)_class_f16 mask as f16 constant via src_h 2026-11-23 00:20:04 +02:00
4de3ef8587 docs, tools: document AWC tag 0xBD marker events, add awc_markers.py (ASSET-303)
docs/audio_config.md gains the measured 16-byte event layout of AWC tag 0xBD,
whole-corpus counts and the event-type table (hashes and counts only).
tools/awc_markers.py reports those counts from an archive, a bank or a folder
of banks; tests/test_awc_markers.py covers it with hand-built banks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 00:19:16 +02:00
c680d44b28 rdna2spirv: read a v_fma_mix* literal's high half from the code blob 2026-11-22 17:19:07 -05:00
42ea43f97e rdna2spirv: v_rcp/rsq/sqrt_f16 select the hardware result at 0 and below 0; run v_fract/rcp/rsq/sqrt_f16 and v_pack_b32_f16 tests through the translator
SPIR-V leaves 1/0, InverseSqrt(x<=0) and Sqrt(x<0) undefined; the interpreter refuses them and a driver may return anything. The ISA results (rcp(+-0)=+-inf, rsq(+-0)=+-inf, rsq/sqrt of a negative=0xfe00) are now selected explicitly. The five test files no longer test a self-built model.
2026-11-22 17:19:06 -05:00
1507ac5d26 boot: retain available diagnostics when a trace cannot be summarized
AI-assisted-by: Codex Astra 6.2 High
2026-11-23 01:18:44 +03:00
3373cec492 ASSET-312: fog volumes, IntExtMode and BlendMode against placement and interiors
BlendMode splits the 14 common.rpf volumes exactly by placement (0 on the
7 world-placed, 1 on the 7 at the origin); IntExtMode is 0 in all 14 and
no volume lies within 100 m of any of the 2,280 InteriorNames points, so
its meaning stays a hypothesis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:17:56 +01:00
c4806f5955 xcl_compare: stream title output to a transcript file instead of memory
Run.log collected every line a title printed and nothing read it. The lines
now go to xcl_output.txt and leonida_output.txt in the work folder (named in
report.json), and Run keeps none of them. A test checks the transcript and
that Run has no log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:17:34 +01:00
04d89e491b docs: full levels.rpf page-directory counts (ASSET-292)
Adds the full levels.rpf pass (1,116,073 streams / 188,449 pages / 465,611 q38 / 3,281 continuations, 17.7 min) and the finding that only 52,776 of its pages start the first q38 payload at +0x60. Restacked on #3388, which already carries the full data/nav/anim pass and the q28 parser fix.
2026-11-22 22:17:31 +00:00
6e85f99ca7 docs: sync Spanish quickstart with current build guidance 2026-11-22 22:17:29 +00:00
be01957793 docs/design.md: the v_fma_mix literal repair's byte check and its controls
Say that the repair's same_encoding counts all three sources as used, so a live s0
can't pass as an inline 0, and list the two new controls.
2026-11-22 23:17:00 +01:00
f4ba8d81f3 tools: fma_mix_literal_probe.py, measure the split v_fma_mix literal on an AMD GPU
Whether a v_fma_mix source with op_sel_hi and op_sel set reads the high
half of a 32-bit literal is what the previous commits rely on and no one
has measured. The probe tells the two readings apart (op_sel picks the
literal's half, or the literal is 16 bits with a zero high half) with
three cases where they differ and two controls, values made up and exact
in f32. The translator side runs the listing as llvm-mc prints it with the
real bytes next to it; the hw side puts the instruction's exact bytes
(.long, since LLVM's assembler can't encode the literal either) through
tools/hw_oracle on an AMD GPU. Exit codes as fma_mix_probe.py's. The hw
side has not run on any GPU yet: this machine has none.

tests/test_fma_mix_literal_probe.py: the hand-derived values, the
encodings, the translator side's reading, and exit 77 without hardware.
2026-11-22 23:17:00 +01:00
b7b4ec7cbc docs: fspx.md translation status on current main, 27 of 29
Measured on main aa2988cc with the v_fma_mix literal repair: 27 of the 29 programs
translate and pass spirv-val (26 without it), and the other 2 stop at the
v_dot4_i32_i8 word llvm-mc does not decode.
2026-11-22 23:16:52 +01:00
0d10f72eeb Merge origin/main into fix/shader-427-structured-depth
Conflict in tools/rdna2spirv.py assemble(): main added the x_round_fns
helper loop next to the old inline depth check. Kept main's helper loop
and this branch's capped_tree() call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:16:03 -05:00
6da1c717fc Merge main into hw-mad-u32-u16 (#2494)
docs/design.md
tests/semantic/regen_fixtures.py

AI-assisted.
2026-11-22 23:15:36 +01:00
63547ca565 Use plain ASCII in the census method 2026-11-22 23:15:35 +01:00
afd5304c61 Tests: depth resolves of D32S8, and of samples that differ (TEST-847, TEST-848)
d3d12_depth_resolve_test now takes D32_FLOAT_S8X24_UINT through the same cases
as D24S8: either plane by the depth-stencil format, the depth plane by
R32_FLOAT_X8X24_TYPELESS (MIN, MAX, AVERAGE) and the stencil plane by
X32_TYPELESS_G8X24_UINT, an R32G8X24_TYPELESS resource, and the refusals
(AVERAGE by the D32S8 format or of stencil). The readback tells a 24-bit UNORM
depth plane from a float one by format, not by "has stencil".

Every case also runs as an edge case: a triangle drawn over the cleared 4x
source with a depth-only PSO (depth 0.5, stencil 0x44 REPLACE, test ALWAYS)
leaves the pixels its diagonal edge crosses with samples that differ, so
MIN, MAX and AVERAGE reduce over different values. There is no CPU model of
the coverage: the layer must match the PC runtime byte for byte, and MIN and
MAX of each edge case must differ somewhere. The layer's VS is a GLSL stand-in
(test/glsl/vs_depth_edge.vert) behind a synthetic FSSM container; the host's
is HLSL compiled by d3dcompiler_47. Without glslangValidator the edge cases are
skipped and the summary says so.

RTX 5070 (621.01), Windows 11, validation on: 97 of 97 cases match the PC
runtime on the default adapter, 71 of 71 on WARP, 20 edge MIN/MAX pairs differ.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:15:34 -06:00
bf166316ab fspx: verify 36-byte prologue is a hardware no-op on RDNA2 (TEST-849) 2026-11-22 23:15:24 +01:00
d5ef9a4c20 ttpf_mips: read the asset key across the records/ids boundary, as TtpfReader does
Pool.descriptor() gave asset_key_at None whenever the key sat past the record
area, which is where most of the array lives in retail pools: 28,666 of 357,115
entries over the 57 pools of a 1.0.2.1 install. TtpfReader.cs at the e293917
pin reads the key from the ID region in that case and refuses only a key split
by the boundary itself; mirror both. write_rds5_pool grows an optional area so
tests can build a straddling pool.
2026-11-22 19:15:16 -03:00
3e82e38e16 Clarify the FSSM stage words and float-mode census method 2026-11-22 23:15:11 +01:00
dc01a17397 gameinput: report SDL's effect result from gameinput_probe (RT-160)
`--force-feedback` now reads the shim's output state once the poll thread has
picked the effect up, and says whether SDL created it and is running it, or why
it did not, so a wheel owner can tell a silent drop from a real run. The shim
records SDL_CreateHapticEffect's id, SDL_RunHapticEffect's result and SDL's
error text per device; gameinput_test asserts the success and the refusal.

AI-assisted
2026-11-22 23:15:09 +01:00
d1dea0ad08 rdna2spirv: texel offset fallback picks the level by the S# mip filter (SHADER-699)
--texel-offset-fallback floored the LOD to choose the level whose size scales
the folded offset. A nearest-mip sampler reads ceil(lod + 0.5) - 1, so at
LOD 0.75 it sampled mip 1 with the offset in mip-0 texels. Read MIP_FILTER
(S# word 2 [27:26], literal or at run time): nearest rounding for point and 3,
level 0 for none, floor kept for linear, as the runtime's vulkan_sampler maps
them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:29 -06:00
9c92137a4c docs/gamedata: what the two plain timecycle-modifier numbers show (ASSET-310)
Measured over the 29,727 two-number variables of the plain modifiers: the
second number is 0 in 88 % of pairs, the pair is not an ordered range, the
non-zero second numbers do not follow the first, and a 0 second number sits
outside the keyframe range of its variable in 17,041 pairs. The
endpoint-blend reading is therefore replaced by the measurement; what the
second field does when set stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:13:19 +01:00
87d608fef2 tools: compare XCL's synthetic test title under gta6rt and under XCL
tools/xcl_compare.py starts XCL's fake console executable under gta6rt --run
and under XCL, records each check's result, the unimplemented imports it hit,
and the thread stacks of a hung check (cdb), restarts after a hang with that
check skipped, and writes report.json; --gui shows the checks live. It holds
no XCL code: it only runs binaries from a separate XCL checkout.

docs/xcl_compare.md has the licence boundary, how to run it, and the first
result (XCL 50/50, gta6rt 5 pass, 43 fail, 2 hang), with each difference
mapped to an open item or recorded as a lead. Both hangs are the documented
deadlock of XTaskQueueTerminate(wait = true) from a manual queue's
dispatching thread, not a runtime bug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:12:53 +01:00
aeca1cb475 Merge upstream main into SHADER-537 2026-11-23 01:12:30 +03:00
daed40cd71 Fix the docs the round-43 merges broke
- design.md: escape the literal pipes that split contract-table rows again, and merge the 76 repeated topics into
  one row each (sentence by sentence; no number dropped).
- d3d12_vulkan.md: one milestone row per ID (the most complete of each), and LEONIDA_ARENA_LOG documented with the
  arena high-water report (D3D-55).
- navmesh.md: one item 4 and 5 under Remaining unknowns (the +0xB8 footprint and octree-key wording).
- sandbox.md: name vk_sandbox's source file; i18n index: one pt-BR row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:12:19 -05:00
7544b63c5a Merge main and reconcile the SHADER-181 interpolation census 2026-11-22 23:12:05 +01:00
f413a3ba3a docs: what d3d12_close_parity_test measures and the 38 differences it lists
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:12:03 +00:00
ac2f4d237d docs/tools: package-wide fog volume census and 0x7a scanner (ASSET-308) 2026-11-22 23:11:04 +01:00
b4dec47ab1 docs: design.md Printed encodings row, the repaired v_fma_mix literal
The one difference the check now repairs instead of refusing, its
conditions, where it was seen, that the game's clean listings have none
(the row's own count), and that the hardware behaviour is inferred.
2026-11-22 23:10:57 +01:00
08fc8ec748 file_system: T: keeps creating its parent folders, as merged with RT-218
main's G:/T: drives (4c52ce27) made a T: create build its parent folders and pinned
that in file_system_test. The folder-exists rule of this branch now applies to the
package view (GAME:, G:) only, so that merged behaviour stands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:07:59 +00:00
8e32de2144 docs/testing.md: say where each llvmpipe mesh failure was measured (TEST-782 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:07:58 +03:00
3336068ca0 docs/models: scope the rating formula and call 10 an observed minimum (ASSET-299)
Review on #3809: the weighted formula holds on the 345 blocks with all four
parts above 10, not on all 504; the 24 blocks with an overall of exactly 10
are part of the 159 with a part at 10 (345 + 159 = 504); and the exports show
a minimum, not where the engine clamps. Wording only, no new numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:33 +01:00
b6cf447a40 docs/design.md: list the rpf9dump xma mode in the usage block 2026-11-22 16:06:38 -06:00
37f9e686b5 docs/design.md: name the models and textures rpf9dump modes separately
The usage block showed 'rpf9dump models|textures', which is not a mode: the tool rejects it now that unknown modes fail, and it never ran as written. List the two commands.
2026-11-22 16:06:38 -06:00
ec9a5780b6 Merge refreshed sampled indexing into storage indexing follow-up 2026-11-23 08:06:17 +10:00
3af6d905e4 Merge current main into Tier 2 conservative rasterization
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-22 18:06:08 -04:00
53eeea4170 Remove three blocks the round-42 merges left in twice
docs/testing.md had the whole "GPUs with 128 bytes of push constants"
section twice in a row (identical), and the first copy had no blank line
before its heading. docs/embedded_shaders.md section 4 repeated the
"blocker then / now" table and the "disassembly count is unchanged"
paragraph after the remaining-blocker table. tests/test_skinned_glb.py
defined SkinnedGlbTest.test_full_export_without_numpy twice (identical),
so the first definition was dead.

The second copy of each goes; nothing else changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:06:06 +00:00
5fdcf31720 fix(textures): filter sRGB DDS previews in linear light
Carry the DXGI transfer function through alpha-weighted preview resizing. Keep RGBA8 quantization stable on dark ties and cover the PNG bytes for tagged and untagged textures (BUILD-1087).
2026-11-22 23:06:02 +01:00
dfcbd362bc Decode VOP3 legacy MAD/FMA according to the shader target 2026-11-22 23:05:56 +01:00
d580c2d9e8 rdna2spirv: use denormal-safe integer IEEE-754 equality for image_atomic_fcmpswap 2026-11-22 19:05:39 -03:00
2ff231acf3 rdna2spirv: fix TwoSum overflow in Gen.f64_add_mode via FastTwoSum
# Conflicts:
#	docs/design.md
2026-11-23 00:05:28 +02:00
7974b89a02 Merge official main into SHADER-605 and record independent GPU results 2026-11-22 23:05:26 +01:00
f46e90310d file_system: a listing directly below a file is ERROR_DIRECTORY, as on the host
collect answered ERROR_PATH_NOT_FOUND for any folder that is not one in the title's
view. The host tells a missing folder (3) from a file in the folder's place (267);
view() already knows which. Reported in review by shdann, with the host table.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 22:05:06 +00:00
95f023f62b file_system: a folder has to exist in the title's view; same-name moves succeed
Three places where the shim disagreed with the host about GAME: paths:

- write_target created the parent folders before checking anything. A failed
  OPEN_EXISTING left the missing folders behind, and a create succeeded in a
  folder that was never made, below a package file (which then read as a folder)
  and inside a folder the title had removed. The parent now has to be a folder in
  the title's view, as CreateDirectory, MoveFile and CopyFile already require;
  otherwise ERROR_PATH_NOT_FOUND and nothing is created.
- FindFirstFile inside a removed package folder returned "." and "..", and inside
  a folder that never existed reported ERROR_FILE_NOT_FOUND. Both are now
  ERROR_PATH_NOT_FOUND.
- MoveFile onto the same name, or to the same name in another case, failed with
  ERROR_ALREADY_EXISTS. The first now succeeds and changes nothing; the second
  renames the overlay entry (a package file gets an overlay copy under the new
  spelling; a package folder is refused like any other move of one).

Two existing checks encoded the old answers and are changed: the test that made
GAME:\save\slot1.bin without making GAME:\save first, and the one that expected
ERROR_FILE_NOT_FOUND for a listing inside a missing folder.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 22:05:06 +00:00
360e3e1de3 ptr_truncation_census: count VGPR-addressed global_* and s_getpc_b64 users
shader_meta only looks at a global_* whose base is an SGPR pair, and the corpus has none: its 10,548 global_*
instructions (530 shaders) address through VGPR pairs. The census now counts them, the s_getpc_b64 users and the
access kind of every untruncated site, and docs/d3d12_vulkan.md says that VGPR-held global_* addresses are, with
V# bases, outside what the count can see, instead of reporting "no global_* base truncated".

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 15:04:29 -07:00