upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/testing.md
diff options
context:
space:
mode:
authorTauwni <102470988+Tauwni@users.noreply.github.com>2026-11-28 13:34:56 +0100
committerTauwni <102470988+Tauwni@users.noreply.github.com>2026-11-28 13:34:56 +0100
commitf9ecf1981a1a79457ca3226b2d417ae7f7802a9b (patch)
tree62b9eeaa79b58952b851b649bc8715c44aae7ff4 /docs/testing.md
parent55d59579c6b5da2e4bd83c226481f53dc04e19bc (diff)
parentd48a957bb9988afce424552a3c0c8d01ef12320f (diff)
Merge remote-tracking branch 'origin/main' into docs/kk-nan-constant-fixtures
# Conflicts: # docs/testing.md
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md131
1 files changed, 127 insertions, 4 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 9fb917b35..7b5fa4c55 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -11,6 +11,78 @@ This page collects the setup steps and the problems testers have run into so far
11 11
12[claims]: https://github.com/ubiquitarianism/leonida/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22 12[claims]: https://github.com/ubiquitarianism/leonida/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22
13 13
14## Quick start on Windows
15
16The shortest path from a fresh Windows PC to a result you can post. The rest of this page has the details and the
17problems testers have hit; the steps below link to them.
18
191. Install, in this order:
20 - Visual Studio 2022 (Community or Build Tools) with "Desktop development with C++", the "C++ CMake tools for
21 Windows" component and Windows SDK 10.0.26100 or newer.
22 - The [Vulkan SDK](https://vulkan.lunarg.com/). It sets `VULKAN_SDK` and puts `spirv-as`, `spirv-val`,
23 `glslangValidator` and `vulkaninfo` on `PATH`.
24 - [Python 3.12+](https://www.python.org/downloads/), with "Add python.exe to PATH" ticked, and git.
25 - Optional but needed for the full suite: `llvm-mc` with the AMDGPU target (see [What you need](#what-you-need)).
26 `powershell -ExecutionPolicy Bypass -File scripts\build_llvm_mc.ps1` builds one and sets `LLVM_MC` for you.
272. Open a new PowerShell window (so it sees the new `PATH`), clone the repository and build the test programs:
28
29 ```powershell
30 git clone --recursive https://github.com/ubiquitarianism/leonida
31 cd leonida
32 powershell -ExecutionPolicy Bypass -File scripts\build_runtime.ps1
33 ```
34
35 The script uses the newest Visual Studio it finds. If Visual Studio 2026 is also installed and the link step
36 fails there, build from a "Developer PowerShell for VS 2022" instead:
37 `cmake -S runtime -B runtime\build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON`, then
38 `cmake --build runtime\build`.
393. Run the suite twice, once as your GPU runs it and once with wave64 emulation (this matters on NVIDIA and Intel,
40 whose subgroups are 32 wide, see [GPUs with 32-wide subgroups](#gpus-with-32-wide-subgroups-nvidia-intel-apple)):
41
42 ```powershell
43 python -I scripts\run_gpu_tests.py
44 $env:LEONIDA_W64_EMULATE = "1"; python -I scripts\run_gpu_tests.py; Remove-Item Env:LEONIDA_W64_EMULATE
45 ```
46
47 Without `llvm-mc`, add `--disasm-dir tests/semantic/fixtures/disasm` to both commands. That runs the
48 pre-disassembled subset only, so say "subset" in your result.
49
50 Using a prebuilt `runtime-windows` artifact instead of building? Check out the commit that built it and read
51 this page at that commit (see [Without a compiler](#without-a-compiler-a-ci-built-runtime)): an older
52 `run_gpu_tests.py` may not take every option shown here. `python -I scripts\run_gpu_tests.py --help`, run from
53 that checkout, lists the options it does take.
544. Collect what the record needs:
55
56 ```powershell
57 git rev-parse HEAD # the commit you built
58 vulkaninfo --summary # GPU name, driver version, Vulkan version
59 python -I tools\vk_subgroup_info.py # subgroup range (min_subgroup_size, max_subgroup_size)
60 cmd /c ver # Windows build
61 ```
62
635. Copy a Windows file in [`gpu-test-results/`](../gpu-test-results) (`RTX3060Ti-Windows.txt` is a complete one), fill
64 in your GPU, driver, subgroup range, OS build, commit, tool versions and the last line each run printed
65 (`N/M passed, K skipped`), and list every `FAIL` line. Then follow [Posting your result](#posting-your-result).
66
67A `FAIL` is worth reporting, not a reason to stop: check [Known problems](#known-problems) first, and say in the
68record whether it matched a row there.
69
70### Testing someone else's pull request
71
72Once your GPU has a record, testing open pull requests on it helps more than a second record: review and testing
73are what most pull requests wait for. Pick one that changes the translator, the runtime or a GPU test, then:
74
75```powershell
76git fetch origin pull/<N>/head:pr-<N>
77git checkout pr-<N>
78powershell -ExecutionPolicy Bypass -File scripts\build_runtime.ps1 # always rebuild after switching
79python -I scripts\run_gpu_tests.py # add --filter <name> for the tests it touches
80```
81
82Run `main` the same way for comparison (`git checkout main`, rebuild, run). Then comment on the pull request with
83one line per mode, in the form `<GPU>, <driver>, Windows <build>: X of Y passed, K skipped, F failed (native);
84main at <commit>: ...`, plus any `FAIL` lines that differ from `main`.
85
14## What you need 86## What you need
15 87
16- **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so 88- **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so
@@ -55,6 +127,32 @@ This page collects the setup steps and the problems testers have run into so far
55 - macOS: `brew install llvm molten-vk vulkan-headers vulkan-loader spirv-tools vulkan-tools`. The test programs 127 - macOS: `brew install llvm molten-vk vulkan-headers vulkan-loader spirv-tools vulkan-tools`. The test programs
56 load MoltenVK directly; set `LEONIDA_VULKAN_LOADER` to use the Vulkan loader instead. 128 load MoltenVK directly; set `LEONIDA_VULKAN_LOADER` to use the Vulkan loader instead.
57 129
130## Source-only smoke verification (DX-07)
131
132To verify a checkout quickly on any platform without game files, retail binaries, or hardware prerequisites:
133
134```bash
135# Standard-library sanity and toolchain discovery (Windows, Linux, macOS)
136python -I scripts/smoke.py --prereqs-only
137
138# Fast source-only smoke suite (< 1 second)
139python -I scripts/smoke.py --quick
140
141# Full synthetic smoke validation (compileall, no-game-data, CLI help, unit tests)
142python -I scripts/smoke.py
143
144# Machine-readable output for scripts and CI
145python -I scripts/smoke.py --json
146
147# Also available through the unified developer entry point
148python -I scripts/dev.py smoke --quick
149```
150
151Exit codes:
152- `0`: all requested synthetic checks passed.
153- `1`: one or more synthetic checks or tests failed.
154- `2`: required environment prerequisites missing (e.g., Python < 3.10) or invalid options.
155
58## Build the test programs 156## Build the test programs
59 157
60On a Windows runtime build with Vulkan enabled, CMake only registers `d3d12_translated_draw`, `d3d12_rect_list`, 158On a Windows runtime build with Vulkan enabled, CMake only registers `d3d12_translated_draw`, `d3d12_rect_list`,
@@ -336,12 +434,13 @@ of those fail for that reason.
336 434
337### Run a Windows CI artifact under Wine 435### Run a Windows CI artifact under Wine
338 436
339The `Runtime` workflow uploads `runtime-windows` for seven days. It contains the Windows executables, DLLs, 437The [Runtime workflow](https://github.com/ubiquitarianism/leonida/actions/workflows/runtime.yml) uploads
438`runtime-windows` for seven days. It contains the Windows executables, DLLs,
340synthetic test shaders, CTest inventory and the path of the Windows checkout. From a clean checkout of the commit 439synthetic test shaders, CTest inventory and the path of the Windows checkout. From a clean checkout of the commit
341used by the Windows job, set `run_id` to the Actions run ID and download the artifact to `runtime/build`: 440used by the Windows job, set `run_id` to the Actions run ID and download the artifact to `runtime/build`:
342 441
343```sh 442```sh
344gh run download "$run_id" --repo ItsNotRexed/Leonida --name runtime-windows --dir runtime/build 443gh run download "$run_id" --repo ubiquitarianism/leonida --name runtime-windows --dir runtime/build
345 444
346WINE=wine WINEPREFIX="$(mktemp -d)" WINEDLLOVERRIDES="mscoree,mshtml=" WINEDEBUG=-all \ 445WINE=wine WINEPREFIX="$(mktemp -d)" WINEDLLOVERRIDES="mscoree,mshtml=" WINEDEBUG=-all \
347 bash scripts/run_wine_session.sh python3 -I scripts/run_wine_tests.py \ 446 bash scripts/run_wine_session.sh python3 -I scripts/run_wine_tests.py \
@@ -574,6 +673,13 @@ only for `check.py`, the shaders read the tail from push constants the programs
574(`LEONIDA_MESH_COMPUTE=1`) isn't combined with it yet: its vertex shader still reads the output address from push 673(`LEONIDA_MESH_COMPUTE=1`) isn't combined with it yet: its vertex shader still reads the output address from push
575constants, so those tests skip. 674constants, so those tests skip.
576 675
676## Mesh shaders with their waves in series
677
678`LEONIDA_MESH_SERIAL_WAVES=1` for `run_gpu_tests.py`, together with `LEONIDA_W64_EMULATE=1`, translates the mesh
679shaders with `--mesh-serial-waves` (`docs/design.md`, "Mesh shaders with their waves in series"): the ones that
680qualify run one pass per wave in 64 invocations. The `ms_*` tests must pass with and without it;
681`ms_w64x_wave_votes` is the one whose two waves take different branches and both give the triangle a vertex. `ms_w64x_wave_loops` is the one whose two waves run a loop of different length (5 and 9 iterations), each iteration reading a wave-wide count, so under emulation the waves reach different numbers of barriers.
682
577## GPUs without mesh shaders (NVIDIA Pascal and older) 683## GPUs without mesh shaders (NVIDIA Pascal and older)
578 684
579Without `VK_EXT_mesh_shader`, the `ms_*` tests are skipped; that's expected, not a failure. To test the path that 685Without `VK_EXT_mesh_shader`, the `ms_*` tests are skipped; that's expected, not a failure. To test the path that
@@ -621,7 +727,7 @@ constant `false` there instead makes the emulated `ms_tri` draw a frame byte-ide
621`ms_tri`, `ms_wave_info_s3`, `ms_w64x_ballot` and `ms_v5_workgroup` byte-identical to NVIDIA's at both widths (Mesa 727`ms_tri`, `ms_wave_info_s3`, `ms_w64x_ballot` and `ms_v5_workgroup` byte-identical to NVIDIA's at both widths (Mesa
62226.0.3, [measured by @TreXito](https://github.com/ItsNotRexed/Leonida/pull/3838#issuecomment-7086696759), with a 42-line reduced 72826.0.3, [measured by @TreXito](https://github.com/ItsNotRexed/Leonida/pull/3838#issuecomment-7086696759), with a 42-line reduced
623reproducer). llvmpipe is not a substitute for a result from a 729reproducer). llvmpipe is not a substitute for a result from a
624real GPU in [#166](https://github.com/ItsNotRexed/Leonida/issues/166): it catches regressions, not hardware 730real GPU in [gpu-test-results/](../gpu-test-results/): it catches regressions, not hardware
625differences. 731differences.
626 732
627## Macs in CI 733## Macs in CI
@@ -736,6 +842,22 @@ exits 77, so CI skips it. `image_fuzz.py --oracle hw` loads a linear texture thr
736its CPU model; add `--negative-control` to check that wrong models are caught. A gfx1150 (RDNA3.5) is not RDNA2: a 842its CPU model; add `--negative-control` to check that wrong models are caught. A gfx1150 (RDNA3.5) is not RDNA2: a
737match supports the model and does not prove RDNA2. Run these one at a time: a second job on the same GPU can hang it. 843match supports the model and does not prove RDNA2. Run these one at a time: a second job on the same GPU can hang it.
738 844
845## Model oracle on any Vulkan GPU (no AMD hardware)
846
847`pk16_diff.py`, `vint_diff.py` and `sdwa_diff.py` judge their translated programs on a Vulkan GPU only against the words
848a native AMD GPU produced (`--oracle hw,vk`). `tools/vk_model_fuzz.py` runs the same programs, for the same seed, on
849whatever Vulkan GPU you have and judges them against the fuzzer's reference model instead:
850
851```sh
852python -I tools/vk_model_fuzz.py pk16_diff --programs 1500 --seed 11 --build runtime/build
853```
854
855`--build` is the folder with `vk_compute_test`; `llvm-mc` with the AMDGPU target is needed as for `valu_fuzz.py`. It exits
8560 when every judged program matched, 1 on a mismatch (the first few programs are printed), 2 when `vk_compute_test` is
857missing and 77 when nothing could be judged. A program the model declines counts as a skip. A mismatch here is the GPU
858disagreeing with the model, which is a driver difference, a translator bug or a model bug: re-read the program with
859the fuzzer itself (`pk16_diff.py --seed S --programs N`) before reporting it.
860
739## Choosing the GPU 861## Choosing the GPU
740 862
741With more than one GPU, pick one through the Vulkan loader, for example 863With more than one GPU, pick one through the Vulkan loader, for example
@@ -789,7 +911,7 @@ game's device ignores it`, so leaving them set cannot slow a game down (`run_tin
789| On a Mac, a translated shader's GPU time is 1.5 to 16 times what it would be without the precise-arithmetic overhead | MoltenVK's SPIRV-Cross turns every `NoContraction` float add, subtract and multiply into a call to an `[[clang::optnone]]` helper that Metal does not inline. MoltenVK 1.4.2 and `main` up to at least `5189f8de` are affected (SHADER-234, [design notes](design.md#translator-status-and-runtime-contract)) | Expected with these MoltenVK versions, and the output is still exact. Before you time shaders on a Mac, build MoltenVK with SPIRV-Cross `98cbb7c0` or newer in `ExternalRevisions/SPIRV-Cross_repo_revision` (KhronosGroup/MoltenVK#2917 moves it to `57e4efcc`), and point `LEONIDA_VULKAN_LOADER` at its `libMoltenVK.dylib` | 911| On a Mac, a translated shader's GPU time is 1.5 to 16 times what it would be without the precise-arithmetic overhead | MoltenVK's SPIRV-Cross turns every `NoContraction` float add, subtract and multiply into a call to an `[[clang::optnone]]` helper that Metal does not inline. MoltenVK 1.4.2 and `main` up to at least `5189f8de` are affected (SHADER-234, [design notes](design.md#translator-status-and-runtime-contract)) | Expected with these MoltenVK versions, and the output is still exact. Before you time shaders on a Mac, build MoltenVK with SPIRV-Cross `98cbb7c0` or newer in `ExternalRevisions/SPIRV-Cross_repo_revision` (KhronosGroup/MoltenVK#2917 moves it to `57e4efcc`), and point `LEONIDA_VULKAN_LOADER` at its `libMoltenVK.dylib` |
790| `d3d12_descriptor_test` reports that the set had room for fewer than 5001 2D views and 2100 samplers, and the device logs that the bindless set holds fewer samplers than a full shader-visible sampler heap | The device's descriptor limits, or its `vkGetDescriptorSetLayoutSupport`, allow no bigger bindless set ([d3d12_vulkan.md](d3d12_vulkan.md) section 5). MoltenVK's answer is ignored, since it rejects every layout of `maxPerSetDescriptors` (1212) or more although it runs the full set | Expected where the limits are low. The test still checks the last index of each array and that the next view and sampler are refused | 912| `d3d12_descriptor_test` reports that the set had room for fewer than 5001 2D views and 2100 samplers, and the device logs that the bindless set holds fewer samplers than a full shader-visible sampler heap | The device's descriptor limits, or its `vkGetDescriptorSetLayoutSupport`, allow no bigger bindless set ([d3d12_vulkan.md](d3d12_vulkan.md) section 5). MoltenVK's answer is ignored, since it rejects every layout of `maxPerSetDescriptors` (1212) or more although it runs the full set | Expected where the limits are low. The test still checks the last index of each array and that the next view and sampler are refused |
791| `cs_dpp_ops` fails on a Mac with MoltenVK 1.4.2: `out[0..7] = 100 100 11 ...`, want `100 10 11 ...` | MoltenVK 1.4.2's SPIRV-Cross moves the DPP lowering's subgroup ballot and shuffle into a short-circuiting `&&` and `?:`, so only some lanes run them and lane 1 sees its source lane 0 as inactive. SPIRV-Cross `5c372ffb` (in MoltenVK `main`) keeps them out of `?:`; a ballot on the right of `&&` is still moved there in SPIRV-Cross `57e4efcc` | Fixed in the translator (SHADER-529, #3227): it stores the ballot and the shuffle to variables of their own, so the MSL that MoltenVK 1.4.2 generates (`MVK_CONFIG_DEBUG=1`) runs each as a statement in every lane. Translate again with current `main`; MoltenVK `main` and KosmicKrisp are no longer needed for it. A pass alone does not show the fix: an Apple M5 Pro (macOS 26.5.1) returns the right words with 1.4.2 even when the ballot is on the right of `&&` | 913| `cs_dpp_ops` fails on a Mac with MoltenVK 1.4.2: `out[0..7] = 100 100 11 ...`, want `100 10 11 ...` | MoltenVK 1.4.2's SPIRV-Cross moves the DPP lowering's subgroup ballot and shuffle into a short-circuiting `&&` and `?:`, so only some lanes run them and lane 1 sees its source lane 0 as inactive. SPIRV-Cross `5c372ffb` (in MoltenVK `main`) keeps them out of `?:`; a ballot on the right of `&&` is still moved there in SPIRV-Cross `57e4efcc` | Fixed in the translator (SHADER-529, #3227): it stores the ballot and the shuffle to variables of their own, so the MSL that MoltenVK 1.4.2 generates (`MVK_CONFIG_DEBUG=1`) runs each as a statement in every lane. Translate again with current `main`; MoltenVK `main` and KosmicKrisp are no longer needed for it. A pass alone does not show the fix: an Apple M5 Pro (macOS 26.5.1) returns the right words with 1.4.2 even when the ballot is on the right of `&&` |
792| `check.py`'s `cs_fma_fused` fails on a Mac with MoltenVK 1.4.2: word 7 reads `15360` (`0x3c00`), want `29521` (`0x7351`) | The f16 multiply-add (round to odd). The MSL of 1.4.2 and of MoltenVK `main` differ only in SPIRV-Cross's precise-arithmetic helpers (`[[clang::optnone]]` and `fma(l, r, 0)` against `math_mode(safe)` and `fma(l, r, -0.0)`, the SHADER-182 / SHADER-234 change) | Expected with MoltenVK 1.4.2; it passes with MoltenVK `main` | 914| On a Mac with MoltenVK 1.4.2, an f16 multiply-add whose three operands are all constants gives a wrong constant: while `cs_fma_fused` had literals there, its word 7 read `15360` (`0x3c00`), or `0` on an Apple M5 and M5 Pro, want `29521` (`0x7351`) | The f16 multiply-add (round to odd), evaluated at compile time. With any one of the three operands taken at run time the same translation gives `0x7351` (Apple M5). The MSL of 1.4.2 and of MoltenVK `main` differ only in SPIRV-Cross's precise-arithmetic helpers (`[[clang::optnone]]` and `fma(l, r, 0)` against `math_mode(safe)` and `fma(l, r, -0.0)`, the SHADER-182 / SHADER-234 change) | `cs_fma_fused` takes its f16 operands at run time since TEST-FMA-FUSED-F16-RUNTIME, as it does its f32 ones, and passes with MoltenVK 1.4.2 on an Apple M5 and on the `macos` job's runner (Apple Paravirtual device), which no longer lists it in `EXPECTED_FAILURES`. The all-literal form passes with MoltenVK `main` |
793| `ps_imgatomic` fails in about two of three runs on a Mac with MoltenVK 1.4.2: 1 to 6 of the 256 image-atomic texels are wrong while the render target is exact, for example `2D umax texel 48: got 0x00000d45, want 0x00000dc7` | MoltenVK 1.4.2 lowers the four `OpAtomic*` on image texels to Metal's texture atomics (`atomic_fetch_max`, `atomic_fetch_min` and `atomic_fetch_or` on `access::read_write` textures), and the texels read back the way a read-modify-write that is not atomic between two groups of fragment threads leaves them. A wrong `umax` texel always holds the id of one of its own 64 pixels, the largest of only some of them: on an Apple M5 it was the last pixel of the texel's first four rows in 43 of 90 cases, with all 32 larger ids gone. A wrong `umin` texel mirrors that (the first pixel of its last four rows in 39 of 48). The `or` image did not differ in 150 runs there. It is not the translator's first-lane broadcast of the descriptor index (54 of 60 runs fail with the index used directly) and not the readback (42 of 60 fail with the copies in a submission of their own after the draw). Measured on an Apple M5 (macOS 27.2.1, 101 of 150 runs fail) and an M5 Pro (#543) | Expected with MoltenVK 1.4.2. KosmicKrisp passed the same module and binary 10 times of 10 on the M5 Pro (#543). The macOS CI job does not reach it: on the runner's paravirtual device the test skips because its bindless set does not fit the descriptor limits. Do not weaken the test's expected texels | 915| `ps_imgatomic` fails in about two of three runs on a Mac with MoltenVK 1.4.2: 1 to 6 of the 256 image-atomic texels are wrong while the render target is exact, for example `2D umax texel 48: got 0x00000d45, want 0x00000dc7` | MoltenVK 1.4.2 lowers the four `OpAtomic*` on image texels to Metal's texture atomics (`atomic_fetch_max`, `atomic_fetch_min` and `atomic_fetch_or` on `access::read_write` textures), and the texels read back the way a read-modify-write that is not atomic between two groups of fragment threads leaves them. A wrong `umax` texel always holds the id of one of its own 64 pixels, the largest of only some of them: on an Apple M5 it was the last pixel of the texel's first four rows in 43 of 90 cases, with all 32 larger ids gone. A wrong `umin` texel mirrors that (the first pixel of its last four rows in 39 of 48). The `or` image did not differ in 150 runs there. It is not the translator's first-lane broadcast of the descriptor index (54 of 60 runs fail with the index used directly) and not the readback (42 of 60 fail with the copies in a submission of their own after the draw). Measured on an Apple M5 (macOS 27.2.1, 101 of 150 runs fail) and an M5 Pro (#543) | Expected with MoltenVK 1.4.2. KosmicKrisp passed the same module and binary 10 times of 10 on the M5 Pro (#543). The macOS CI job does not reach it: on the runner's paravirtual device the test skips because its bindless set does not fit the descriptor limits. Do not weaken the test's expected texels |
794| `gs_tri` and `ms_tri` fail on a Mac | MoltenVK has no geometry stage and no `VK_EXT_mesh_shader` | Current `main` reports them as skipped | 916| `gs_tri` and `ms_tri` fail on a Mac | MoltenVK has no geometry stage and no `VK_EXT_mesh_shader` | Current `main` reports them as skipped |
795| With `LEONIDA_W64_EMULATE=1` on llvmpipe, the `ms_*` tests fail. Measured with Mesa 26.3.1: on x86_64 at 256-bit vectors (the default there) all six abort with "LLVM ERROR: Cannot emit physreg copy instruction"; on arm64 (128-bit) `ms_tri` draws nothing (the frame stays at the clear color); on x86_64 at 128 bits (`LP_NATIVE_VECTOR_WIDTH=128`) `ms_tri` happened to draw correctly, but with Mesa 26.0.3 `ms_wave_info_s3` and `ms_v5_workgroup` draw nothing there (4 of 6 pass, [measured by @TreXito](https://github.com/ItsNotRexed/Leonida/pull/3838#issuecomment-7086696759)) ([measured runs](https://github.com/ItsNotRexed/Leonida/issues/3127#issuecomment-7086469679)) | An llvmpipe bug: a mesh shader's runtime `CullPrimitiveEXT` is stored through an invalid `bitcast <N x i1> to <N x float>` (TEST-782, #3127; see "Without a GPU: Mesa llvmpipe") | Run the mesh tests on llvmpipe without `LEONIDA_W64_EMULATE`, or add `LEONIDA_MESH_COMPUTE=1` (the compute fallback): with it all 6 `ms_*` pass emulated on llvmpipe (x86_64, 256-bit) | 917| With `LEONIDA_W64_EMULATE=1` on llvmpipe, the `ms_*` tests fail. Measured with Mesa 26.3.1: on x86_64 at 256-bit vectors (the default there) all six abort with "LLVM ERROR: Cannot emit physreg copy instruction"; on arm64 (128-bit) `ms_tri` draws nothing (the frame stays at the clear color); on x86_64 at 128 bits (`LP_NATIVE_VECTOR_WIDTH=128`) `ms_tri` happened to draw correctly, but with Mesa 26.0.3 `ms_wave_info_s3` and `ms_v5_workgroup` draw nothing there (4 of 6 pass, [measured by @TreXito](https://github.com/ItsNotRexed/Leonida/pull/3838#issuecomment-7086696759)) ([measured runs](https://github.com/ItsNotRexed/Leonida/issues/3127#issuecomment-7086469679)) | An llvmpipe bug: a mesh shader's runtime `CullPrimitiveEXT` is stored through an invalid `bitcast <N x i1> to <N x float>` (TEST-782, #3127; see "Without a GPU: Mesa llvmpipe") | Run the mesh tests on llvmpipe without `LEONIDA_W64_EMULATE`, or add `LEONIDA_MESH_COMPUTE=1` (the compute fallback): with it all 6 `ms_*` pass emulated on llvmpipe (x86_64, 256-bit) |
@@ -797,6 +919,7 @@ game's device ignores it`, so leaving them set cannot slow a game down (`run_tin
797| A pixel shader exporting non-canonical f32 NaNs reads back `0x7fc00000` from an RGBA32F color attachment | KosmicKrisp (Mesa 26.3.1), reproduced on Apple M3 Max, M2 Ultra and M1 Pro ([#3125](https://github.com/ItsNotRexed/Leonida/issues/3125)): `nir_to_msl` emits `(NAN)` for `float`-typed NaN constants (`MESA_KK_DEBUG=msl`); MoltenVK 1.4.2 preserved both tested payloads on the same hardware | `ps_nan_payload` allows the measured canonical word only for the NaN channels and only when `vk_harness` reports `driver: KosmicKrisp`. Finite channels and other drivers still require exact words. Integer or storage-buffer readback still canonicalizes constants that NIR infers as `float` (see the `cs_bvh` row below). | 919| A pixel shader exporting non-canonical f32 NaNs reads back `0x7fc00000` from an RGBA32F color attachment | KosmicKrisp (Mesa 26.3.1), reproduced on Apple M3 Max, M2 Ultra and M1 Pro ([#3125](https://github.com/ItsNotRexed/Leonida/issues/3125)): `nir_to_msl` emits `(NAN)` for `float`-typed NaN constants (`MESA_KK_DEBUG=msl`); MoltenVK 1.4.2 preserved both tested payloads on the same hardware | `ps_nan_payload` allows the measured canonical word only for the NaN channels and only when `vk_harness` reports `driver: KosmicKrisp`. Finite channels and other drivers still require exact words. Integer or storage-buffer readback still canonicalizes constants that NIR infers as `float` (see the `cs_bvh` row below). |
798| `cs_bvh` and `cs_bvh32` fail on a Mac with KosmicKrisp: `out[3]` reads `0x7fc00000`, want `0xffffffff` | KosmicKrisp's `nir_to_msl` compiler (Mesa 26.3.1, measured on Apple M2 Ultra, macOS 27.3), not the translator or the buffer format. The triangle branch writes bitcast `float` words and the box branch writes `OpSelect %uint` with `0xffffffff` (`-1`) into the same VGPRs; NIR erases `OpBitcast`, type inference marks the shared register and `bcsel` as `float`, and `nir_to_msl` prints any `float`-typed 32-bit constant in the IEEE-754 NaN range (`0x7f800001..0x7fffffff`, `0xff800001..0xffffffff`) as `(NAN)` (`0x7fc00000`) | Expected with KosmicKrisp in Mesa 26.3.1; MoltenVK 1.4.2 and llvmpipe (Mesa 26.3.1) return `0xffffffff` on the same machine. Do not weaken `vk_compute_test`'s expected BVH words | 920| `cs_bvh` and `cs_bvh32` fail on a Mac with KosmicKrisp: `out[3]` reads `0x7fc00000`, want `0xffffffff` | KosmicKrisp's `nir_to_msl` compiler (Mesa 26.3.1, measured on Apple M2 Ultra, macOS 27.3), not the translator or the buffer format. The triangle branch writes bitcast `float` words and the box branch writes `OpSelect %uint` with `0xffffffff` (`-1`) into the same VGPRs; NIR erases `OpBitcast`, type inference marks the shared register and `bcsel` as `float`, and `nir_to_msl` prints any `float`-typed 32-bit constant in the IEEE-754 NaN range (`0x7f800001..0x7fffffff`, `0xff800001..0xffffffff`) as `(NAN)` (`0x7fc00000`) | Expected with KosmicKrisp in Mesa 26.3.1; MoltenVK 1.4.2 and llvmpipe (Mesa 26.3.1) return `0xffffffff` on the same machine. Do not weaken `vk_compute_test`'s expected BVH words |
799| `ps_cndmask_sign_mods`, `ps_valu16_mad_sel` and `cs_fmt_all` (word 293) fail on a Mac with KosmicKrisp: a NaN word reads back `0x7fc00000` (`ps_cndmask_sign_mods` (0,0): `0x7fc00000 0x7fc00000 0x80000001 0x7fc00000`, want `0xff800001 0x7f800001 0x80000001 0x7f800001`; `ps_valu16_mad_sel` channel 2: `0x7fc00000`, want `0xffffffff`; `cs_fmt_all` word 293: `0x80007e00`, want `0x80007c01`) | The `(NAN)` printing of the two rows above, which is still in Mesa `main`: `emit_src_component` in `src/kosmickrisp/compiler/msl_type_inference.c` prints every `float`-typed NaN constant as `(NAN)`, dropping its payload and sign. In the two pixel shaders NIR folds the export to a constant (`MESA_KK_DEBUG=msl`: `float4((NAN), (NAN), float(-1.40129846432481707e-45), (NAN))` and `float4(..., (NAN), float(-0.0))`); in `cs_fmt_all` the input `0x7f800001` of a 16-bit float store becomes `0x7fc00000`, which narrows to `0x7e00` instead of `0x7c01`. Measured on an Apple M3 (macOS 26.5.1) with Mesa 26.3.1 at `main` `a73a57e13`; MoltenVK 1.4.2 and llvmpipe (Mesa 26.3.1) pass all three on the same machine | Expected with KosmicKrisp; do not weaken the expected words | 921| `ps_cndmask_sign_mods`, `ps_valu16_mad_sel` and `cs_fmt_all` (word 293) fail on a Mac with KosmicKrisp: a NaN word reads back `0x7fc00000` (`ps_cndmask_sign_mods` (0,0): `0x7fc00000 0x7fc00000 0x80000001 0x7fc00000`, want `0xff800001 0x7f800001 0x80000001 0x7f800001`; `ps_valu16_mad_sel` channel 2: `0x7fc00000`, want `0xffffffff`; `cs_fmt_all` word 293: `0x80007e00`, want `0x80007c01`) | The `(NAN)` printing of the two rows above, which is still in Mesa `main`: `emit_src_component` in `src/kosmickrisp/compiler/msl_type_inference.c` prints every `float`-typed NaN constant as `(NAN)`, dropping its payload and sign. In the two pixel shaders NIR folds the export to a constant (`MESA_KK_DEBUG=msl`: `float4((NAN), (NAN), float(-1.40129846432481707e-45), (NAN))` and `float4(..., (NAN), float(-0.0))`); in `cs_fmt_all` the input `0x7f800001` of a 16-bit float store becomes `0x7fc00000`, which narrows to `0x7e00` instead of `0x7c01`. Measured on an Apple M3 (macOS 26.5.1) with Mesa 26.3.1 at `main` `a73a57e13`; MoltenVK 1.4.2 and llvmpipe (Mesa 26.3.1) pass all three on the same machine | Expected with KosmicKrisp; do not weaken the expected words |
922| `cs_fma_fused` fails on a Mac with KosmicKrisp: word 7 reads `0x7352`, want `0x7351` | The f16 multiply-add (round to odd), computed at run time, comes out as if the product were rounded first: the exact product, 14988, is halfway between the f16 values 14984 (`0x7351`) and 14992 (`0x7352`), the addend is -2^-22, and one rounding gives `0x7351`. Measured on an Apple M3 with Mesa 26.3.1, 20 of 20 runs (the review of #1724). While the fixture's f16 operands were literals the constant was folded exactly, so the test passed there | Expected with KosmicKrisp in Mesa 26.3.1; MoltenVK 1.4.2 and llvmpipe (Mesa 26.3.1) give `0x7351` on the same machine. The f32 words KosmicKrisp splits are accepted under `--fma glsl`; the f16 word is not, since it does not use `Fma` |
800| CMake stops with "needs the Windows SDK 10.0.26100 or newer", or MSVC reports `'Desc_1_2': is not a member of 'D3D12_VERSIONED_ROOT_SIGNATURE_DESC'` | A Windows SDK older than 10.0.26100 (10.0.22621 is the common one), which has no version 1.2 root signatures | `winget install Microsoft.WindowsSDK.10.0.26100`, or add it in the Visual Studio Installer, then delete `runtime/build` and configure again | 923| CMake stops with "needs the Windows SDK 10.0.26100 or newer", or MSVC reports `'Desc_1_2': is not a member of 'D3D12_VERSIONED_ROOT_SIGNATURE_DESC'` | A Windows SDK older than 10.0.26100 (10.0.22621 is the common one), which has no version 1.2 root signatures | `winget install Microsoft.WindowsSDK.10.0.26100`, or add it in the Visual Studio Installer, then delete `runtime/build` and configure again |
801| `scripts/build_runtime.ps1` stops at once: "The checkout path ... contains '%'" (`build_llvm_mc.ps1`: "-Temp ... contains '%'") | A `%` in the checkout's path (or in `-Temp`). cmd.exe expands `%...%` in the generated `_build.cmd` (twice on a `CALL` line), and even with that escaped, `cl` rejects a `%` in the path-valued `/D` definitions of the test targets (`D8038: invalid argument`) however it is quoted. Older scripts failed in configure or a few hundred steps into Ninja instead | Move or clone the checkout (or choose a `-Temp`) in a folder without `%` in its path | 924| `scripts/build_runtime.ps1` stops at once: "The checkout path ... contains '%'" (`build_llvm_mc.ps1`: "-Temp ... contains '%'") | A `%` in the checkout's path (or in `-Temp`). cmd.exe expands `%...%` in the generated `_build.cmd` (twice on a `CALL` line), and even with that escaped, `cl` rejects a `%` in the path-valued `/D` definitions of the test targets (`D8038: invalid argument`) however it is quoted. Older scripts failed in configure or a few hundred steps into Ninja instead | Move or clone the checkout (or choose a `-Temp`) in a folder without `%` in its path |
802| `ctest` lists `fsr_dispatch` and `bvh_builder` as failed (`Not Run`) after clang-cl hits an internal compiler error in `fsr_dispatch_test.cpp` and `bvh_builder_test.cpp` | clang-cl 22.1.8 on Fedora (Linux cross-build) and Windows, plus 22.1.7 on Windows | Use clang-cl 23.1.6 (both files compile on Windows) | 925| `ctest` lists `fsr_dispatch` and `bvh_builder` as failed (`Not Run`) after clang-cl hits an internal compiler error in `fsr_dispatch_test.cpp` and `bvh_builder_test.cpp` | clang-cl 22.1.8 on Fedora (Linux cross-build) and Windows, plus 22.1.7 on Windows | Use clang-cl 23.1.6 (both files compile on Windows) |