ps_texoff_forms runs the three forms on vk_texture_test's texture with ps_texoff's per-pixel offset (all 64 pairs in
-4..3). check.py and run_gpu_tests.py judge it with texoff_words(..., "ps_texoff_forms"); unit tests check that a
dropped or swapped offset fails. 4096/4096 pixels exact on an RTX 4090 and on a gfx1036 iGPU.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under `python -I` on Windows a redirected stdout is strict ANSI, so printing a path with a character outside the
code page raised UnicodeEncodeError. tools/ guards against it at the start of every __main__ block and
tests/test_tool_stdout_encoding.py enforces that, but only for tools/. viewer/serve.py died before it started
serving and scripts/audit_shader4_regs.py exited 1 after writing its report; bench_wave64.py and run_gpu_tests.py
print the same kind of output unguarded. All four get the guard, and the check now covers scripts/ and viewer/.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
cs_barrier_loop is a wave32 fixture (subgroup_size 32 in index.json): its
expected words are four waves of 32 lanes. run_gpu_tests.py pinned the size
through VKC_SUBGROUP_SIZE but, unlike check.py, judged the dump when
vk_compute_test reported "compute subgroup size: 32 not available" and ran it
at 64 lanes anyway. A device with 64..64 compute subgroups (GCN3/GCN4 on RADV)
therefore reported a failure that is really an unpinnable wave size: 139/180
passed with 1 failed, where check.py reported 0 failed on the same work folder.
Reuse check.py's unpinned_subgroup_skip for cs_barrier_loop only. The other
pinned dumps are still judged at the device's own width, which is how cs_store
and the cs_w32_* fixtures keep being tested on a 64-only device (skipping all
of them cost 12 passes: 128/180).
RX 570 (gfx803, RADV Mesa 26.2.6, Vulkan 1.4.354), commit 4947579:
run_gpu_tests 139/180 passed, 41 skipped, 0 failed; check.py 0 failed.
Use the existing SPIR-V capability scan to request the feature before creating the Vulkan device, or report an unsupported-device skip. Add a synthetic compute case that checks both words of a binary64 result.
With LEONIDA_PC_TAIL_UBO=1, build.py and run_gpu_tests.py translate with --pc-tail-ubo, and the test
programs (vk_compute_test, vk_store_test, vk_harness, vk_texture_test, vk_sampler_test, vk_bindless_test)
declare and push 128 bytes and, when a stage declares set 1, bind the tail block there
(runtime/test/vk_pc_tail.h: a host-visible buffer with one slot per dispatch or draw, bound as a dynamic
uniform buffer). vk_harness refuses --mesh-compute with the flag (exit 77): mesh_compute_vs.py's vertex
shader still reads its address from push constants. Without the variable nothing changes.
Step 2 of the uniform-buffer tail claimed in #1902.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use a comma-separated glob list (*amd*,*radeon*) for the AMD configurations in scripts/bench_wave64.py so the Vulkan Loader selects Linux Mesa RADV (radeon_icd.x86_64.json) in addition to Windows AMD (amd-vulkan64.json) and AMDVLK (amd_icd64.json).
Addresses @ddm-j's finding in #2300.
Measure MUBUF/MTBUF swizzled buffer addressing (V# SWIZZLE_ENABLE,
ADD_TID_ENABLE, INDEX_STRIDE, OOB_SELECT, multi-dword and typed
accesses, atomics, 32-bit offset wrap) natively on RDNA2 (gfx1036,
wave32 and wave64) via tools/buffer_swizzle_probe.py, and fix all six
observed silicon divergences in tools/rdna2spirv.py:
- idxen=1 ignores ADD_TID_ENABLE (both address and bounds).
- SWIZZLE_ENABLE=1 with idxen=0 and ADD_TID_ENABLE=0 stays linear and
OOB_SELECT 3 remains RAW.
- Multi-dword raw accesses step by +4*IS only in scratch-swizzle mode
(SWIZZLE_ENABLE=1, idxen=0, ADD_TID_ENABLE=1); indexed swizzle
(idxen=1) steps linearly by +4 bytes even across IS boundaries.
- Scratch-swizzle mode suppresses typed formats > 4 bytes (MUBUF/MTBUF)
and 8-byte buffer_atomic_*_x2 even under OOB_SELECT 2 (formats <= 4B
execute normally); indexed swizzle executes them linearly.
- OOB_SELECT 3 with active swizzle and stride != 0 checks
(index + soffset) >= num_records or off + payload > stride.
- off = uint32(voff + inst_offset) wraps at 32 bits before bounds
checking, while RAW mode 3 uint64(off) + uint64(soffset) does not.
Update semantic tests, cs_buf_swizzle fixture expectation (word 4:
0x5eed0028 -> 0x5eed000c), unit tests, and docs/design.md /
docs/shader_validation.md.
#1825's single-output M3 occlusion shader is drawn by the ctest d3d12_m3_frame_test; run_gpu_tests picked it up
and failed it with "no checker defined".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In an f16 SDWA op, Gen.src_h returned a float inline constant as its f16
bits without the operand's src_sel. On RDNA2 the constant is the f16 value
over a zero high half and src_sel then narrows it like a register:
v_add_f16_sdwa d, 1.0, v src0_sel:WORD_1 reads +0.0 (measured on gfx1036).
The translator added 1.0.
GPU test ps_sdwa_f16_const (hand-derived words, measured on gfx1036) with a
semantic fixture; it also covers an SGPR source and the integer path
(v_cvt_f16_u16_sdwa of 1.0), which were already right. docs/design.md row.
AI-assisted.
The scalar mask in the second operand is an output even when the instruction also has a separate carry-in. Mark it written to avoid reporting it as an incoming register value.
A 16-bit op in SDWA form (f16 VOP1/VOP2, v_cvt_u16/i16_f16, v_cvt_f16_u16/i16)
with dst_sel:DWORD writes the result zero-extended on RDNA2, whatever
dst_unused says. Gen.insn only marked an SDWA destination for a dst_sel other
than DWORD, so write_lo16 applied the non-SDWA keep-the-high-half rule and the
translator returned 0xdead4000 where gfx1036 returns 0x00004000.
Mark every SDWA VGPR destination and let write_lo16 skip the keep for it.
ps_sdwa_dword_hi.asm (GPU) and its semantic fixture pin four ops and three
dst_unused values; docs/design.md gets the contract row.
AI-assisted.
The listing parser represents image address lists separately from ordinary register ranges. Include their highest register so the reported original span is comparable with the driver count.
A test-specific setting can select a different adapter or feature. Pass the CTest environment to its subprocess so Wine covers the same settings and sibling tests still inherit the runner environment.
The texture harness needs a shader working directory, so two branches launched it directly and bypassed the configured deadline. Pass the working directory through the shared launcher so those cases time out and the suite can continue.
`-h`/`--help` printed the usage to stderr with exit code 1, and any other `--` option was dropped without a
word: `--detail` (a typo for `--details`) printed the summary with exit code 0. Help now goes to stdout with
exit code 0, and an unknown option or a wrong argument count is a usage error with exit code 2, as in the
other hand-parsed tools.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
A compute fixture loads through the nine narrow integer formats (DST_SEL
XYZW, X011 and d16) and stores edge values through each with the
runtime's selectors. check.py's 136 expected words are the same program's
output run natively on gfx1036 (tools/hw_oracle, wave32 and wave64), and
the interpreter test runs the fixture against them too.
Depends on #1871.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed GPU configuration already makes the benchmark exit unsuccessfully, but the final line still claims all outputs match. Identify missing results in the summary so the text agrees with the outcome.
CTest marks disabled entries as skipped even when the command is unavailable. Check the property before resolving or starting the Windows test so the Wine report gives the same result.
Mesa llvmpipe returns 0 for out[5], the NaN check of 0 * inf with an
inline-constant 0, with or without SignedZeroInfNanPreserve, while its
other NaN checks give 1 (a run on #664, Mesa with LLVM 21.1.8). The CI
runs scripts/run_gpu_tests.py on llvmpipe, so the test would fail there.
APPLE_UNJUDGED_WORDS becomes UNJUDGED_WORDS, keyed by the first word of
the device name on vk_compute_test's "device:" line. Apple keeps words
0, 2 and 3, and llvmpipe gets word 5. Every other device still judges
all eight words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MoltenVK returns +0 for -0 products with or without SignedZeroInfNanPreserve,
in out[0] (v_mul_f32), out[2] (v_pk_mul_f16) and out[3] (v_mul_f16). The mode
still fixes the three NaN checks on Apple. Seen on an Apple A18 Pro and an Apple
Paravirtual device in #664, tracked as #1203 / SHADER-182.
- check.py: judged_words() leaves those three words of cs_signed_zero_nan
unjudged when vk_compute_test's device line names an Apple GPU, and
words_match() compares the rest. The other five words still have to match,
and every other device judges all eight.
- run_gpu_tests.py: uses the same two functions and says which words weren't
judged.
- tests/test_shader_checks.py: tests for the Apple and non-Apple cases, the
NaN checks still judged on Apple, and run_gpu_tests' judge_cs_dump.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>