594 Commits

Author SHA1 Message Date
cc846ba5ca Merge pull request #1302 from delysidemanYT1/gpu-runner-temp-error
GPU-RUNNER-TEMP-ERROR: report temporary directory creation failures
2026-12-01 16:14:58 +01:00
3fbc120df4 Merge pull request #1397 from whoalin1/mask-regs-data-read
rdna2spirv: a VALU data read of a lane-mask operand yields the wave's mask word
2026-12-01 12:53:35 +01:00
b3cc377020 translator: s_mov copies of EXEC keep the narrowing's tag through SGPR round-trips
Review follow-up on the mask-word gather gate (#1397): `s_mov_b32 s4,
exec_lo` under an unknown EXEC narrowing recorded nothing for s4, so the
later `s_mov_b32 exec_lo, s4` restore minted a fresh ("n", id) tag in
_exec_src_ex. mask_exec_sigs coverage then failed and the read kept this
lane's 0 / ~0 bit, while the equivalent literal `s_mov_b32 exec_lo, -1`
resolved to a constant half-state and gathered — register and literal
restores of the same runtime value disagreed.

_mov_sgpr_vals now returns an ("al", halves) alias for an EXEC source
whose half-state is an unknown narrowing, the same scheme saveexec uses:
exec_lo gives (state, None), exec_hi (None, state), exec gives each half
in its own register for b64 moves. _exec_src_ex already resolves those
aliases, so the restore reproduces the original tag and the gather stays
exact; untracked SGPR sources still mint a fresh narrowing and stay
conservative.

Tests: two semantic cases (wave32 and wave64) assert the register
round-trip gathers OpGroupNonUniformBitwiseOr identically to the literal
-1 restore; cs_exec_copy.asm (+ fixture, check.py/run_gpu_tests.py dump
entries) stores the mask word, exec_lo's own word and the literal-restore
word side by side on real hardware — PASS on RTX 4070 and Radeon
(64-wide), wave64 exec filters 9/9 on AMD.

Co-Authored-By: Devin <noreply@cognition.ai>
2026-11-30 22:22:44 +00:00
d99ba5c095 Merge main: drop the macos job as main does, keep this PR's runtime.yml path filters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 20:24:47 +01:00
08e42a5160 Merge pull request #2691 from fiestorra/fix/paravirtual-exp2-skip
runner: skip the exact exp2 case on Apple's Paravirtual device (re-opened #2641, closed by an accidental push)
2026-11-30 17:28:44 +01:00
35e75b7a9d Merge pull request #2731 from OreoFR/carry/pr-2174
reprend #2174: rdna2spirv: seed the POPS collision word so the wait loop ends (SHADER-POPS-COLLISION-SEED)
2026-11-30 17:24:02 +01:00
2afbcef3c0 runner: skip the exact exp2 case on Apple's Paravirtual device
That device's OpExp2 lands two ulps low on 2^-125, so the bit-exact fixture cannot
hold there; real Apple hardware returns the exact pattern (M5 Max, MoltenVK 1.4.2,
passes the same case), which is why this skips by device instead of widening the
check for everyone.

The skip reads the device line the harness already prints beside the subgroup line
that wide_pixel_skip reads, so it needs no new plumbing.

Written with an AI assistant.
2026-11-30 15:39:20 +01:00
f474c74b04 Merge origin/main (f9f3ec4c6) into the carry of #2174
Current main after #2566. New conflict on top of the earlier carry merge:
tools/rdna2spirv.py, _translate (straight-line and CFG paths): main passes
extra=meta_extra to _shader_meta.collect and reads the literal samplers
after it; the PR's g.note_pops_word(insns) runs right after that block,
before fit_shared_memory / needs_barrier_rounds as before.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:30:43 +01:00
c3f63575a2 Merge origin/main (f9f3ec4c6) into the carry of #1726
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: TanmaySatyam <lavidivwaker@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:19:18 +01:00
ab09fd1f86 Merge main: keep --no-ftz32 and --integer-dot-fallback next to --explicit-lod-bias
tools/rdna2spirv.py: main's float-only typed implicit sample (OpImageSampleImplicitLod)
is used only without --explicit-lod-bias; with the flag the Grad path still
scales the derivatives by the S# bias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 11:46:44 +01:00
8db8335d23 tests/ci: fix llvmpipe skip on cs_w64x_dynamic_r32_uint, Set 0 binding 29 counts, and D16S8 table row 2026-11-29 12:59:52 -05:00
eff40832ef Merge remote-tracking branch 'refs/remotes/mandy/main' into fix/rendering-correctness
# Conflicts:
#	runtime/shims/d3d12_com.cpp
#	runtime/shims/d3d12_vulkan_device.cpp
#	runtime/src/command_list.h
#	runtime/src/vulkan_replay.h
#	runtime/test/gfx10_descriptors_test.cpp
2026-11-29 11:51:06 -05:00
f051ae5183 d3d12/tests: fix Windows MSVC build, CopyMemory collision, copy parity guard, and --no-ftz32 probe 2026-11-29 11:41:49 -05:00
d00d46c1e4 Merge pull request #1839 from delysidemanYT1/gpu-spirv-as-diagnostics
GPU-SPIRV-AS-DIAGNOSTICS: Preserve spirv-as diagnostics containing undecodable bytes
2026-11-29 16:43:01 +01:00
ce792f55fb Preserve all 32 bits in dynamic R32_UINT loads 2026-11-29 09:38:14 -05:00
173c5d41a6 Merge origin/main into carry/pr-2174
vk_harness: main's has_cap scan of both stages, plus needs_interlock = has_cap(fs_code, 5378) from the PR.

Co-authored-by: QemmHD <290605352+QemmHD@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 13:51:23 +01:00
be581760b2 Merge origin/main into #1726 (carry prep)
scripts/run_gpu_tests.py: PR's module-level tables kept; main's new dumps (cs_w32_cvt_f16_mods, cs_dpp_cmpx, cs_w32_wrxchg2_ext, cs_w32_wrxchg2st64, cs_w64x_partial_swizzle) added to CS_DUMP_WANTS / CS_DUMP_NON_WAVE64 / CS_DUMP_HEXWORDS, and main's partial-wave subgroup size (32 under emulation) kept.

Co-authored-by: TanmaySatyam <248538550+TanmaySatyam@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 09:41:10 +01:00
bf458bbcb3 Merge remote-tracking branch 'origin/main' into lb
# Conflicts:
#	docs/design.md
2026-11-29 04:52:45 +01:00
9fac739da4 Merge pull request #2239 from zmasi/fix/rdna2spirv-f16-interp-computed-ij
rdna2spirv: lower computed I/J barycentrics under --f16-interp-fallback (SHADER-F16-INTERP-COMPUTED-IJ)
2026-11-29 04:36:24 +01:00
ff9948f652 Merge pull request #1841 from delysidemanYT1/gpu-disasm-scratch-error
GPU-DISASM-SCRATCH-ERROR: Report GPU disassembly staging failures before translation
2026-11-29 00:50:07 +01:00
06e5327291 Merge origin/main into fix/rdna2spirv-f16-interp-computed-ij 2026-11-28 13:59:35 -08:00
3a7dc6126b Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	.github/workflows/runtime.yml
2026-11-28 13:34:11 +01:00
c9f097eb50 Merge pull request #2419 from ProjectLeonida/fix/cvt-f16-denorm-and-clamp
rdna2spirv: preserve f16 denormals, NaN payloads, and bit-exact clamp in conversions (SHADER-CVT-F16-DENORM-AND-MODS)
2026-11-28 12:54:01 +01:00
87f12b9dcc Merge pull request #1587 from exoticLgk/fix-exp-f32-denorm
rdna2spirv: flush v_exp_f32 denormal results (SHADER-EXP-F32-DENORM)
2026-11-28 12:52:59 +01:00
11df2b0069 Merge pull request #1112 from klikso/carry/shader-f64-omods
rdna2spirv: the binary64 VALU ops take clamp and nothing else from their omod (SHADER-F64-OMODS-CARRY)
2026-11-28 12:52:22 +01:00
f77b4d80d0 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-28 03:05:44 -08:00
ca0827cdc2 Merge pull request #2026 from alexandersato0830/codex/gpu-runner-replay-no-cases
Reject GPU disassembly replays with no runnable tests (GPU-RUNNER-REPLAY-NO-CASES)
2026-11-28 09:04:32 +01:00
20264ffa0a Merge pull request #1978 from vinceychu/fix/run-gpu-tests-versioned-llvm-mc
run_gpu_tests: find a versioned llvm-mc when --llvm-mc and LLVM_MC are unset (TEST-RUN-GPU-TESTS-VERSIONED-LLVM-MC)
2026-11-28 09:04:22 +01:00
8509d368b1 Merge pull request #1333 from delysidemanYT1/gpu-runner-probe-json
GPU-RUNNER-PROBE-JSON: Treat valid JSON that is not an object as an u…
2026-11-28 09:03:12 +01:00
7734dc8e45 Merge pull request #1310 from delysidemanYT1/gpu-runner-output-decode
GPU-RUNNER-OUTPUT-DECODE: keep diagnostics with undecodable bytes
2026-11-28 09:03:01 +01:00
25fd8e4776 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-27 23:02:20 -08:00
27524a5e5b Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk 2026-11-28 02:57:41 +01:00
3e4d890c56 Merge pull request #2435 from quartz-heron-58/mesh-serial-waves
rdna2spirv: --mesh-serial-waves, an emulated mesh program's waves one after the other (SHADER-W64-MESH-SERIAL-WAVES)
2026-11-27 23:50:27 +01:00
e2377070d3 GPU tests: give cs_pk_mul_lo_const its 128 words, keep the exit message of a dump row
cs_pk_mul_lo_const runs 32 lanes that each store 16 bytes, 128 words, but
run_gpu_tests.py and check.py ran it without VKC_OUT_WORDS, so
vk_compute_test gave it the default 64 and lanes 16-31 wrote past the
buffer through its device address (GPU-AV:
VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819). Both runners now pass
VKC_OUT_WORDS=128 (check.PK_MUL_LO_ENV), and the fixture's Run line
says so.

run_gpu_tests.py's dump rows (the bounds group, cs_heap_init,
cs_user_sgprs) showed the printed words whenever there were any. A run
that printed the right words and then exited non-zero (validation
errors) was a FAIL that showed only the expected words. dump_result now
reports "exit N: <output>" for a non-zero exit.

Found by kevincommits in the coordination issue (#1608).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 04:36:05 -06:00
dbdef2efd7 mesh-serial-waves: a GPU fixture whose two waves run loops of different length
ms_w64x_wave_loops: each wave loops while a wave-wide count is not 0, 5 iterations in wave 0 and 9 in
wave 1, so under --wave64-emulate the waves reach different numbers of workgroup barriers. Written after
stalls were reported with the serial form on an RTX 2070 SUPER (issue 1608). On an RTX 4080 (NVIDIA
621.24) it draws 4096/4096 pixels exact side by side and in series; that does not explain the stalls.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:29:50 +08:00
fbceecf042 mesh-serial-waves: unit tests, the design row, the GPU runner's switch
tests/test_mesh_serial_waves.py: the module shape of a program that
qualifies (64 invocations, the pass loop, the index from the built-in,
the exchange's own place, per-pass copies of the exports, one
OpSetMeshOutputsEXT), that every initialised Function variable is set
again per pass, and that ms_wave_info_s3 (LDS), a 32-thread program,
native wave64 and --mesh-compute are unchanged by the flag.

LEONIDA_MESH_SERIAL_WAVES=1 is read by scripts/run_gpu_tests.py, like the
other translation switches, and no longer by rdna2spirv.py itself.
docs/design.md and docs/testing.md say what the flag does and how it is
tested; conftest gives ms_w64x_wave_votes its 128-vertex PSV0.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 11:29:22 +08:00
e954dc8c16 mesh-serial-waves: a GPU fixture whose waves vote differently; no memory writes in a serial program (work in progress)
ms_w64x_wave_votes: two waves take different branches, each with its own
ballot count (and a v_readfirstlane in the second), and the triangle's
vertices come from threads 0 and 1 of the first wave and thread 64 of the
second, so ms_tri's picture needs both waves to have run their own branch
with their own votes. It passes in the side-by-side form and with
--mesh-serial-waves on an RTX 4080 (NVIDIA 621.24).

A program with a store or an atomic to memory keeps the side-by-side
form, as one with LDS does: its waves could pass each other something.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 11:13:58 +08:00
df294dd8a1 rdna2spirv: preserve f16 denormals, NaN payloads, and bit-exact clamp in conversions (SHADER-CVT-F16-DENORM-AND-MODS)
Route v_cvt_f32_f16 through f16_in_bits so SDWA/DPP half selection, subnormals, neg/abs,
and IEEE=0 NaN sign/payload bits are preserved without raw UnpackHalf2x16 flush risk,
and clamp v_cvt_f16_f32 and v_div_fixup_f16 directly on rounded f16 bits via shared
clamp_f16_bits. Verified on RTX 3060 (driver 617.14, native + --wave64-emulate: fixed
first word 0x7FFFFFFF -> 0xFFC4A000 on cs_w32_cvt_f16_mods), 13/13 new semantic tests,
501-module semantic suite (6,385 passed, 0 failed), and 100/100 real corpus shaders
passing spirv-val.

AI-assisted: Codex gpt-6.2-sol + Antigravity gemini-4-neon.
2026-11-26 22:11:21 -03:00
0dcf650d1c Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/rdna2spirv.py
2026-11-27 00:51:00 +01:00
ae364461bf rdna2spirv, docs, tests: address #2239 review findings and 1080p precision check 2026-11-26 15:45:23 -08:00
6f5086f2f8 Merge remote-tracking branch 'origin/main' into fix/rdna2spirv-f16-interp-computed-ij 2026-11-26 15:24:47 -08:00
aa3e217ac6 run_gpu_tests: find a versioned llvm-mc when --llvm-mc and LLVM_MC are unset (TEST-RUN-GPU-TESTS-VERSIONED-LLVM-MC)
run_gpu_tests.py and bench_wave64.py defaulted --llvm-mc to
os.environ.get("LLVM_MC", "llvm-mc"), so mc_command() never reached
versioned_llvm_mc(). With only Ubuntu's llvm-21 installed (llvm-mc-21 and
/usr/lib/llvm-21/bin/llvm-mc, no plain llvm-mc) the suite stopped with the
message that says that install is found without further setup. Leave the
default to mc_command(), and add a test that no tool pins the plain name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP
2026-11-26 14:31:58 -05:00
cd8d9aa7a8 rdna2spirv: lower computed I/J barycentrics under --f16-interp-fallback
Lower computed v_interp_p1/p2 (I, J) pairs under --f16-interp-fallback (without --bary-fallback) without PerVertexKHR or a geometry shader by hoisting OpDPdxFine/OpDPdyFine screen-quad barycentric and attribute derivatives into uniform %entry (OpCapability DerivativeControl, guarded by an integer IEEE-754 normal determinant check) and evaluating P_0 + I*P_10 + J*P_20 per site.
2026-11-26 01:57:43 -08:00
15350f6da6 rdna2spirv: seed the POPS collision word so the wait loop ends (SHADER-POPS-COLLISION-SEED)
A pixel shader with an ordered section (POPS) reads the hardware's collision word, which sits in the SGPR after the
user SGPRs and the primitive mask: collision wave id in bits 0-9, this wave's id in bits 16-25, overlap in bit 31.
The program waits until wave_id + ~collision_id is below src_pops_exiting_wave_id + ~collision_id (unsigned). The
translator orders the section with fragment-shader interlock and reads the exiting id as 0, and the word was
whatever the push constants held at that dword, usually 0. With wave id == collision id the test is
0xffffffff < 0xffffffff, never true, so a wave that reached the loop ran it until the loop guard (65,536 rounds).
The overlap test before the loop skips it whenever a lane is on in EXEC, so it is a wave (a host subgroup) with EXEC
all off there; on 32-wide subgroups that is either half of a wave64 program whose lanes are all off.

The SGPR is now the source of the program's wave-id extract (s_bfe_u32 with field 0x000a0010) when the program reads
that SGPR's entry value (shader_meta's user_sgpr_reads), and it is set at entry to 0x00010000 (no overlap, wave id 1,
collision id 0): the loop leaves after one round. A program without that extract keeps the old behaviour.

- tools/rdna2spirv.py: pops_collision_sgpr and the entry store.
- tests/semantic/test_pops_collision_seed.py: subgroups of 64 and 32 lanes, with and without the seed, and the SGPR
  search; the GPU fixture runtime/test/shaders/ps_pops_wait_loop.asm (check.py, run_gpu_tests.py) and its llvm-mc
  listing.
- tests/semantic/spirv_wave_interp.py: the interlock instructions run as no-ops (a run has no other primitive).
- runtime/test/vk_harness.cpp: a fragment shader that needs pixel interlock on a device without it is unsupported
  (77), as for barycentrics.
- docs/design.md, docs/d3d12_vulkan.md: the POPS rows.

GPU: on an RTX 4070 SUPER the fixture gives 4096 of 4096 pixels as expected; with the seed taken out every pixel's
round count is 0x00010000.

Idea from Marvisak/VIctory 7ac1f54, written anew.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
2026-11-25 19:45:31 -05:00
b145659304 Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/vk_subgroup_info.py
2026-11-25 23:54:57 +01:00
c5f1807515 rdna2spirv: translate v_cmpx in DPP form (SHADER-VOPCX-DPP)
Extend #957's DPP VOPC compare to v_cmpx: the same lane selection, with the
result written to EXEC. v_cmpx prints no destination, so src0 is its first
operand. Only the forms where every lane writes its bit are taken, as for
v_cmp. 78 pipeline-library pixel shaders of 1.0.2.1 were refused for it; all
78 now translate and pass spirv-val.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 23:36:00 +01:00
0bae6f545a Merge main into wave64-partial-wave-zero
scripts/run_gpu_tests.py: main added cs_w32_wrxchg2_ext and
cs_w32_wrxchg2st64 to the same name list; keep main's list and add
cs_w64x_partial_swizzle to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:37:28 -05:00
d96b3a8644 Merge pull request #857 from ohshitwaddup/tests/gpu-wrxchg2-b32
tests: GPU fixtures for the ds_wrxchg2_rtn_b32 pair cases and ds_wrxchg2st64_rtn_b32 (TEST-WRXCHG2-B32-EXT)
2026-11-25 22:28:36 +01:00
fb5796b8ed Merge pull request #609 from TuroYT/fix/gpu-runner-tbuffer-verdict
run_gpu_tests: record the cs_tbuffer_store verdict (GPU-RUNNER-TBUFFER-VERDICT)
2026-11-25 22:27:40 +01:00
721a3b85ae Merge main into wave64-partial-wave-zero
Conflict in scripts/run_gpu_tests.py: the dump-test name list gained
cs_w64x_cmp_sdst on main and cs_w64x_partial_swizzle here; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:37:20 -05:00