Commit Graph

3 Commits

Author SHA1 Message Date
14d81dd093 SHADER-86: align mem_diff reference with RX 6700 typed-buffer decode
Repeat missing channels, drop the old norm-ulp1/missing-w32 splits, and allow DST_SEL 1 in the fuzzer.
2026-11-21 22:23:22 -03:00
3f4cf2e40d FUZZ-5: typed buffer loads in tools/mem_diff.py (buffer_load_format, tbuffer_load_format)
A buffer_format family: buffer_load_format_* on every format the translator decodes (random DST_SEL 0/X/Y/Z/W) and tbuffer_load_format_* on the five formats the 1.0.2.1 corpus uses. The reference decodes each element from the GFX10 format name (tools/gfx10_formats.json), not from the translator's table.

Two outcomes await a gfx10 hardware measurement (posted in #374) and are counted apart: UNORM/SNORM results 1 ULP from the correctly rounded value (the translator multiplies by a rounded reciprocal), and the missing W of a 32-bit format (0 in the translator, 1 / 1.0 for every other format). 5,000 programs: no other difference. Mutations of the 16_16_SNORM kind, the 8_8_8_8_UINT widths and the DST_SEL order make 33, 37 and 191 of 300 programs fail.

AI-assisted.
2026-11-22 01:37:53 +01:00
d9e629288a FUZZ-5: memory differential fuzzer (tools/mem_diff.py)
tools/mem_diff.py runs seeded s_load, s_buffer_load, buffer load/store/atomic and global load/store programs through a small reference model written from the RDNA2 addressing rules and through the translation in spirv_mini_interp, and compares the exported words and the whole final memory. Accesses are generated in bounds; OOB, OOB_SELECT, swizzle and the s_buffer_load truncation are left for GPU-confirmed rules.

spirv_mini_interp gains OpSConvert and 32-bit PhysicalStorageBuffer atomics (spec semantics, one invocation), with tests.

The fuzzer found the global_* negative-offset bug that #421 fixes; its global family and tests/test_mem_diff.py's regression test pass once #421 is in.

AI-assisted.
2026-11-22 00:52:32 +01:00