Commit Graph

169 Commits

Author SHA1 Message Date
a6d4071781 Merge pull request #4005 from TreXito
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:10:19 -05:00
0a2d099ab4 Merge pull request #3982 from shelbykb2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:10:09 -05:00
a8a59bd647 Merge pull request #3972 from tedin7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:10:03 -05:00
d040db9876 Merge pull request #3857 from TreXito
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:57 -05:00
e2ecb50cf1 Merge pull request #3855 from Oleg Makarov
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:56 -05:00
dcac3e73a0 Merge pull request #3838 from AwkGrep256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:46 -05:00
b639b07aba Merge pull request #3837 from Maxime Mansiet
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:46 -05:00
3beddb7a91 Merge pull request #3830 from Sc4ros
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:42 -05:00
9839d6ad90 Merge pull request #3679 from Kevin Morales
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:15 -05:00
77d59085d9 Merge pull request #3260 from Kacper Serewis
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:05 -05:00
5e2ea6cfa2 Merge pull request #3248 from 0xTehuti
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:05 -05:00
af1d6a744f Merge pull request #3004 from Moaaz Gewili
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design.md
#	docs/testing.md
2026-11-22 23:06:38 -05:00
5987f76295 Merge pull request #2909 from Jolymmiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:06:23 -05:00
2eb5669566 Merge pull request #837 from DANISBR1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/design.md
2026-11-22 23:04:57 -05:00
65c3e1e3c2 Merge main (2d3369a4) into test/877-compute-validation
vk_compute_test.cpp: keep both includes (vk_validation.h from this branch,
cs_wave_probe_spv.h from main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:49:50 +00:00
b136ee4680 Tests: check Microsoft's recorded answers where Wine and Proton have no reference
Under Wine the host D3D12 is vkd3d and under Proton vkd3d-proton, and
Proton's EnumWarpAdapter returns the hardware adapter, so the host and
WARP references six tests compare with are not Microsoft's runtime:
d3d12_r9g9b9e5_uav, d3d12_method_variants and d3d12_sampler2 fail under
Proton (the last two crash inside vkd3d-proton), d3d12_fence_timing and
d3d12_subresource_copy under both, d3d12_private_data under Wine.

The six skip the host comparison there with hostwine::host_is_wine() and
check the layer against Microsoft's answers recorded in the test instead,
so Wine and Proton still check values. d3d12_r9g9b9e5_uav gets WARP's
words for its six clear cases, from the packing rule in
docs/d3d12_vulkan.md. d3d12_subresource_copy and d3d12_private_data get
answer tables, taken from the records that Windows runs on NVIDIA and AMD
compared with Microsoft's runtime with no mismatches; LEONIDA_D3D49_DUMP=1
prints the host's record on Windows to regenerate them. The other three
already had recorded answers. Windows still compares with the live
runtime too.
2026-11-22 20:40:59 -07:00
c3d801b456 docs: required subgroup stages per AMD GPU generation; RDNA2 on Windows can't require pixel or mesh sizes
The "Which stages can be required" row in d3d12_vulkan.md said the AMD Windows driver reports
FRAGMENT | COMPUTE | TASK | MESH, from a Radeon 880M (RDNA3.5). On an RX 6800 (RDNA2, gfx1030) with the
same 26.11.2 release (Windows driver 32.0.21045.29003) it reports COMPUTE only, sizes 32..64, default 64,
measured 2026-11-22. The row is now per GPU, with the 880M kept, the RX 6800 measurement, and
@AC-Storm-YT's 9800X3D iGPU (RDNA2: COMPUTE only) and RX 9070 XT (RDNA4: all four) from #313.

Measured on the RX 6800: no size can be requested for pixel or mesh shaders, and at the default a probe
pixel shader counts 64 live invocations per subgroup (SPIR-V 1.5 and 1.6); ms_w64x_ballot passes natively.
In ps_bitmask_perm lanes 32-63 (2,048 of 4,096 pixels) read v_mbcnt_lo = 32; its check judges lanes 0-31
only. d3d12_subgroup_test, testing.md (tier C pixel fixtures skip here too) and the known gaps say the same.

tools/wave32_pixel_scan.py counts the wave32 pixel shaders with lane-crossing or width-dependent
instructions, by family (counts only; test: tests/test_wave32_pixel_scan.py). Control: 12,101 PS, 1,127
wave32, as in design.md. 1,010 have v_readlane/v_writelane/v_readfirstlane, 146 v_mbcnt, 105 s_bcnt1/s_ff1
of a lane mask, and all 1,127 an EXEC/VCC branch or mask SCC vote.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
2026-11-22 18:26:33 -07:00
291767e54f CI: verify llvm-mc amdgcn target and retain test compatibility notes (BUILD-923)
- In .github/workflows/runtime.yml, add a sanity check step ensuring /usr/lib/llvm-19/bin/llvm-mc has amdgcn target support after package installation.
- In docs/testing.md, retain the note that older llvm-mc (18+) supports valu_fuzz.py --family mem and lds_fuzz.py, while stock CI fixtures need 19+ and full f16 fuzzing requires 21+.
2026-11-23 01:00:15 +01:00
9b28252a69 vk_compute_test: take the validation setup from a shared runtime/test/vk_validation.h
OptInValidation reads LEONIDA_VK_VALIDATION, adds VK_LAYER_KHRONOS_validation, VK_EXT_debug_utils and
a messenger to the instance (keeping what the program already enables), counts validation-type
errors and turns them into the exit status. vk_compute_test uses it instead of its own copy, so the
other shader test programs can opt in with a few lines. docs/testing.md also no longer lists
vk_image_fuzz as a program that ignores the variable (it reads it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:56:57 +00:00
0f7125e674 vk_compute_test: run under validation with LEONIDA_VK_VALIDATION, fail on a validation error (TEST-877)
vk_compute_test created its instance without layers and ignored LEONIDA_VK_VALIDATION, and a
validation message never changed its exit code, so scripts/run_gpu_tests.py could not catch what
GPU-assisted validation finds in the compute fixtures (SHADER-708 only showed up with
VK_INSTANCE_LAYERS set by hand).

With LEONIDA_VK_VALIDATION=1 it now enables VK_LAYER_KHRONOS_validation and a debug messenger the
way vk_bindless_test does, prints each message to stderr and counts validation-type errors. main
wraps the old body, so every path (including errors GPU-AV reports when the queue finishes) ends
with "N validation errors" and exit 1. Without the variable nothing changes. docs/testing.md says
so, and no longer lists vk_bindless_test as a program that ignores the variable (it reads it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:51:39 +00:00
bf7fc223fb hw_oracle: a launcher quarantined by Windows Defender (WinError 225) is Unavailable with an exclusion hint, plus a Known problems row (BUILD-1127) 2026-11-22 23:44:24 +01:00
799649865f docs/testing.md: at 128 bits on x86_64 two of the six emulated mesh tests also draw nothing (TEST-782 review)
Measured by @TreXito with Mesa 26.0.3; their cull-store-only change also
makes four of the tests byte-identical to NVIDIA at both widths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:41:19 +03:00
1291a6878c GPU tests: raw barycentrics under perspective (ps_persp_bary, vs_persp)
The raw-barycentric tests draw with vs_ids, where clip w = 1 at every vertex, so nothing checked that the raw
i/j (and the attributes) follow perspective-correct weights. vs_persp draws one triangle at screen (5,8),
(57,16), (21,55) with clip w = 1, 2, 4 and per-vertex attr0; ps_persp_bary is ps_bary's code drawn with it.
check.py's bary_persp_problem compares every pixel with CPU weights p_k = (l_k / w_k) / sum(l_m / w_m) from the
screen-space weights l_k, checks that pixels outside stay clear, and requires the affine weights to differ by
more than 100x the tolerance on every judged pixel, so a NoPerspective regression can't pass. run_gpu_tests.py
uses the same reference (PIXEL_VS, DRAWN_WITH). Suggested by Vonsek in #794.

On main it runs the native BaryCoordKHR path (it skips without VK_KHR_fragment_shader_barycentric, like
ps_bary); any barycentric fallback that lands (#804) is exercised by it too. Checked on an RX 5700 XT (RADV)
through a GS fallback: passes at wave32 and wave64; with NoPerspective on the fallback's input, all 1149
covered pixels fail while the interpolated attributes still match. New tests/test_bary_persp_oracle.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:37:21 -06:00
b42efa1b49 docs: clarify that LLVM 19 satisfies stock CI fixtures while valu_fuzz f16 requires LLVM 21+ 2026-11-22 23:31:24 +01:00
0fdc443260 CI: upgrade linux-gpu-tools job to llvm-19 (BUILD-923)
In .github/workflows/runtime.yml, the `linux-gpu-tools` job pinned `llvm-18`'s
`llvm-mc`, which rejects the new `ps_sdwa_f16_const` fixture
(`v_cvt_f16_u16_sdwa v5, 1.0` inline float constant on an integer-source SDWA op)
introduced in d78546fc, causing scripts/run_gpu_tests.py to abort before
reporting GPU test results.

Upgrade the pinned assembler path from `llvm-18` to `llvm-19` across package
installation and the native & wave64 emulation test steps. Also update
documentation in docs/testing.md to reflect that llvm-18 rejects
ps_sdwa_f16_const and that llvm-19+ is required.

Claim: https://github.com/ItsNotRexed/Leonida/issues/3047#issuecomment-7084706031
Fixes: BUILD-923
2026-11-22 23:31:23 +01:00
f02e952272 CI: a macOS (Apple Silicon) job for the runtime on MoltenVK and the Python suites
runtime.yml gets a macos job on macos-26: Homebrew's MoltenVK, Vulkan headers and
loader, llvm-mc, SPIRV-Tools and glslang; the runtime built through sccache; ctest
and run_gpu_tests.py on MoltenVK. ci.yml gets macos-python: the standard-library
loop, the semantic suite alongside it, and the pytest files with Homebrew's llvm-mc.

The hosted runner's Metal device is Apple Paravirtual device (family Mac2), which
MoltenVK runs on; KosmicKrisp finds no device there. macos-15 can't build the
runtime (Xcode 16's libc++ has no floating-point std::from_chars).

The two tests that fail on MoltenVK today, also on an M3 Max, are listed with the
pull requests that fix them (xdxr_build_check: #2423, ps_ssharp: #1845);
scripts/ci_expected_failures.py fails the step on any other failure and notes an
expected one that passes.
2026-11-23 02:21:52 +04:00
8e32de2144 docs/testing.md: say where each llvmpipe mesh failure was measured (TEST-782 review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:07:58 +03:00
53eeea4170 Remove three blocks the round-42 merges left in twice
docs/testing.md had the whole "GPUs with 128 bytes of push constants"
section twice in a row (identical), and the first copy had no blank line
before its heading. docs/embedded_shaders.md section 4 repeated the
"blocker then / now" table and the "disassembly count is unchanged"
paragraph after the remaining-blocker table. tests/test_skinned_glb.py
defined SkinnedGlbTest.test_full_export_without_numpy twice (identical),
so the first definition was dead.

The second copy of each goes; nothing else changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:06:06 +00:00
7974b89a02 Merge official main into SHADER-605 and record independent GPU results 2026-11-22 23:05:26 +01:00
aec744e39d Tests: account for KosmicKrisp NaN readback (TEST-783) 2026-11-23 01:03:29 +03:00
a3b4b1bb86 Merge pull request #3660 from Claude
# Conflicts:
#	docs/testing.md
2026-11-22 17:03:15 -05:00
3047103112 Merge pull request #3440 from Mulkku
# Conflicts:
#	docs/testing.md
2026-11-22 17:02:03 -05:00
d51752aa2d Merge pull request #3383 from bobcatchris 2026-11-22 17:01:47 -05:00
927db13e87 docs/testing.md: Known problems row for crashes under the Vulkan SDK's API dump layer on AMD (TEST-843)
d3d12_buffer_tiles and d3d12_queue_wait exit with 0xC0000005 in some runs when VK_LAYER_LUNARG_api_dump is enabled on an
RX 9060 XT (1 and 4 of 8 runs in one session, 3 and 1 of 30 in another), whatever its detailed and pre_dump settings; none
in 24 runs without the layer, nor in 8 runs each of vkcube and vulkaninfo with it. The row says so, and what to do.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 23:00:53 +01:00
d7b38c36fc docs/testing.md: emulated mesh tests fail on llvmpipe because of an llvmpipe bug (TEST-782)
llvmpipe stores a mesh shader's runtime CullPrimitiveEXT through an
invalid `bitcast <N x i1> to <N x float>` (emit_store_mesh_chan,
lp_bld_nir_soa.c, Mesa 26.3.1 and main). On x86_64 at 256 bits LLVM
aborts ("Cannot emit physreg copy instruction"), on arm64 the primitive
comes out culled (#3127). The translator's SPIR-V is valid: with only
that store made a constant false, the emulated ms_tri frame is
byte-identical to RADV's. A Known problems row gives the workaround
(LEONIDA_MESH_COMPUTE=1: 6/6 ms_* pass on llvmpipe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 01:00:36 +03:00
d3ec646a7d Merge pull request #3023 from Jolymmiles 2026-11-22 17:00:25 -05:00
8860b36ebf Merge pull request #3004 from Moaaz Gewili
# Conflicts:
#	docs/design.md
#	docs/testing.md
2026-11-22 17:00:22 -05:00
d6354821a8 Merge pull request #2972 from Davide 2026-11-22 17:00:16 -05:00
04361d0a39 Translator: --fma exact, a single-rounded f32 FMA without VK_KHR_shader_fma (SHADER-497) 2026-11-23 00:00:12 +02:00
efa9dc1c5c Merge pull request #2886 from Jolymmiles
# Conflicts:
#	docs/testing.md
2026-11-22 17:00:01 -05:00
84f8f1b04a docs: say Homebrew's llvm-mc is not on PATH and where the tests find it
Signed-off-by: Maxime Mansiet <AirKyzzZ@users.noreply.github.com>
2026-11-22 22:59:10 +01:00
5243c3a261 Merge pull request #1518 from Henrique Vinagre
# Conflicts:
#	docs/design.md
#	docs/testing.md
2026-11-22 16:58:50 -05:00
53bc2c4943 GPU tests: wire cs_fma_fused in run_gpu_tests and accept GLSL Fma split on RADV 2026-11-22 21:43:14 +00:00
b28832bab4 Tests: give each process its own temp folder for its shader library
d3d12_compute and the other tests that write a translator-style shader library under
the temp directory (d3d12_draw, d3d12_set0_compute, d3d12_msaa_draw, d3d12_fspx_compute,
d3d12_pipeline_library, d3d12_subgroup, d3d12_bundle, d3d12_typeless_families,
shader_library) used one fixed folder name. Two copies running at once (ctest -j, or two
suites in one Wine prefix or TMPDIR) shared it, and one copy's remove_all deleted the
modules the other was loading: on an Apple M3 Max under Wine with MoltenVK 1.4.3, four
copies of d3d12_compute at once failed 6 of 40 runs (PSO creation at lines 245/357, or
exit 3 from an uncaught filesystem_error in copy_file), while 125 runs one at a time all
passed.

test_temp_dir.h names the folder <temp>/<name>_<pid>, removes it on scope exit (early
returns included), and copies the compiled-in LEONIDA_TEST_*_SPV files with an error
code, so a missing file is reported by name instead of ending the test with abort().
docs/testing.md lists both symptoms.
2026-11-23 01:41:31 +04:00
129d357562 Record the Windows version and another AMD retest 2026-11-22 23:01:05 +02:00
d466ebc06b Link the Ryzen 9800X3D typeless RTV verification 2026-11-22 22:59:47 +02:00
549e857f40 docs/testing.md: two traps of the Linux cross-build and Wine setup
Two rows for Known problems, both hit while setting up the clang-cl
cross-build and the Wine tests on Ubuntu 24.04:

- clang-cl-19 isn't in the clang-19 package: Debian and Ubuntu put the
  versioned clang-cl link in clang-tools-19.
- Ubuntu's Wine 9.0 aborts at once (free(): invalid pointer, or a
  segfault) when /run/user/<uid> doesn't exist, as in a container or a
  root shell without a login session. Creating the folder fixes it;
  setting XDG_RUNTIME_DIR alone does not (checked both ways).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GN11jcpJWD4phrXJyDgED6
2026-11-22 20:55:57 +00:00
507830e162 Document the legacy AMD typeless RTV test failure 2026-11-22 22:31:30 +02:00
b000451dc9 docs(testing): record the RDNA1 RADV s_bfe_i64 limitation (SHADER-276) 2026-11-22 20:20:33 +00:00
16fd347b8c Merge pull request #3313 from Shrey Ratna 2026-11-22 15:16:53 -05:00