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>
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.
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>
- 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+.
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>
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>
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>
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>
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
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.
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>
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>
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>
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.
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