Commit Graph

434 Commits

Author SHA1 Message Date
d65ef538b5 Merge pull request #2260 from Linnard Alex Brown Jr.
# Conflicts:
#	docs/design.md
2026-11-22 15:10:26 -05:00
66ff7cb82a Merge pull request #2039 from Vonsek 2026-11-22 15:10:04 -05:00
c4eaab94c9 Merge pull request #1518 from Henrique Vinagre 2026-11-22 15:09:42 -05:00
94a6cba5e7 Merge pull request #1299 from Vonsek 2026-11-22 15:09:39 -05:00
58024a3a6f Merge pull request #896 from DiazE117 2026-11-22 15:09:38 -05:00
3eb80d77e3 Merge main into cov-d16fmt (#2039)
Conflicts:
	scripts/run_gpu_tests.py
	tests/semantic/regen_fixtures.py
	tests/test_shader_checks.py

AI-assisted.
2026-11-22 20:27:12 +01:00
a922e9edd4 tests: CPU value tests for 8/16-bit and 64/96/128-bit LDS accesses
Two wave32 GPU tests, cs_w32_lds_subdword (ds_write_b8/_b16 and their
_d16_hi forms, ds_read_u8/_i8/_u16/_i16) and cs_w32_lds_wide
(ds_write/ds_read _b64/_b96/_b128, ds_read2st64_b32), and a semantic
test that runs them in the SPIR-V interpreter against a byte-level LDS
model of the ISA rules, with three SPIR-V sabotages as negative
controls. These ops were checked only by lds_fuzz.py, which needs a GPU.

No translator change. RTX 4070 SUPER, driver 610.88: both dumps match.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:17:14 -06:00
10b88e8580 TEST-433: the skip message states the measured cause (16 live lanes behind a reported 32)
Measured by kapitche: Intel UHD 770 reports gl_SubgroupSize 32 in the fragment stage but runs 16 live invocations, so tiers A and B (32 or 64 live lanes) cannot hold. The skip keeps its condition (minimum subgroup below 32); deriving it from a measured live width is a follow-up.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:01:33 -05:00
654c5360af Revert "TEST-433: skip only devices whose subgroups are all narrower than 32 (the Intel 16-wide premise was wrong)"
This reverts commit e215380e1e.
2026-11-22 14:01:12 -05:00
e215380e1e TEST-433: skip only devices whose subgroups are all narrower than 32 (the Intel 16-wide premise was wrong)
The reporter corrected the probe: Intel UHD 770 reports a subgroup size of 32, so its tier A failures have an unknown cause and must not be skipped; only a device whose largest subgroup is below 32 (llvmpipe) is.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:00:50 -05:00
093b6c622a TEST-433: skip the tier A/B pixel fixtures where the fragment subgroup is narrower than 32 and cannot be required
Intel UHD 770 reports fragment subgroup 8..32 but runs pixel shaders 16 wide and cannot be held to 32, so reads
across 16 lanes (permlane, swizzle, bpermute) fail there. Tiers A and B mean exact on 32- or 64-lane subgroups.

The SHADER-10 row also loses the stale text the merge of #2260 left in it: the pre-TEST-319 A list (bpermute and
permlane "not GPU-tested here"), "Corpus coverage is not measured here", "the corpus ones are wave32", "geometry
shaders are not tested" and a repeated sentence, which the census and the GS fixtures (TEST-251) now contradict.

AI-assisted (Claude Code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 13:59:11 -05:00
676c6abae3 Merge main into coverage-gaps (#1299)
runtime/test/shaders/check.py
scripts/run_gpu_tests.py
tests/semantic/test_value_semantics.py

AI-assisted.
2026-11-22 19:52:12 +01:00
2426df3d5e GPU tests: wire cs_fma_fused in run_gpu_tests and accept GLSL Fma split on RADV 2026-11-22 18:34:11 +00:00
47449d3e29 Merge pull request #2729 from itsRevela
# Conflicts:
#	docs/design.md
2026-11-22 13:17:24 -05:00
bd759946d2 Merge pull request #2719 from Vonsek 2026-11-22 13:17:18 -05:00
7fe2918ac8 Merge pull request #2607 from Vonsek 2026-11-22 13:16:31 -05:00
13c5ee6209 Merge pull request #2550 from comp 2026-11-22 13:16:05 -05:00
40055efb95 Merge pull request #2531 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 13:15:58 -05:00
a0d3f0b086 Merge pull request #2502 from Vonsek 2026-11-22 13:15:46 -05:00
45e4a2e370 Merge pull request #2404 from S1m0ne1997 2026-11-22 13:15:04 -05:00
151c372ee1 Merge pull request #2395 from Matheus Gomes 2026-11-22 13:14:40 -05:00
d30267d4ed Merge pull request #2313 from Vonsek
# Conflicts:
#	docs/design.md
2026-11-22 13:13:48 -05:00
fbd598c2d0 Merge pull request #2187 from Vonsek 2026-11-22 13:13:12 -05:00
407a53923e Merge pull request #2048 from whoalin1
# Conflicts:
#	docs/testing.md
2026-11-22 13:12:54 -05:00
51d954a2cd Merge pull request #436 from S1m0ne1997 2026-11-22 13:12:27 -05:00
90c4ea6701 test: GPU fixtures for sub-dword MUBUF loads and GFX10_FORMAT_8_UINT (TEST-510)
The docs/design.md "Sub-dword MUBUF loads and GFX10_FORMAT_8_UINT" row was
CPU-checked only. Two single-thread compute fixtures in run_gpu_tests.py's
dump list now run the translated loads through Vulkan:

cs_buf_load_sub: buffer_load_ubyte/sbyte/ushort/sshort zero- and
sign-extended, the dword-crossing ushort at offset 3, and the RAW end check
by element size (a ubyte at 8 and a ushort at 7 of 8 bytes read 0; a
start-only check would read 0xeefe from the 0xee filler).

cs_buf_fmt8: tbuffer_load_format_x format:[BUF_FMT_8_UINT] at offsets 0..3,
one byte past the end, an INVALID V# format (0), and buffer_load_format_xyzw
with V# format 8_UINT and DST_SEL (X, 0, 1, 1), whose w is integer 1.

Both pass on an RTX 3070 Ti (driver 610.88); the expected words follow the
CPU test's byte table and rules. The row now says so; AMD hardware is still
unmeasured.
2026-11-22 12:02:47 -06:00
6e9eb1282e fix(tests): reject NaN in sampler mip readback
An unordered NaN never exceeded the absolute error limit, so a corrupt GPU result could pass. Require each readback channel to be within the existing tolerance.
2026-11-22 18:59:59 +01:00
64184fc835 Merge main into sdwa-dword-hi16 (#2187)
Conflicts:
	tests/semantic/test_value_semantics.py

AI-assisted.
2026-11-22 18:53:24 +01:00
29b1ba10d9 Tests: GPU test for 16-bit float v_cmpx compares (all 16 f16 predicates, e32 and e64)
Two pixel tests, ps_vcmpx_f16 (e32) and ps_vcmpx_f16_e64 (swapped operands),
on the operand pairs of ps_vcmp_f16: the EXEC result of each predicate, VCC
kept, and EXEC only ANDed. Words derived by hand in the headers; semantic
fixture and test added.

AI-assisted.
2026-11-22 18:37:20 +01:00
dd678a7681 Merge main into coverage-gaps (#1299)
Conflicts:
	tests/semantic/regen_fixtures.py

AI-assisted.
2026-11-22 18:29:28 +01:00
03d390fb95 Reject unexpected output changes in cross-device Tier C wave64 checks 2026-11-22 10:25:54 -07:00
6bbc893ea2 Tests: GPU test for 16-bit float VOPC compares (all 16 f16 predicates, e32 and e64)
Two pixel tests, ps_vcmp_f16 (e32, VCC) and ps_vcmp_f16_e64 (SGPR destination,
swapped operands), with NaN, +-0, +-inf, f16 denormals and junk high halves.
Words derived by hand in the headers; semantic fixture and test added.

AI-assisted.
2026-11-22 18:24:00 +01:00
44a5274369 fix(tests): honor spacing in compute fixture workgroup sizes
A spaced group tuple fell back to the default dimensions and changed the LocalSize emitted by the shader translator.
2026-11-22 18:15:42 +01:00
97afefdebc Merge remote-tracking branch 'origin/main' into shader-33-vs-inputs
# Conflicts:
#	tests/test_shader_checks.py
2026-11-22 18:06:20 +01:00
a012fe0c1f SHADER-337: GPU test of image_sample_o, image_sample_b_o and image_gather4_l_o with texel offsets
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>
2026-11-22 17:56:02 +01:00
33456ca4e7 fix(test): enable shaderFloat64 for compute SPIR-V that declares it
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.
2026-11-22 13:53:56 -03:00
0ec464b0e1 GPU tests: bind the --pc-tail-ubo block, so 128-byte push-constant devices run the tests
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>
2026-11-22 18:48:05 +02:00
ae21dddaa6 Merge pull request #2290 from 1TrickOmen 2026-11-22 11:43:51 -05:00
72758b9c5b Merge pull request #2270 from Tim Elery
# Conflicts:
#	docs/design.md
2026-11-22 11:43:39 -05:00
8f1370ce4a Merge pull request #2260 from Linnard Alex Brown Jr.
# Conflicts:
#	docs/design.md
2026-11-22 11:43:33 -05:00
693b8c63af Merge pull request #2209 from Vonsek 2026-11-22 11:42:51 -05:00
430d046487 Merge pull request #2151 from Faterek
# Conflicts:
#	docs/design.md
2026-11-22 11:42:17 -05:00
cdb907aa8f Merge pull request #2127 from AwkGrep256
# Conflicts:
#	docs/design.md
2026-11-22 11:42:03 -05:00
04a864baef Merge pull request #2085 from emirduran707 2026-11-22 11:41:37 -05:00
3d1a9889df Merge pull request #2049 from Shrey Ratna 2026-11-22 11:41:12 -05:00
5cf0a1743d Merge pull request #1880 from Vonsek 2026-11-22 11:40:43 -05:00
ea00498d3f Merge pull request #664 from WHOISJARDAS 2026-11-22 11:40:30 -05:00
9b9c634b31 rdna2spirv: image_get_resinfo returns what RDNA2 returns (2D depth 0, minified layers, 0 past the last level)
Measured on gfx1036 in #2204 (tools/image_query_probe.py): a 2D image's
depth word is 0, a 2D array's layer count is minified to
max(1, layers >> (BASE_LEVEL + level)), and past the last level width,
height and depth are 0. The translator wrote 1, the full layer count, and
queried OpImageQuerySizeLod past the view's levels (undefined).

Gen.resinfo_words now emits the hardware rule: the level is compared
unsigned with the level count, the size query uses level 0 when it is out of
range, and BASE_LEVEL comes from T# word 3 [15:12]. vk_texture_test's
stand-in T# gets BASE_LEVEL 0 to match its level-0 views. cs_resinfo expects
depth 0 and gains level 5 of five.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:39:10 +01:00
72d7e52dfa Translator: a mask copied to a VGPR respects EXEC (SHADER-21 part 2, #210) 2026-11-22 16:33:52 +00:00
fbe50b23fd rdna2spirv: align swizzled buffer addressing with native RDNA2 hardware (SHADER-343)
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.
2026-11-22 08:32:34 -08:00