Commit Graph

173 Commits

Author SHA1 Message Date
524bb1fb7b Merge pull request #862 from sanuk369 2026-11-21 23:15:35 -05:00
0c84bff89a GPU tests: a device with too few push constant bytes skips the texture tests
vk_texture_test returned 1 instead of the unsupported code 77 when
maxPushConstantsSize is below the 144 bytes it needs (only --two-mip got 77),
and run_gpu_tests.py treated any non-zero exit of the bindless texture tests and
ps_gather_wrap as a failure. On a 128-byte device that reported 8 FAILs instead
of SKIPs. Both now skip with the device's own reason; check.py already mapped 77
to a skip.
2026-11-22 09:25:03 +05:30
48e086cc39 Merge pull request #835 from kapitche 2026-11-21 22:48:36 -05:00
2867a3b545 Merge pull request #253 from AlxcBTW 2026-11-21 22:48:27 -05:00
1552ae7278 Merge remote-tracking branch 'origin/main' into bpw32-main
# Conflicts:
#	docs/design.md
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
2026-11-22 04:42:52 +01:00
6c5550d456 GPU tests: give each test program a time limit, so a GPU hang fails one test instead of stalling the suite
run_gpu_tests.py (run_cmd) and check.py (run, the mesh harness) start each GPU program with
LEONIDA_GPU_TEST_TIMEOUT seconds (default 120, 0 = no limit). A program that runs longer is
killed and its test fails with 'timed out after N s'. The translator step over the whole suite
keeps no limit. Seen on an Intel UHD 770, where cs_barrier_divergent can hang vk_compute_test.
2026-11-21 22:37:45 -05:00
b07409135d Merge pull request #677 from nicolas 2026-11-21 22:37:39 -05:00
52a357c604 Merge pull request #341 from AlxcBTW 2026-11-21 22:37:36 -05:00
710c5e724b Merge remote-tracking branch 'origin/main' into shader-36-gather-wrap
# Conflicts:
#	scripts/run_gpu_tests.py
#	tests/test_shader_checks.py
2026-11-22 04:27:11 +01:00
ebbce72855 Merge remote-tracking branch 'origin/main' into bpw32-main
# Conflicts:
#	docs/design.md
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
2026-11-22 04:22:25 +01:00
84e1d2ebe9 Merge pull request #769 from mohamedsaad.lahlou 2026-11-21 22:08:46 -05:00
10f5b63a26 Merge updated GPU runner checks while preserving packed-format coverage 2026-11-21 20:07:25 -07:00
1b6cc3f2c2 Translator: ds_read_u8/i8_d16[_hi] 8-bit LDS reads into a 16-bit half (SHADER-85)
ds_read_u8_d16, ds_read_u8_d16_hi, ds_read_i8_d16 and ds_read_i8_d16_hi
(RDNA2 DS opcodes 162-165) were rejected. They reuse the u8/i8/u16_d16
path: the byte is zero- or sign-extended 8->16 into one half of the
destination and the other half is kept.

Tests: CPU value test on the new cs_w32_lds_u8_d16 fixture (mini
interpreter now accepts Workgroup variables for one invocation), GPU
dump cs_w32_lds_u8_d16.asm registered in check.py and run_gpu_tests.py,
lds_fuzz generates the four reads. Contract row in docs/design.md and
shader_validation.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:02:47 -05:00
9f8cac64f5 Tests: isolate shader inputs when reusing GPU test work 2026-11-22 03:46:04 +01:00
5879d22055 Merge remote-tracking branch 'origin/main' into shader-36-gather-wrap
# Conflicts:
#	scripts/run_gpu_tests.py
#	tests/test_shader_checks.py
2026-11-22 03:41:57 +01:00
875aecb46e Merge remote-tracking branch 'origin/main' into bpw32-main
# Conflicts:
#	docs/design.md
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
#	tests/test_run_gpu_tests.py
2026-11-22 03:38:09 +01:00
b0476248e8 Merge pull request #720 from fearkov 2026-11-21 21:37:52 -05:00
fcd51e74ba Merge pull request #708 from Spaghetih 2026-11-21 21:37:50 -05:00
1df0045b5c Merge pull request #500 from troythedecoyx 2026-11-21 21:37:44 -05:00
fcea57d5d9 Merge pull request #455 from fearkov 2026-11-21 21:37:44 -05:00
48f2164427 Merge pull request #399 from fearkov 2026-11-21 21:37:44 -05:00
f4fcbdc2bb Tests: run_gpu_tests.py reports a pixel test the device can't run once
A vk_harness exit 77 appended the SKIP row twice, so the shader was listed twice and the summary counted it twice (n/total and skipped).
2026-11-21 22:16:26 -04:00
ce87bf7ede Merge upstream GPU runner coverage into the packed format fixture branch 2026-11-21 19:14:27 -07:00
54d3ea1a88 GPU test: s_barrier sites in different wave-uniform branches meet (SHADER-91)
cs_barrier_divergent: wave32, 128 threads. Wave 0 and waves 1-3 take different branches, each with its own s_barrier; on RDNA they count against the same workgroup barrier, so wave 0 reads what wave 3 wrote to LDS (out[i] = 127 - i). Registered in check.py and scripts/run_gpu_tests.py as a wave32 dump that doesn't need 32-lane subgroups.

Passes on an RTX 4070 Ti with the current translator; it guards the behaviour for any change to barrier handling.

AI-assisted.
2026-11-22 03:12:48 +01:00
b707035ca0 Tests: vk_texture_test enables shaderResourceMinLod for a MinLod clamp
A shader that declares MinLod (image_sample_d_cl) needs the feature, and without it the validation layer reports VUID-VkShaderModuleCreateInfo-pCode-08740. A device without it is now a skip (exit 77), as in the other texture tests.
2026-11-21 22:11:02 -04:00
bd880b85cc Tests: a16 bias, d_cl and depth compare samples on a GPU 2026-11-21 22:10:52 -04:00
8de6eb2875 Tests: vk_texture_test dref checks depth compare samples on a GPU 2026-11-21 22:10:21 -04:00
ad6bb01d06 GPU and value test for SHADER-46: s_ff0/s_ff1_i32_b32 of an immediate
The follow-up to #349 that the #374 coordination note asked for. #349
fixed s_ff0_i32_b32 reading an inline constant or literal as a lane mask;
this adds a hardware and interpreter check for it.

ps_sff_imm runs s_ff1_i32_b32 on the inline constant 4 and the literal
0x00100000, and s_ff0_i32_b32 on the inline constant 61 and the literal
0x0000ffff: 2, 1, 20, 16. Read as a lane mask (all ones or zero from bit
0) the two s_ff0 words are -1; the s_ff1 words guard the path that was
already right.

- runtime/test/shaders/ps_sff_imm.asm, with its expected words in
  check.py and run_gpu_tests.py
- the fixture (regen_fixtures.py) and a value test in
  tests/semantic/test_value_semantics.py that runs it through the
  interpreter, with an independent reference

AI-assisted (Claude Code). Tested on NVIDIA GeForce RTX 4060 Ti (subgroup
32), driver 32.0.16.2124, Windows 11: see the PR for the run on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 20:10:09 -06:00
2736407127 Merge pull request #665 from mohamedsaad.lahlou 2026-11-21 21:08:36 -05:00
6d2303e0a7 Merge remote-tracking branch 'origin/main' into shader-36-gather-wrap
# Conflicts:
#	scripts/run_gpu_tests.py
#	tests/test_shader_checks.py
2026-11-22 03:02:50 +01:00
a71caa846f Merge remote-tracking branch 'origin/main' into bpw32-main
# Conflicts:
#	runtime/test/shaders/check.py
2026-11-22 03:02:48 +01:00
8cf0a8f6fc Run the packed 10:10:10:2 fixture in both GPU test suites 2026-11-21 18:46:06 -07:00
a412225fcc Tests: reject unmatched GPU test filters 2026-11-22 02:43:37 +01:00
c0a93d29f0 Merge pull request #628 from SirAmong 2026-11-21 20:39:01 -05:00
e5d9f28a4f Merge pull request #489 from eIBart0 2026-11-21 20:38:47 -05:00
b95f0f8b25 Merge pull request #398 from troythedecoyx 2026-11-21 20:38:43 -05:00
dbb3319681 Shader: pack d16 image sample/gather results with integer f32->f16 RTE
Work around an amdvlk64 pipeline-creation crash (0xC0000005 on RX 9070 XT)
triggered when GLSL.std.450 PackHalf2x16 on an OpImageSampleExplicitLod d16
result feeds a structured loop (OpLoopMerge inside OpSelectionMerge) using
OpGroupNonUniformAny.

Replace PackHalf2x16 at the two d16 image_gather4*/image_sample* sites in
tools/rdna2spirv.py with a branchless pure-integer IEEE-754 binary16 RTE
packer (Gen.f32_to_f16_int / Gen.pack_f16_pair_int). Leave all other
PackHalf2x16 call sites unchanged.

Add unit tests covering edge cases and a 58,368-value sweep across all 256
exponents (tests/test_d16_pack.py), SPIR-V translation/validation tests for
d16 image_sample and image_gather4 (tests/test_translate.py), and a synthetic
GPU sample shader (runtime/test/shaders/ps_texture_sample_d16.asm).
2026-11-21 22:24:31 -03:00
b3688332f2 Merge origin/main into fuzz-3-f32-valu (regen_fixtures.py: keep ps_f32_mods and ps_f64_mods)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:22:45 +01:00
0726e3f26b Translator: ds_permute_b32, the forward (scatter) cross-lane permute (SHADER-90)
Each source lane on in EXEC sends its data to lane ((addr + offset) >> 2) mod 32
of its own half (like ds_bpermute_b32); a destination nobody targets gets 0, an
off destination keeps its VDST. Highest-numbered source wins a collision.
Native: per-source shuffles with a ballot guard for missing lanes; wave64
emulation: two buffer rounds and a %x_perm variable.

Tests: tests/semantic/test_ds_permute.py, GPU tests cs_w32_permute and
cs_w64x_permute. Contract row in docs/design.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 20:22:15 -05:00
b92801178b GPU tests: run #300's cs_cvt_f32_sat on every input through VKC_SGPRS
cs_cvt_f32_sat (#300) takes its binary32 input in s4, so neither runner
ran it. Now both do: one dispatch per input of
tests/semantic/test_float_to_int.py (check.CVT_F32_SAT_CASES), each
judged on both words (v_cvt_u32_f32 in out[0], v_cvt_i32_f32 in out[1]).

- check.cvt_f32_sat_test() and the run_gpu_tests.py branch report
  "16/16 inputs exact", or how many were wrong and the first one.
- tests/test_shader_checks.py: the fake device answers from the word in
  VKC_SGPRS; every input must be sent, one wrong input must fail and be
  named, and the table must equal the interpreter test's CASES.

On NVIDIA this checks the fixed translation, but it cannot catch the old
bug: with the translator from before #300 (273e53c^1) the RTX 4060 Ti
also gives 16/16, since SPIR-V leaves an out-of-range conversion
undefined and this hardware saturates anyway. A driver that does not
(@EchoTD's RADV case on #300, constant inputs) is where it can fail;
tests/semantic/test_float_to_int.py pins the rule itself.

AI-assisted (Claude Code). Tested on NVIDIA GeForce RTX 4060 Ti (Ada,
subgroup 32), driver 32.0.16.2124, Windows 11, on main d937b7f:
run_gpu_tests.py cs_cvt_f32_sat "16/16 inputs exact" natively and with
LEONIDA_W64_EMULATE=1; check.py cs_cvt_f32_sat ok;
tests/test_shader_checks.py 18/18.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 19:22:13 -06:00
95ab84432d vk_compute_test: seed s4.. from VKC_SGPRS, so a compute test can take an input word
vk_compute_test always put the output V# in s[0:3] and zero in every
other user SGPR, so a compute test shader could not be given an input
word: #300's cs_cvt_f32_sat reads its float from s4 and could only be
checked on a GPU by building one shader variant per input by hand.

- VKC_SGPRS=w4,w5,... sets s4, s5, ... up to s31 (s[0:3] stay the output
  V#), with the same syntax and checks as vk_harness's VKH_SGPRS: decimal
  or 0x hex, no sign, nothing above 32 bits, no trailing comma, at most
  28 words; anything else exits 2 with a message.
- cs_user_sgprs.asm declares eight user SGPRs (RSRC2 0x8090) and stores
  s4..s7 back. Both runners seed it with 0x4f000000,0xdeadbeef,7,
  0xffffffff (check.USER_SGPRS) and expect those words, then the
  0xEEEEEEEE fill.
- check.compute_test() takes an env for vk_compute_test.
- tests/test_shader_checks.py: the fake harness only answers
  cs_user_sgprs with the seeded words when VKC_SGPRS was passed, and no
  other test may get VKC_SGPRS.

AI-assisted (Claude Code). Tested on NVIDIA GeForce RTX 4060 Ti (Ada,
subgroup 32), driver 32.0.16.2124, Windows 11, on main d937b7f:
- run_gpu_tests.py cs_user_sgprs PASS natively and with
  LEONIDA_W64_EMULATE=1; check.py cs_user_sgprs ok
- vk_compute_test directly: unset -> s4..s7 read 0; "5" sets s4 only;
  28 words accepted; "1,2,", "-1", "0x1ffffffff", "abc" and 29 words
  exit 2
- test_shader_checks.py fails (7) if check.py stops passing VKC_SGPRS
- full suite: see the PR

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 19:22:03 -06:00
7a23552d7e Merge remote-tracking branch 'origin/main' into shader-36-gather-wrap
# Conflicts:
#	docs/design.md
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
#	tests/test_shader_checks.py
2026-11-22 02:21:40 +01:00
8521b0b465 Merge origin/main into fuzz-3-f32-valu
spirv_mini_interp.py: keep main's _F32 (sNaN bits, #533) and its vector-aware
RoundEven/Floor/Ceil/Trunc; keep this branch's fma_f32, OpFDiv and
Exp2/Log2/Sqrt/InverseSqrt. regen_fixtures.py: both sides' shaders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:21:00 +01:00
67ac056292 Merge remote-tracking branch 'origin/main' into bpw32-main
# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
2026-11-22 02:14:15 +01:00
81f0bab87c Merge pull request #549 from NRXM 2026-11-21 20:09:19 -05:00
6a55f981e0 Merge pull request #503 from Tomgamer 2026-11-21 20:09:16 -05:00
2720df12a1 Merge origin/main into f64-output-modifiers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
#	tests/semantic/regen_fixtures.py
2026-11-22 02:07:19 +01:00
9cc407c84d tests: skip the wave32 lane-mask dumps below 32 lanes (llvmpipe CI)
cs_wqm_w32 (SHADER-34) and cs_w32_lane_wrap (SHADER-52) check 32-lane
EXEC/VCC masks and lane selects. On Mesa llvmpipe, whose compute
subgroups are 8 wide, they can't produce their words, and the
"GPU tests on llvmpipe" step in runtime.yml has failed on main since
91b36cf. Skip them where vk_compute_test reports a widest subgroup
below 32 lanes, the rule ps_bitmask_perm already uses, in check.py and
run_gpu_tests.py (which reuses check.py's helper). Devices with 32 or
more lanes still run and judge them.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7JEiKsTUaHQbCTdc4Eghy
(cherry picked from commit be466779a2a1e988f58803ab1eedca6cc6a07375)
2026-11-21 22:06:20 -03:00
c7ea4b4aaa Merge the upstream two-mip fixture with the a16 gradient test
Keep both texture draws in the standalone checker, the GPU runner and its expected case count.
2026-11-22 02:04:42 +01:00
a4996c7ab4 Merge origin/main into f64-output-modifiers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 01:55:11 +01:00