Commit Graph

5744 Commits

Author SHA1 Message Date
9753dc436b anim_move: report per-container child counts and fix max single-stream byte size 2026-11-22 16:25:29 -03:00
811a7831ad runtime.yml: a test keeps the path list in step with what the jobs read
tests/test_runtime_paths.py recomputes the tools/ files the Runtime jobs read (named by runtime/, the
workflow's steps and the scripts it runs, then sibling imports, modules and files named in strings, and
tools/ subdirectories, to a fixed point) and fails when one is not listed, when the push and pull_request
lists differ, or when a listed tool no longer exists. Without it, a new import in the translator would
leave the new module outside the list, and a later change to that module alone would skip the GPU tests.

.gitattributes joins the list: it decides the line endings of every file the build checks out.

docs/testing.md no longer says the llvmpipe suite runs on every pull request, and says that a commit on
main has a runtime-windows artifact only if it touched what the workflow builds or reads.
2026-11-22 20:23:43 +01:00
ed290f9f54 SHADER-309: design.md: record the corpus count of bounds-checked shaders (none)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:21:08 +01:00
b523c58b01 docs/design.md: drop the stitched fragments from the Global atomics row
The round-40 merges left an older version of the row inside the current one:
it still listed the float atomics as Unsupported (the same row documents the
fmin/fmax CAS loop), repeated the "returned pair comes from two reads"
sentence, and kept the shorter older test_global_atomics.py sentence. Every
fact stays; only those three duplicated fragments go.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-22 20:19:42 +01:00
d634632c27 docs: merge the duplicated no-op SOPP/SMEM and omod contract rows
The round-40 merge left two rows for No-op SOPP/SMEM (the second adds
s_atc_probe and s_atc_probe_buffer) and two for Output modifiers on hardware
(the second adds the RX 6700 XT gfx1031 run, the per-MODE counts and the
synchronization-validation note). One row each, keeping every measured fact.

The output-modifier row also no longer ends with "RDNA2 itself is unmeasured"
right before the gfx1031/gfx1036 measurements that contradict it.
2026-11-22 13:19:29 -06:00
ca1ffa657e docs(world): clarify cross-map terrain LOD parent lookup
Record the single referenced map case for terrain parents and the child-count, distance and name-hash checks across two regions.

Refs: #3047
2026-11-22 14:18:53 -05:00
82cb279597 rdna2spirv: fix TwoSum overflow in Gen.f64_add_mode via FastTwoSum 2026-11-22 21:17:31 +02:00
e319015dc8 docs: merge the duplicate M3 milestone rows (PROC-139)
Keep the newer probe/isolation row and fold in the older row's synchronization-validation note. D3D-337's M2 fix is already in this branch.
2026-11-22 20:17:29 +01:00
b6f97b84be docs(shaders): document SGD5 pass render-state indices
Record the effect-local fixed-function table mapping and the full-corpus discriminator used for PROC-143.

Refs: #2519, #3036, #3047
2026-11-22 14:16:56 -05:00
bd1f962745 meshlet_page: meshlet record w2 bit 28 doubles the centre step (1/8 m, +-256 m)
1,732 large, far meshlets in the minigame archive set it; read at 1/16 m their
radius covers the farthest vertex in 0 of them, at 1/8 m in 98.0% (99.9% with
the rounding allowance). centre_step and meshlet_centre take the bit,
centre_agreement uses each meshlet's step and counts coarse_steps; the
docs/story.md tables are recounted (centres 50.1% / 71.8%, radius 96.5% /
98.7%). Also fixes the docstring sentence #3033 garbled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:16:26 +01:00
2546446dd6 Docs: the wave64 count is 23,841 (FSSM flag); untangle the Wave size row
docs/design.md's "Wave size" row kept both versions after the FSSM wave-size
flag (#1900) landed: it opened with the old marker figure in bold (21,545),
gave the FSSM figure with a stray closing "**", and repeated the old marker
breakdown twice. README.md's status table still said 21,545.

The row now states the FSSM u32[0xD4] bit 5 counts once and keeps the code
markers as the superseded estimate. The README says 23,841.

Checked on a full-corpus translation (own 1.0.2.1 copy, counts only): at
ec8ec4c9 the index marks exactly 23,841 wave64 (PS 10,974, mesh 9,282,
VS 2,236, CS 1,154, GS 195) and 2,662 wave32 (CS 1,535, PS 1,127). At
6a6704df the code markers made 21,538 of 26,487 translated shaders wave64,
and they call exactly the row's 2,287 (943 PS, 1,057 VS, 287 CS) wave32.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:16:17 -03:00
42417783c2 docs: correct the hair census rows and drop the duplicate snippet
The manifest has three player_story000_00 hair rows, not ten, and the measured set is 267 rows (219 stubs, 48 larger). List the six larger rows the old summary omitted and remove the repeated Python block.
2026-11-22 19:15:50 +00:00
fc1e0058e0 file_system: copy-up through a staging name, one at a time
A write-open of a package file copied it straight to its overlay name with
no lock. A process killed mid-copy left a truncated file there that every
later read preferred over the package; two threads write-opening the same
package file both copied, and the second copy_file failed on the taken name,
so that open failed.

write_target now copies into <overlay>\.gta6rt-copy under a private name and
renames it into place, under a mutex that only copy-ups take. Listings hide
the staging folder like .gta6rt-deleted. Without the mutex, copy-then-rename
alone still failed about 2 in 100 runs: a losing rename onto the existing
name briefly holds it, and the winner's open got ERROR_SHARING_VIOLATION.

file_system_test: two threads write-open one 256 KiB package file, 50 rounds;
both opens succeed and the overlay copy matches (fails 3 of 3 runs on the
old code, passes 200 of 200 with this); no staging file is left; a crash
leftover is hidden from a GAME: listing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:15:36 -05:00
4c414d1216 tools: ps_oracle.py runs hand-written RDNA2 pixel-shader ISA on AMD GPUs
hw_oracle launches compute kernels only. vk_harness can now write a
pipeline's VK_KHR_pipeline_binary data and build a pipeline from it
(VKH_BINARY_OUT / VKH_BINARY_IN). ps_oracle.py puts assembled ISA in
place of _amdgpu_ps_main in the driver's PAL ELF, raises the pixel
stage's register counts in the msgpack metadata, optionally changes
other metadata entries, and draws with it, reading every pixel's mrt0
words back.

Checked on gfx1036 (driver 26.10.1): v_interp of a varying and the
parameter words P0 / P10 come back as expected. Tests in
tests/test_ps_oracle.py, docs in docs/shader_validation.md.

AI-assisted.
2026-11-22 20:15:34 +01:00
0ea717560a Declare only descriptor broadcast subgroup capability 2026-11-23 00:45:21 +05:30
b36765a69f fix(shader): keep the first NaN in binary f32 min and max
RDNA2 keeps the first quiet NaN word when both operands are quiet NaNs. A shader can convert its sign and payload into a finite color, while NMin and NMax alone may discard both operands in this case.
2026-11-22 20:14:36 +01:00
600037cd45 rdna2spirv: image_sample_cl, _b_cl, _c_cl, _c_b_cl: min-LOD clamp forms (EGEN-MIMG-SAMPLE-CL)
The clamp, the component after the coordinates, becomes MinLod on the
implicit-LOD sample (after Bias and Offset in mask order); outside the pixel
stage the LOD is max(0, clamp). a16 and --texel-offset-fallback (Grad|MinLod)
included. GPU tests ps_texture_cl and ps_texture_b_cl on the two-mip texture,
semantic tests, design.md row. Stacked on the image_sample_c change.

AI-assisted.
2026-11-22 20:14:03 +01:00
56839d2dd9 D3D-350: device slots 8, 9, 12 and 36 cannot be measured from the package
The package ships no D3D12 runtime (d3d12_xs.dll is part of the console OS),
and the device clients it does ship never create a queue, allocator, command
list or fence: neither XboxBvhBuilder.dll nor amd_fidelityfx_upscaler_xbox.dll
contains those IIDs or imports GUID data from d3d12_xs.dll, and none of their
indirect calls at 0x40/0x48/0x60/0x120 is made on the device. The callers are
in the game executable, so the slots stay Open.

tools/d3d12_iid_scan.py reports which ID3D12 IIDs (from the SDK's d3d12.h) an
image contains and what it imports from d3d12_xs.dll, warning on imports that
could be IID data. It prints names and counts only.

docs/d3d12_command_objects.md section 2.1 records the result with counts and
how each column was measured. tests/test_d3d12_iid_scan.py covers the tool on
a hand-written header and hand-built PE images (no game files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:13:37 +01:00
dd1be7b5e3 skinned_glb: fix numpy parity and pin the packed 0x8C paths
Zero zero-weight joint indices before the palette lookup, so the numpy path matches the stdlib path instead of raising IndexError.

Strengthen the packed test to set bits 12-15, and add tests for mesh_blob.sections and the empty component list. Document that only 0x8C is accepted (no measured 0x8B layout), add the 0x8C docs row and correct the test count to 15.
2026-11-22 19:12:25 +00:00
5c6d00877a rdna2spirv: raise MAX_STRUCTURED_DEPTH to 64, add --max-structured-depth (SHADER-427)
Since #1904 the corpus's deepest structured tree is 29, not 118. With the
SHADER-299 bound at 16, 1,031 modules (747 CS, 284 PS) still took the
dispatch-loop form, which saves only 12% of their spirv-val time but
compiles 1.67x (PS) to 2.0x (CS) slower on an RTX 5070 Ti / 621.24.
The bound now sits above the corpus as a guard, and
--max-structured-depth N (0 = never) sets it per run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:11:00 -05:00
42d51975e0 rdna2spirv: normalize binary64 subnormals in v_frexp_{mant,exp}_f64 (gfx1036 measured) 2026-11-22 11:10:36 -08:00
9e6fe1e74e fix(bcpack): preserve BC6H history confirmation depths 2026-11-22 19:10:20 +00:00
a094bd2d53 rdna2spirv: declare DenormPreserve 16 so a driver keeps f16 denormals (SHADER-526)
ps_sdwa_f16_const read mrt0 lane y as 0x0000 instead of 0x1c00 on NVIDIA: the
_sdwa src0_sel:BYTE_1 selects the f16 denormal 0x0040 (2^-18), and the driver
flushed it on the way into f32 because the module declared no 16-bit denormal
mode. The translator models f16 arithmetic in f32 with integer narrowing, so no
f32 denormal is involved and that conversion is what the 16-bit mode governs.

Every module now also emits OpExecutionMode %main DenormPreserve 16 with the
matching capability (core since SPIR-V 1.4, so no extension), and the index
lists shaderDenormPreserveFloat16, which vk_pipeline_check requires and
--no-float-controls still drops along with the 32-bit mode.

Tested on an RTX 4070 SUPER (driver 610.88, validation layers on): the GPU test
goes from 4096/4096 mismatches to 4096/4096 pixels exact, and the full GPU suite
from 142/189 to 143/189 passed with 0 failures and the same 46 skips.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-22 21:10:20 +02:00
bb4aa15323 embedded_shaders.md: drop 'open' after #1864 so the row doesn't go stale (review nit)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:10:08 +01:00
4a4443a46b docs/testing.md: Known problems row for the Mesa 25.2/25.3 RADV failures of cs_w32_salu64 and cs_signed_zero_nan
Both are Mesa bugs (ACO combine_add_sub_b2i use count, NIR fmul_is_a_number),
not translator bugs; RADV from Mesa 26.3.1 passes both on an 8060S (gfx1151). See #166.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:10:05 +01:00
7438b8ff60 rdna2spirv: implement v_cmp(x)_class_f16 and v_cmp(x)_class_f64 2026-11-22 20:09:19 +01:00
4c99e1dbae meshlet_page: meshlet record word +12 bits 14-30 are the normal cone
Axis octahedral 6+6 unorm (bits 14-19, 20-25), sin(half-angle) = (31 - f)/31
from bits 26-30, all-zero = no cone. Over the minigame archive (counts
only): 43,415 cones, axis within 25 degrees of the mean face normal for 82.0%,
every face inside within 0.05 for 97.8% (core_restofworld 74.9% / 99.7%).
meshlet_cone, cone_agreement under --cones, tests, docs/story.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:09:16 +01:00
2b71ac9872 fix(shader): preserve the RDNA2 fract f16 infinity word
Both infinity signs produce a negative quiet NaN on gfx1036. A shader can inspect that sign as integer data and use it to choose a color. Select the measured result explicitly and handle its DX10 clamp before FClamp.
2026-11-22 20:09:07 +01:00
fdffac4983 Declare dynamic sampled descriptor indexing in translated SPIR-V 2026-11-23 05:08:57 +10:00
56b0d81324 SHADER-559: translate LDS ADDTID reads and writes 2026-11-22 22:08:21 +03:00
0d5c799b77 Tests: separate WARP-only out-of-row UAV clear controls 2026-11-22 15:08:06 -04:00
3827562207 docs: correct the raw-scan total and ped variation manager claims
The component list already summed to 2,631, so replace the contradictory 453 total and spell out that the 908 are the resources using the skin/flesh shader. On the skeleton page, name both common.rpf managers and state that neither maps a variation index to a drawable plus texture, replacing the false claim that no such manager exists.
2026-11-22 19:06:57 +00:00
859553d3b5 Merge main into gpu-vcmpx-f16 (#2607)
docs/design.md

AI-assisted.
2026-11-22 20:06:55 +01:00
072db8a617 Merge main into gpu-vcmp-f16 (#2531)
docs/design.md

AI-assisted.
2026-11-22 20:06:35 +01:00
9b54495ae5 docs: the bikini top and the undies have an albedo (ASSET-230)
docs/character_models.md listed two garment rows as "none / unverified - likely
speculartex only". Read from the e293917 packs.rpf model export the way the
jacket and crop-tee rows read:

- all three records of each drawable bind 0xC8E8C282 (diffusetex) to the key
  the table already gave, on shaders 84af5c61/81153bcc/76c45dd8/428b44d6 and
  a9dfb1e7/428b44d6, not on the garment shaders;
- both keys are 512x256 BC3_UNORM_SRGB textures with 7 mips in the ttdb_peds
  pools; their speculartex keys are other, BC7_UNORM textures;
- over the whole export the three garment shaders never bind the slot (0 of
  7,948 material rows) and those five always do (1,372 of 1,372).

So "no clothing item in this wardrobe has an albedo" holds for the jacket and
the crop tee only. The Reproduce section gains the material-row snippet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 21:06:05 +02:00
92e8573eb6 docs/design.md: three stale spots (swizzle row, gather mip clamp, manifest verify)
From @tupacfan04's finding on #2891:
- the swizzled-buffer row ended with 'Unmeasured: the swizzled layout on
  RDNA2 hardware', though docs/shader_validation.md records it measured
  on gfx1036 (SHADER-343, 22 of 22 bit-exact); the tail keeps only what is
  still unmeasured;
- 'Other additions' restated the image_gather4_l(_o) mip clamp the
  'Gather sampler LOD' row already gives; it now refers to that row;
- the tools list said manifest.py has a --verify mode; it has create and
  verify subcommands (manifest.py --verify exits 2).
2026-11-22 16:05:29 -03:00
bbcbe09371 sampler_lod_probe docs: the half-level gap is the Vulkan spec's rule, not the AMD host's
Through vk_sampler_test (the runtime's vulkan_sampler(decode(S#)) path) an S# LOD_BIAS of +0.5 on image_sample_lz
reads level 1, as the console does, on a gfx1036 and an RX 7800 XT (AMD 26.10.1). So the AMD Vulkan driver rounds
like the hardware; only a host that follows the spec's ceil(lambda + 0.5) - 1 reads a level lower. Other hosts are
not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:05:12 +01:00
98de744499 d3d12_command_objects: document the geometry-descriptor validation and the batched-build slot map corrections (D3D-293)
Extends section 7 with the CPU-side geometry descriptor validation that gates
BuildRaytracingAccelerationStructureBatched2X before the first list-vtable call
(the step the D3D-293 dynamic logging proxy stopped at), integrates the static
iced-x86 cross-check results: undocumented slot 90 (+0x2d0) as the worker's first
list call, the +0xd0 barrier being bss-gated (never fired in the shipping DLL),
the +0x490 global UAV barrier group, and slot 148 (count * 40) upload allocation.

Fixes D3D-293.
2026-11-22 20:04:57 +01:00
51959aed84 docs: record the ped variation manager's literal model keys 2026-11-22 19:04:29 +00:00
a4b120925a docs: record the full raw-RSC body scan 2026-11-22 19:04:29 +00:00
26e763efb4 docs/design.md: drop the three stale duplicate sentences in the Wave64 mask ballot row
The 06451e48 tree had two Wave64 mask ballot rows (the old short one and the
PR #2222 superset); the ec8ec4c9 row dedup merged them into one row but kept
three subset sentences from the old row after their supersets: the short
lane_masks.py sentence (without the _b64-immediates/#1792 clause), the short
s_bcnt/s_ff reconstruct sentence (without the v_mbcnt/mask_half clause), and
the short RX 9070 XT GPU-checked sentence (2 test files instead of 4, without
the CPU-checked parenthetical). Removing the three subset sentences restores
the row byte-identical to the PR #2222 superset row. No code change.
2026-11-22 20:02:56 +01:00
8b600152bf meshlet_page: meshlet record word 0 bits 16-31 are the f16 bounding-sphere radius
Around the stored centre: it covers the farthest vertex in 95.3% of 142,613
minigame meshlets (97.5% allowing the centre's 1/16 m rounding) and 97.4% /
99.9% of 4,899 in core_restofworld; 99.9% are within 1.25x the tightest
radius (counts only). meshlet_radius, radius counts under --centres, tests,
docs/story.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:02:35 +01:00
820e9bc877 image_fuzz: accept the driver's one-ulp UNORM8 conversion in the translator oracle
The translated image_load fetches a UNORM texel through a float view, so the 8-bit -> float conversion is
the driver's. RDNA2 returns the correctly rounded c / 255; llvmpipe multiplies by an f32 1/255, one ulp
above it for 126 of the 256 byte values (27: 0x3dd8d8da, not 0x3dd8d8d9). The comparison was bit exact
and a run stops at its first mismatch, so on llvmpipe every run ended at its first R8G8B8A8_UNORM case
and the other formats never ran.

The translator oracle now accepts one ulp on a UNORM8 texel component, never on another format or on the
sentinels of registers dmask leaves unwritten, and the summary counts how many components needed it.
--oracle hw stays bit exact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 19:01:57 +00:00
10b88e8580 TEST-433: the skip message states the measured cause (16 live lanes behind a reported 32)
Measured by kapitche: Intel UHD 770 reports gl_SubgroupSize 32 in the fragment stage but runs 16 live invocations, so tiers A and B (32 or 64 live lanes) cannot hold. The skip keeps its condition (minimum subgroup below 32); deriving it from a measured live width is a follow-up.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:01:33 -05:00
654c5360af Revert "TEST-433: skip only devices whose subgroups are all narrower than 32 (the Intel 16-wide premise was wrong)"
This reverts commit e215380e1e.
2026-11-22 14:01:12 -05:00
c462f27ee7 sampler_lod_probe: measure the S# and T# LOD fields on RDNA2 (SHADER-539)
tools/sampler_lod_probe.py samples a linear 64x64 R32_SFLOAT texture with seven levels through tools/hw_oracle,
with image_sample_l and image_sample_lz under the S#'s MIN_LOD / MAX_LOD / LOD_BIAS / MIP_FILTER and the T#'s
MIN_LOD and BASE_LEVEL. The texture memory is a dword ramp, so each sample names the level it came from; a
calibration row per level finds the level starts instead of assuming a layout.

On a gfx1036 (Radeon iGPU, AMD 26.10.1), 43 of 43 rows fit one model, wave32 and wave64 alike:
- the S# fields apply to an explicit LOD and to _lz's LOD 0 (bias, then the clamp), as radv assumes; MIP_FILTER
  none ignores them;
- the T#'s MIN_LOD applies too, counted from the resource's level 0, not the view's BASE_LEVEL;
- the point mip filter's level is floor(lambda + 0.5): an exact .5 rounds up (Vulkan: ceil(lambda + 0.5) - 1);
- the T#'s MIN_LOD clamps the fractional LOD before that rounding (VK_EXT_image_view_min_lod: floor(minLod)).
So the runtime's Vulkan sampler and view read one level lower on 8 of the 43 rows. Also measured: gfx1036 lays a
linear mip chain out smallest level first, rows padded to 256 bytes.

docs/d3d12_vulkan.md records the measurement in place of "not measured on RDNA2 here";
tests/test_sampler_lod_probe.py checks the descriptor fields and the model without a GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 20:01:02 +01:00
e215380e1e TEST-433: skip only devices whose subgroups are all narrower than 32 (the Intel 16-wide premise was wrong)
The reporter corrected the probe: Intel UHD 770 reports a subgroup size of 32, so its tier A failures have an unknown cause and must not be skipped; only a device whose largest subgroup is below 32 (llvmpipe) is.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:00:50 -05:00
e24a6a1bd4 Merge remote-tracking branch 'upstream/main' into fix/alu-crash-unsupported 2026-11-22 20:00:32 +01:00
70003f5295 rdna2spirv: no IndexError on the short carry form and on short op_sel/neg lists
v_add_co_ci_u32 vD, src0, src1 (and sub/subrev) and a modifier list shorter
than the operands (op_sel_hi:[0,0], neg_lo:[1,0] on v_pk_fma_f16 and
v_fma_mix_*) are valid for llvm-mc, which expands them; the translator, fed the
hand-written source spelling by regen_fixtures, raised IndexError. It now reads
them as llvm-mc does. A probe of 42,000 ALU form variations finds no other
crash.

AI-assisted.
2026-11-22 20:00:30 +01:00
ede0398ea8 docs/design.md: drop the stitched FClamp med3 fragment from the float min/max/med3 row
The row repeated an older text after the NMin/NMax description, saying med3 is
FClamp(z, NMin(x, y), NMax(x, y)), which contradicts the sentence before it and
Gen.med3_f in tools/rdna2spirv.py. Docs only.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 19:00:00 +00:00