- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
The batch translator can exit successfully without one of the fuzzer's required modules. Report that rejection before device capability checks can mask it as a skip.
Honour LEONIDA_PC_TAIL_UBO=1 in runtime/test/vk_image_fuzz.cpp by sizing the
push-constant range and vkCmdPushConstants to 128 bytes (s0..s31; the fuzz
shaders read neither heap base nor code base, so they declare no set-1 block).
Add --pc-tail-ubo (and LEONIDA_PC_TAIL_UBO=1 env detection) to
tools/image_fuzz.py so it forwards --pc-tail-ubo to rdna2spirv.py and sets
LEONIDA_PC_TAIL_UBO=1 for vk_image_fuzz, enabling 128-byte push-constant GPUs
to run the image fuzzer instead of skipping every case.
Co-Authored-By: Gemini 4 Neon <noreply@google.com>
A crash in the harness (the ANV SIGSEGV in vkCreateGraphicsPipelines of #1429)
printed only "FAIL (harness error)". The failure line now says how the harness
ended (exit N, killed by SIGSEGV, or a Windows NTSTATUS such as 0xc0000005
access violation) and its last stderr line, followed by the last 20 lines of
stderr (stdout when stderr is empty).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default was runtime/build/linux, which only a Linux build that follows docs/testing.md has. Following
docs/shader_validation.md (cmake --build runtime/build --target vk_image_fuzz, then run with no --build), every
run stopped with "vk_image_fuzz not found". Default to runtime/build like lds_fuzz and valu_fuzz, and look in its
RelWithDebInfo/Release subfolder with compute_fixture.find_test_program as lds_fuzz does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both harnesses create a pipeline layout with the 144-byte translated
user-data block and never checked maxPushConstantsSize, so on a
128-byte device (Intel Arc, some AMD drivers) they failed validation
instead of skipping, although every pixel was exact. Each now prints
"unsupported: need 144 push constant bytes, device has N" and exits
77 before creating anything, as vk_texture_test does since 0c84bff;
the range uses the same constant.
run_gpu_tests.py already reported ps_tex's 77 as SKIP; image_fuzz.py
skipped it with a fixed message and now quotes the harness's
unsupported line. CPU tests cover both runners' 77 path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vonsek reproduced a blind spot: +0.0 == -0.0 in Python, so a wrong binding that returns +0 where the texture holds -0 passed silently (4096/4096 raw words differ, compare() reported none; 192/4096 on a generated float case).
same_component() now compares the packed f32 words and keeps the any-NaN policy (payloads are not modelled). Two CPU regressions: one flips a single output channel from -0 to +0 and expects exactly that pixel; the other feeds a different NaN payload and expects no mismatch. 40/40 programs still match on the RTX 2060 SUPER with validation, so the GPU preserves signed zeros for these formats.
AI-assisted. docs/shader_validation.md said "Not covered yet: images", and
FUZZ-1..13 touch VALU, memory, LDS, crosslane and control flow but not a single
image instruction. This is the first slice of that gap:
- runtime/test/vk_image_fuzz.cpp: headless harness that binds one 2D sampled
image from a key=value spec (format, size, texels, T# key) through the
bindless set and the descriptor table, draws a 64x64 full-screen triangle with
a caller-supplied VS/PS, and dumps RGBA32F. It enables the without-format
storage-image reads/writes and fragment atomics the translated image path
declares, and fails on validation errors with LEONIDA_VK_VALIDATION=1.
- tools/image_fuzz.py: assembles a pixel shader that reads one texel with
image_load (dmask 0xf, T# in s[8:15]), translates it with rdna2spirv.py, runs
the harness, and compares every pixel with an independent CPU oracle for the
T# format. A fetch is a memory read, so the oracle is exact.
- tests/test_image_fuzz.py: the oracle, the texel mapping, the T# word and the
generated shader, without a GPU.
Covered: R8G8B8A8_UNORM, R16G16B16A16_SFLOAT, R32G32B32A32_SFLOAT and
R32_SFLOAT, at 8/16/32/64 square sizes that divide the draw; a fifth of the
values are NaN, +-inf, +-0 or denormals.
Not covered yet: dmask variants, UINT/SINT formats (they read through the
storage views), mips, 1D/2D-array/3D/cube, image_sample/gather with filters and
borders, and texel offsets with VK_KHR_maintenance8.
Verified on an NVIDIA RTX 2060 SUPER (Linux, 620.73.04, Vulkan 1.4.357):
40/40 programs match under LEONIDA_VK_VALIDATION=1; ctest 11/11; the GPU suite
is unchanged with a clean build. Synthetic fixtures only, no game data.