With the Visual Studio generator the test programs land in build/<Config>, and the runner only looked in the build
folder itself, so --build had to point at the subfolder (#166, RX 9070 XT entry). resolve_build_dir() looks in the
build folder first, then in RelWithDebInfo, Release, Debug and MinSizeRel, and takes the configuration that has all
three required programs and was built last. If none has them, the folder given is kept for the error message.
FUZZ-1: model the integer/bit VALU block in tools/cpu_ref.py and add
those ops to the shader_diff program table: v_add_nc_u32, v_sub_nc_u32,
v_subrev_nc_u32, v_mul_u32_u24, v_mul_i32_i24, v_mul_lo_u32,
v_mul_hi_u32/i32, v_mad_u32_u24/i32_i24, v_min_u32/u32, v_max_i32/u32,
v_bfe_u32/i32, v_bfi_b32, v_alignbit_b32, v_alignbyte_b32, v_perm_b32
and v_med3_i32/u32.
Pinned known-answer tests cover the boundaries: bfe width cut and zero,
perm selector ranges (bytes, sign bits, constants), align shift 0 and
24, signed mul_hi, 24-bit sign extension and mad wraparound.
The generator keeps integer ops away from registers last written by a
float op: Vulkan does not promise a NaN payload and the comparison
accepts both-NaN, so reusing those bits as an integer would compare an
unobservable payload. Unobservable as a float, not as an integer.
Verified CPU-only: 28 cpu_ref tests, 6 shader_diff tests, 423 semantic
tests, and 8000 seeded programs (8 seeds x 1000) with 0 mismatches and
0 skips. GPU confirmation on the 5090 is pending.
The indexer treated the pre-header wrapper words as the root and labelled the real header fields as counts. Parse the documented XboxBvh4Header fields, decode root node pointers, and document the runtime node and leaf layouts while keeping the dehydrated packed stream open.
The CSV written to stdout (the default output) used csv's "\r\n" on a text stream
that already turns "\n" into the platform line end, so every row ended "\r\r\n" on
Windows and a redirected index read as one blank row after each row. The stdout writer
now uses lineterminator="\n", as awc_manifest.py does; --out files were already right.
A target that does not exist ended in a FileNotFoundError traceback from
os.path.getsize; it now prints an error and exits 2, as awc_manifest.py does.
Tests: a stdout stream that writes "\r\n" like Windows' (so the check also runs on
Linux CI) and the missing-target exit code; both fail without the fix.
Adds the #283 argparse validators to anim_index, rbf0_index, restofworld_index and rpf9_carve: --start >= 0, --limit >= 1 (decimal or 0x hex), and --max-inflate >= 1 in restofworld_index. Bad ranges now exit 2 before any scan or output instead of silently scanning everything, less, or nothing. Synthetic CLI tests in all four test files; docs notes for each tool.
New item claimed in #156. AI-assisted (OpenCode).
run_workgroup now steps every invocation one instruction per round, so a
load after a store sees all lanes' stores as in a SIMD wave (cs_w64x_load_
ballot_load read a later store before), allows a partial last subgroup, and
answers OpGroupNonUniformAny, All and BitwiseOr Reduce; BallotFindLSB,
IAddCarry and UGreaterThan are per lane. A shuffle from a lane that is not
running is an undefined value.
test_wave64_subgroup_ops runs cs_w64x_ballot, _readfirstlane,
_load_ballot_load, _partial, cs_wave64_ballot, cs_wm_bfm64, cs_wm_half_cmp
and cs_wavemask without --wave64-emulate:
- one 64-wide subgroup: every word equals check.py (cs_wavemask: all 64 lanes);
- two 32-wide subgroups: the pinned words equal what an RTX 4070 SUPER
(driver 610.88) wrote, three runs each; cs_wavemask 64 mismatches with
lane 0 = 0x00081021 on both;
- removing 21cef25's ballot guard makes cs_w64x_partial use an undefined value.
403 semantic tests pass (397 before). AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the cube array at its original extent and allocate a separate upload range for the two-dimensional mip chain. Both shader registrations now run through the updated upstream runner.
21cef25 keeps a wave64 ds_bpermute result only where a ballot of the running
invocations has the source lane. run_workgroup now answers
OpGroupNonUniformBallot per subgroup, and OpGroupNonUniformBallotBitExtract
is evaluated per lane.
Rebased on 3fae38a: 395 semantic tests pass. RTX 4070 SUPER, driver 610.88:
LEONIDA_W64_EMULATE=1 run_gpu_tests.py 45/47 (cs_wavemask and ps_vcc_x2
skip); without emulation the three cs_w64x dumps still match the wrap model,
24/24 words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without --wave64-emulate, vk_compute_test on cs_w64x_readlane, _writelane and
_bpermute (NVIDIA GeForce RTX 4070 SUPER, subgroup 32, driver 610.88, Vulkan
SDK 1.4.363.0, llvm-mc 21.1.8 in WSL) wrote exactly WRAP32_EXPECTED: 24 of 24
words. With LEONIDA_W64_EMULATE=1, scripts/run_gpu_tests.py passes 42/44 on
the same GPU (cs_wavemask and ps_vcc_x2 skip).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spirv_mini_interp gains run_workgroup: invocations run in lockstep and meet at
OpGroupNonUniformShuffle (Subgroup scope), with an explicit subgroup size. A
shuffle from a lane outside the subgroup raises UndefinedResult, or wraps
mod the subgroup size on request (the issue #94 symptom, a model and not the
spec). A shift by at least the bit width is now an undefined value that only
raises when used: v_mbcnt computes 1 << lane for lanes >= 32 and selects it
away, which is valid SPIR-V.
test_wave64_cross_half translates cs_w64x_readlane, cs_w64x_writelane and
cs_w64x_bpermute (no --wave64-emulate):
- one 64-wide subgroup: all 24 words equal check.py's GPU values;
- two 32-wide subgroups: bpermute and the writelane writes stay exact, a
cross-half readlane is undefined; the wrap model gives the words a 32-wide
GPU without emulation is predicted to show;
- SPIR-V sabotages (readlane lane & 31, bpermute without its half base) must
change the 64-wide result.
CPU only (Windows 11, Python 3.11.9): 382 semantic tests pass. Not yet
measured on a GPU. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add gamedata_graph.py, which rebuilds the XML payloads from a carve and measures document -> content-set -> target edges. Include ids are joined only on exact equality; missing ids stay dangling and common:/ is not normalized to $(common)/.
Add synthetic tests for includes, a cycle, reachability, prefix classification, unparsed payloads and output redaction. Add a measured docs page linked from the index.
ps_vcc_x2 reads two dwords through the V# in s[0:3], but vk_harness pushed zeros and bound no memory, so on the
GPU it read address 0 and lost the device; run_gpu_tests.py skipped it and check.py left it out. vk_harness now
takes VKH_SGPRS (user SGPRs, decimal or 0x hex) and VKH_HEAP (addr=word seeds in a 64 KiB device-address heap,
passed as the heap base). bufferDeviceAddress and shaderInt64 are enabled only then; a device without them gets
"unsupported: ..." and exit 77, which both runners report as SKIP. Both runners give ps_vcc_x2 the V# and words
tests/semantic uses and expect 0x11223344 0x55667788 0 0.