- vs/gs/ms: no OpGroupNonUniformQuadSwap (only guaranteed in fragment and
compute); shuffle from the quad's four lanes there.
- 32-bit forms in wave64 write only their own half of EXEC/VCC and vote SCC
over that half; mask_src accepts exec_hi. New GPU test cs_wqm_w64_half.
- cs_wqm_w32: read SCC right after s_wqm.
- test_wqm_on_data checks the real constants and shifts; new vs and half tests.
- docs: narrowed claims (SCC vote needs 64-wide or emulation, lane
assumptions, partial quads, helper invocations untested).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Keep both sides: main's ps_vcc_x2 / ps_tex / bindless and irreducible-CFG tests
next to ps_gather_wrap, main's buffer-format-store row next to the updated
gather row, and both the literal-SGPR table and #298's mask tokens in store_reg.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 D3D12 -> Vulkan layer is tracked in #313 (critical path, who builds
what, open D3D12 methods); say so next to #156 and #166.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parse_rts0 refused D3D_ROOT_SIGNATURE_VERSION_1_2 blobs. 1.2 is 1.1 plus
D3D12_STATIC_SAMPLER_DESC1::Flags: the PC serializer writes RTS0 version 3 with
14-dword static samplers (13 before). The model gains Version::V1_2 and
StaticSampler::flags. The canonical codec writes the flags only for 1.2, so 1.0/1.1
encodings are byte-for-byte unchanged.
Checking it against the real serializer found an older bug: a descriptor table's
payload is {num_ranges, ranges_offset} with the ranges at that offset, but the
parser read them inline after the count. Every table came back with a wrong range
type and count. The oracle test only covered constants and a CBV, so it never saw it.
root_signature_oracle_test now serializes 1.0, 1.1 and 1.2 signatures with a
two-range table, a root SRV and two static samplers (1.2 with a UINT border colour,
then non-normalized coordinates). Every sampler field, the ranges and the canonical
round trip must match. root_signature_test adds hand-built 1.2 and table payloads
and their truncation controls.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the conflicts with the GPU test lists and counts (#203, #212, #218,
#222, #235, #246, #219, #298, #230), and keep main's partial-wave rule for
ds_bpermute_b32 in wave64. The wave32 path gets the same ballot, so a
source lane that isn't running reads 0 there too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
GetResourceAllocationInfo, GetResourceAllocationInfo1 and
GetResourceAllocationInfo2 were generated stubs. Buffers take their width
rounded up to 64 KiB. A texture's size is what its VkImage needs
(vkGetDeviceImageMemoryRequirements, or a throwaway image without it),
rounded up to its D3D12 alignment: 64 KiB, 4 MiB with MSAA, or the small
alignment the description asks for. A 4 KiB request that doesn't qualify
is invalid, as on the PC runtime; the MSAA 64 KiB one has no size limit
there. Texture creation and these queries share one VkImageCreateInfo.
d3d12_vulkan_device_test compares buffer sizes, alignments and invalid
descriptions with the host PC runtime, and checks the per-resource layout
of the Device4/Device8 variants.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
vk_sampler_test binds a 128x128 two-level texture with the VkSampler from
vulkan_sampler(decode(S#)) and the view range from decode(T#). ps_ssharp
samples it with image_sample_lz and image_sample. check.py judges eight
S#/T# cases per pixel against levels worked out from the S# and T# bits.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>