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:
authorKacper Serewis <kacper@serewis.nl>2026-11-22 23:05:26 +0100
committerKacper Serewis <kacper@serewis.nl>2026-11-22 23:05:26 +0100
commit7974b89a029dea4a79f2af33c9a69b618d040cd7 (patch)
treecb04ec345e5739cefb55b9424e4e6ecc1b2a2581 /docs/testing.md
parent7cfd20230afd829e719db1914aedffebfc422737 (diff)
parent4c52ce27a6cf4af2bbf07a343ede39c5f1572b8d (diff)
Merge official main into SHADER-605 and record independent GPU results
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md112
1 files changed, 99 insertions, 13 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 2733b79bf..45e294137 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -126,8 +126,28 @@ python -I runtime/test/shaders/build.py <out dir>
126python -I runtime/test/shaders/check.py <out dir> <folder with the test programs> 126python -I runtime/test/shaders/check.py <out dir> <folder with the test programs>
127``` 127```
128 128
129For the standalone `v_mullit_f32` readback, build the full-screen triangle and the
130hand-written semantic fixture, then run 120 draws with runtime SGPR inputs.
131The driver checks every pixel against an integer product rounded to 24 bits.
132It reports the input words, pixel and channel on the first mismatch.
133
134```sh
135python -I runtime/test/shaders/build.py <out-dir> vs_ids ps_mullit
136python -I runtime/test/shaders/mullit_readback.py <out-dir> <harness-directory>
137```
138
129For D3D12/runtime tests, `LEONIDA_VK_VALIDATION=1` enables `VK_LAYER_KHRONOS_validation`. When running with validation, set `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` if MSI Afterburner (RivaTuner) or OBS is installed: their overlay layers can add unsupported swapchain usage, and in an elevated (administrator) terminal the loader ignores `VK_LOADER_LAYERS_DISABLE=~implicit~` (see "Known problems"). 139For D3D12/runtime tests, `LEONIDA_VK_VALIDATION=1` enables `VK_LAYER_KHRONOS_validation`. When running with validation, set `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` if MSI Afterburner (RivaTuner) or OBS is installed: their overlay layers can add unsupported swapchain usage, and in an elevated (administrator) terminal the loader ignores `VK_LOADER_LAYERS_DISABLE=~implicit~` (see "Known problems").
130 140
141The shader test programs (`vk_harness`, `vk_compute_test`, `vk_store_test`, `vk_texture_test`, `vk_bindless_test`,
142`vk_sampler_test`, `vk_image_fuzz`) don't read `LEONIDA_VK_VALIDATION`. To check one, load the layer through the
143loader and run it by hand, for example
144`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1 vk_compute_test x.spv 1 dump`.
145The layer prints its messages to stdout and the program's exit status doesn't change, and `run_gpu_tests.py` shows
146only each test's last line, so read the program's own output. GPU-assisted validation (`..._GPUAV_ENABLE=1`)
147instruments the translated shaders and reports what they actually do at run time: out-of-bounds buffer accesses, and
148an image read through a view whose numeric type doesn't match the shader's (a T# FORMAT that disagrees with the
149bound view). It runs on llvmpipe. `VK_KHRONOS_VALIDATION_VALIDATE_SYNC=1` adds synchronization validation.
150
131## The Windows runtime on Linux, under Wine or Proton 151## The Windows runtime on Linux, under Wine or Proton
132 152
133The Linux build above makes only the Vulkan programs. The loader (`gta6rt`), its shims and their tests are Windows 153The Linux build above makes only the Vulkan programs. The loader (`gta6rt`), its shims and their tests are Windows
@@ -145,6 +165,15 @@ cmake --build runtime/build/windows --parallel
145WINEPREFIX="$HOME/.local/share/leonida-wine" ctest --test-dir runtime/build/windows 165WINEPREFIX="$HOME/.local/share/leonida-wine" ctest --test-dir runtime/build/windows
146``` 166```
147 167
168Use a recent xwin: 0.10.0 lays out SDK 10.0.26100 with the command above, while 0.6.5 stops with "unable to find
169x86_64 headers for Win11SDK_10.0.26100".
170
171On a machine without a display (a server, a container, WSL without WSLg), Wine has no graphics driver to create a
172Vulkan instance with, so every Vulkan test fails with `vkCreateInstance failed (VkResult -3)` and, with
173`WINEDEBUG=+vulkan`, "Failed to load Wine graphics driver supporting Vulkan". Run the tests under a virtual X server,
174as CI does: `WINEPREFIX="$HOME/.local/share/leonida-wine" xvfb-run -a ctest --test-dir runtime/build/windows`
175(packages `xvfb` and `xauth`, which `xvfb-run` needs). With Mesa installed, the tests then run on llvmpipe.
176
148The build type defaults to `RelWithDebInfo`: xwin leaves out the debug CRT, so `Debug` needs `--include-debug-libs`. 177The build type defaults to `RelWithDebInfo`: xwin leaves out the debug CRT, so `Debug` needs `--include-debug-libs`.
149`make_game.py`'s `runtime` stage makes this same build on Linux when the tools and the SDK are there (`--runtime-build 178`make_game.py`'s `runtime` stage makes this same build on Linux when the tools and the SDK are there (`--runtime-build
150runtime/build/windows` takes a folder made by hand like a Windows build). CMake packages are 179runtime/build/windows` takes a folder made by hand like a Windows build). CMake packages are
@@ -170,6 +199,12 @@ To test the wave64 emulation that makes them exact on these GPUs, set `LEONIDA_W
170`check.py`, the shaders are checked against the emulated expectations without being emulated, and every wave64 test 199`check.py`, the shaders are checked against the emulated expectations without being emulated, and every wave64 test
171fails. 200fails.
172 201
202`ps_bitmask_perm` is a wave32 pixel shader, and a pixel shader's width can't be requested on every device. Intel
203drivers report subgroups of 8..32 and may run it 8 or 16 wide; its second pattern reads lanes 16-31, which then
204don't run. The test skips when the frame shows that (#1318), and the translation gives 0 for a source lane that
205isn't running instead of an undefined value (#618). At 16 wide the first pattern stays inside the running lanes, so
206it is still checked before the skip.
207
173## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) 208## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`)
174 209
175Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the 210Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the
@@ -206,6 +241,39 @@ Each line prints `ok`, a `SKIP` with its reason, or what differed. To add a fixt
2063. Add it to `EXPECT` in `tests/test_wave64_halves_fixtures.py` with the tier, reasons and idioms the translator 2413. Add it to `EXPECT` in `tests/test_wave64_halves_fixtures.py` with the tier, reasons and idioms the translator
207 should give it, and run `python -m pytest tests/test_wave64_halves_fixtures.py`. 242 should give it, and run `python -m pytest tests/test_wave64_halves_fixtures.py`.
2084. Run `w64_graphics.py` on a RADV GPU and say which GPU and Mesa version in the pull request. 2434. Run `w64_graphics.py` on a RADV GPU and say which GPU and Mesa version in the pull request.
244## GPUs with 128 bytes of push constants (AMD RDNA2 iGPUs on Windows, some Intel Arc drivers)
245
246The translated shaders take 144 bytes of push constants: s0..s31, then the heap base and the code base. A device whose
247`maxPushConstantsSize` is 128, Vulkan's minimum, can't take that, so the texture tests and every test drawn through
248`vk_harness` skip there (`unsupported: need 144 push constant bytes, device has 128`); `vulkaninfo` shows the limit.
249AMD's Windows driver reports 128 on RDNA2 iGPUs (Radeon 680M, 610M, the Ryzen 7000 iGPU); RADV reports more on the
250same chips.
251
252To run them anyway, set `LEONIDA_PC_TAIL_UBO=1` **for both `build.py` and `check.py`** (or for
253`run_gpu_tests.py`). The shaders are then translated with `--pc-tail-ubo`: s0..s31 stay in 128 push-constant bytes,
254and the heap base and code base move to a uniform block at set 1 (`docs/design.md`, "Push-constant tail as a uniform
255block"), which `vk_compute_test`, `vk_store_test`, `vk_harness`, `vk_texture_test`, `vk_sampler_test` and
256`vk_bindless_test` bind (`runtime/test/vk_pc_tail.h`). If you set it
257only for `check.py`, the shaders read the tail from push constants the programs no longer declare. `--mesh-compute`
258(`LEONIDA_MESH_COMPUTE=1`) isn't combined with it yet: its vertex shader still reads the output address from push
259constants, so those tests skip.
260
261## GPUs with 128 bytes of push constants (AMD RDNA2 iGPUs on Windows, some Intel Arc drivers)
262
263The translated shaders take 144 bytes of push constants: s0..s31, then the heap base and the code base. A device whose
264`maxPushConstantsSize` is 128, Vulkan's minimum, can't take that, so the texture tests and every test drawn through
265`vk_harness` skip there (`unsupported: need 144 push constant bytes, device has 128`); `vulkaninfo` shows the limit.
266AMD's Windows driver reports 128 on RDNA2 iGPUs (Radeon 680M, 610M, the Ryzen 7000 iGPU); RADV reports more on the
267same chips.
268
269To run them anyway, set `LEONIDA_PC_TAIL_UBO=1` **for both `build.py` and `check.py`** (or for
270`run_gpu_tests.py`). The shaders are then translated with `--pc-tail-ubo`: s0..s31 stay in 128 push-constant bytes,
271and the heap base and code base move to a uniform block at set 1 (`docs/design.md`, "Push-constant tail as a uniform
272block"), which `vk_compute_test`, `vk_store_test`, `vk_harness`, `vk_texture_test`, `vk_sampler_test` and
273`vk_bindless_test` bind (`runtime/test/vk_pc_tail.h`). If you set it
274only for `check.py`, the shaders read the tail from push constants the programs no longer declare. `--mesh-compute`
275(`LEONIDA_MESH_COMPUTE=1`) isn't combined with it yet: its vertex shader still reads the output address from push
276constants, so those tests skip.
209 277
210## GPUs without mesh shaders (NVIDIA Pascal and older) 278## GPUs without mesh shaders (NVIDIA Pascal and older)
211 279
@@ -226,13 +294,17 @@ cmake -S runtime -B runtime/build/linux && cmake --build runtime/build/linux --p
226python -I scripts/run_gpu_tests.py --build runtime/build/linux --llvm-mc /usr/lib/llvm-18/bin/llvm-mc 294python -I scripts/run_gpu_tests.py --build runtime/build/linux --llvm-mc /usr/lib/llvm-18/bin/llvm-mc
227LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime/build/linux \ 295LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime/build/linux \
228 --llvm-mc /usr/lib/llvm-18/bin/llvm-mc --filter cs_ 296 --llvm-mc /usr/lib/llvm-18/bin/llvm-mc --filter cs_
297LEONIDA_BARY_FALLBACK=1 python -I scripts/run_gpu_tests.py --build runtime/build/linux \
298 --llvm-mc /usr/lib/llvm-18/bin/llvm-mc
229``` 299```
230 300
231With Mesa 25.2 (llvmpipe, LLVM 20) the first run passes 52 of 88 and skips 36, the second passes 37 of 39 and 301With Mesa 25.2 (llvmpipe, LLVM 20) the first run passes 52 of 88 and skips 36, the second passes 37 of 39 and
232skips 2. The skips are expected: llvmpipe has 8-wide subgroups (so every wave64 test skips without emulation, and 302skips 2. The skips are expected: llvmpipe has 8-wide subgroups (so every wave64 test skips without emulation, and
233the 32-lane tests `ps_bitmask_perm`, `cs_wqm_w32` and `cs_w32_lane_wrap` skip in both runs), no 303the 32-lane tests `ps_bitmask_perm`, `cs_wqm_w32` and `cs_w32_lane_wrap` skip in both runs), no
234`VK_KHR_fragment_shader_barycentric` (`ps_bary`, `ps_uniform_branch`, `ps_scc_mask32`) and no 304`VK_KHR_fragment_shader_barycentric` (`ps_bary`, `ps_uniform_branch`, `ps_scc_mask32`) and no
235`VK_KHR_maintenance8` (`ps_texoff`). With 305`VK_KHR_maintenance8` (`ps_texoff`). The third run draws those three barycentric tests through the fallback below
306(with Mesa 26.0.8 it passes 123 of 189, the first run 120), and CI fails it unless every shader that got a fallback
307geometry shader passes. With
236`LEONIDA_W64_EMULATE=1` the mesh tests abort inside llvmpipe's compiler ("LLVM ERROR: Cannot emit physreg copy 308`LEONIDA_W64_EMULATE=1` the mesh tests abort inside llvmpipe's compiler ("LLVM ERROR: Cannot emit physreg copy
237instruction"), which is why the second run is limited to compute. llvmpipe is not a substitute for a result from a 309instruction"), which is why the second run is limited to compute. llvmpipe is not a substitute for a result from a
238real GPU in [#166](https://github.com/ItsNotRexed/Leonida/issues/166): it catches regressions, not hardware 310real GPU in [#166](https://github.com/ItsNotRexed/Leonida/issues/166): it catches regressions, not hardware
@@ -241,13 +313,17 @@ differences.
241## GPUs without fragment barycentrics (NVIDIA Volta, Pascal and older) 313## GPUs without fragment barycentrics (NVIDIA Volta, Pascal and older)
242 314
243`ps_bary`, `ps_uniform_branch` and `ps_scc_mask32` read raw barycentrics, which need 315`ps_bary`, `ps_uniform_branch` and `ps_scc_mask32` read raw barycentrics, which need
244`VK_KHR_fragment_shader_barycentric`; so do `ps_interp_f16_high` and `ms_f16_pack` (16-bit interpolants are 316`VK_KHR_fragment_shader_barycentric`. NVIDIA has it from Turing on; Volta (V100, Titan V) and older lack it, as do
245`PerVertexKHR` inputs, and `--bary-fallback` cannot express them, so they skip under it). NVIDIA has it from Turing on; Volta (V100, Titan V) and older lack it, as do 317llvmpipe and some other drivers. Where the device lacks it those three are skipped; that's expected, not a failure.
246llvmpipe and some other drivers. Where the device lacks it they're skipped; that's expected, not a failure. To 318To test the fallback that runs them anyway, set `LEONIDA_BARY_FALLBACK=1`, **for both `build.py` and `check.py`**
247test the fallback that runs them anyway, set `LEONIDA_BARY_FALLBACK=1`, **for both `build.py` and `check.py`** (or 319(or for `run_gpu_tests.py`; CI does this on llvmpipe). The shaders are then translated with `--bary-fallback` and
248for `run_gpu_tests.py`). The shaders are then translated with `--bary-fallback` and drawn through a pass-through 320drawn through a pass-through geometry shader that supplies the barycentrics (`docs/design.md`, "Barycentric
249geometry shader that supplies the barycentrics (`docs/design.md`, "Barycentric fallback"), so the device needs 321fallback"), so the device needs geometry shaders instead.
250geometry shaders instead. 322
323`ps_interp_f16_high` and `ms_f16_pack` read 16-bit interpolants as `PerVertexKHR` inputs, which need the extension
324too and which `--bary-fallback` can't express. With `LEONIDA_F16_INTERP_FALLBACK=1` they read halves the producer
325exports decoded instead (see Macs, below) and run with or without the bary fallback; `run_gpu_tests.py` turns that
326on by itself where the device lacks the extension. Under the bary fallback without it they skip.
251 327
252## Macs: 16-bit interpolation without PerVertexKHR 328## Macs: 16-bit interpolation without PerVertexKHR
253 329
@@ -269,12 +345,16 @@ without it they're skipped, which is expected, not a failure. To test the fallba
269## Fused multiply-add: GLSL Fma or OpFmaKHR 345## Fused multiply-add: GLSL Fma or OpFmaKHR
270 346
271`cs_fma_fused` checks that `v_fma_f32`, `v_fmac_f32`, `v_fmaak_f32`, `v_fmamk_f32` (and one `v_fma_f16`) round once, on 347`cs_fma_fused` checks that `v_fma_f32`, `v_fmac_f32`, `v_fmaak_f32`, `v_fmamk_f32` (and one `v_fma_f16`) round once, on
272operands taken from user SGPRs so the driver cannot fold them. It passes with the default translation (`--fma glsl`, 348operands taken from user SGPRs so the driver cannot fold them. Run it with default `--fma glsl` (GLSL.std.450 `Fma`) or
273GLSL.std.450 `Fma`) and with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. 349with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`.
274That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit 350That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit
27577 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL 35177 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL
276`Fma` into two roundings, which is why `khr` exists. Neither the AMD (26.11.2) nor the NVIDIA (617.42) driver we tried 352`Fma` into two roundings, which is why `khr` exists: on AMD Windows (26.11.2) and NVIDIA (617.42) GLSL `Fma` stayed
277does, so `cs_fma_fused` passing with `glsl` is not evidence that every driver is safe. 353fused, whereas **Mesa RADV (26.2.6-arch3.1, AMD Radeon RX 6800, Linux)** splits 5 of the 7 f32 ops under `--fma glsl`
354(reusing the live `a * a` product in `v3`) and returns 8/8 fused exact under `LEONIDA_FMA=khr`. Under default
355`--fma glsl`, `check.py` and `run_gpu_tests.py` therefore accept either the fused or the exact split word for each of
356the 7 f32 outputs while still requiring exact f16 round-to-odd (`0x00007351`); under `LEONIDA_FMA=khr`, all 8 words
357must be strictly fused.
278 358
279## Hardware oracle (optional, AMD) 359## Hardware oracle (optional, AMD)
280 360
@@ -307,10 +387,12 @@ The GPU tools of `runtime/test/shaders` (`vk_compute_test`, `vk_harness`, ...) r
307 387
308| What you see | Cause | What to do | 388| What you see | Cause | What to do |
309|---|---|---| 389|---|---|---|
390| `ctest` passes but runs far fewer tests than expected (about 45 instead of 125 on Windows), no `d3d12_*` GPU tests, and `LEONIDA_D3D12=vulkan` does nothing | CMake found no Vulkan headers: `VULKAN_SDK` was not set in the environment that ran CMake (for example a user variable set after the terminal opened), and `CMakeCache.txt` keeps that failed lookup. The configure prints a `CMake Warning` "Vulkan headers not found" | Set `VULKAN_SDK` in that environment (or pass `-DLEONIDA_VULKAN_HEADERS_FETCH=ON`), delete `CMakeCache.txt` and configure again. `-DLEONIDA_REQUIRE_VULKAN=ON` makes this a configure error; CI and `scripts/build_runtime.ps1` (with `VULKAN_SDK` set) pass it |
310| Windows refuses to start freshly built test programs ("An Application Control policy has blocked this file"), and the runner stops with a traceback | Smart App Control on Windows 11 | Turn Smart App Control off for the run | 391| Windows refuses to start freshly built test programs ("An Application Control policy has blocked this file"), and the runner stops with a traceback | Smart App Control on Windows 11 | Turn Smart App Control off for the run |
311| Validation errors without a VUID, or messages from a layer you didn't ask for | An implicit Vulkan layer from other software (Rockstar Social Club, ReShade, MangoHud, an overlay) | Set `VK_LOADER_LAYERS_DISABLE=~implicit~`. Overlays that hook the swapchain (RivaTuner `VK_LAYER_RTSS`, OBS `VK_LAYER_OBS_HOOK`) can stay loaded: see the next row | 392| Validation errors without a VUID, or messages from a layer you didn't ask for | An implicit Vulkan layer from other software (Rockstar Social Club, ReShade, MangoHud, an overlay) | Set `VK_LOADER_LAYERS_DISABLE=~implicit~`. Overlays that hook the swapchain (RivaTuner `VK_LAYER_RTSS`, OBS `VK_LAYER_OBS_HOOK`) can stay loaded: see the next row |
312| Validation errors that only your machine shows (e.g. `xbox_present`'s sRGB swapchain `STORAGE` message), with MSI Afterburner/RivaTuner or OBS installed | An overlay layer that hooks the swapchain: while RivaTuner Statistics Server is running, its `VK_LAYER_RTSS` adds `STORAGE` usage to it (OBS's `VK_LAYER_OBS_HOOK` injects `VK_IMAGE_USAGE_STORAGE_BIT` too). In an elevated (administrator) terminal the loader ignores `VK_LOADER_LAYERS_DISABLE` (`VK_LOADER_DEBUG=all` says so), so `~implicit~` leaves the layer in | Run the tests from a normal terminal, close the overlay application, or set the layer's own switch, which works elevated too: `DISABLE_RTSS_LAYER=1`, `DISABLE_VULKAN_OBS_CAPTURE=1` (OBS). Any other layer's switch is the `disable_environment` entry in its manifest (the JSON listed under `HKLM\SOFTWARE\Khronos\Vulkan\ImplicitLayers` or `HKCU\...`). `VK_LOADER_DEBUG=layer` prints the layers that were actually inserted | 393| Validation errors that only your machine shows (e.g. `xbox_present`'s sRGB swapchain `STORAGE` message), with MSI Afterburner/RivaTuner or OBS installed | An overlay layer that hooks the swapchain: while RivaTuner Statistics Server is running, its `VK_LAYER_RTSS` adds `STORAGE` usage to it (OBS's `VK_LAYER_OBS_HOOK` injects `VK_IMAGE_USAGE_STORAGE_BIT` too). In an elevated (administrator) terminal the loader ignores `VK_LOADER_LAYERS_DISABLE` (`VK_LOADER_DEBUG=all` says so), so `~implicit~` leaves the layer in | Run the tests from a normal terminal, close the overlay application, or set the layer's own switch, which works elevated too: `DISABLE_RTSS_LAYER=1`, `DISABLE_VULKAN_OBS_CAPTURE=1` (OBS). Any other layer's switch is the `disable_environment` entry in its manifest (the JSON listed under `HKLM\SOFTWARE\Khronos\Vulkan\ImplicitLayers` or `HKCU\...`). `VK_LOADER_DEBUG=layer` prints the layers that were actually inserted |
313| `vk_sync_validation` fails with `LEONIDA_VK_VALIDATION=1` ("the write-after-write hazard was not reported") | Synchronization validation is off although the tests ask for it: an older layer, or a layer setting such as `VK_KHRONOS_VALIDATION_VALIDATE_SYNC=false` or a `vk_layer_settings.txt` that overrides it. Every other GPU test then reports "0 validation errors" without having been checked | Remove the override or update the Vulkan SDK, then rerun `ctest -R vk_sync_validation` until it passes | 394| `vk_sync_validation` fails with `LEONIDA_VK_VALIDATION=1` ("the write-after-write hazard was not reported") | Synchronization validation is off although the tests ask for it: an older layer, or a layer setting such as `VK_KHRONOS_VALIDATION_VALIDATE_SYNC=false` or a `vk_layer_settings.txt` that overrides it. Every other GPU test then reports "0 validation errors" without having been checked | Remove the override or update the Vulkan SDK, then rerun `ctest -R vk_sync_validation` until it passes |
395| On RADV with Mesa 25.2 (Ubuntu 24.04's default; 25.2.8 measured) or 25.3 (from the source, not run), `cs_w32_salu64` fails with word 2 = `0` (want `0xFFFFFFFF`) and `cs_signed_zero_nan` fails with word 5 = `0` (want `1`) | Two Mesa bugs, not translator bugs (#166). `cs_w32_salu64`: ACO's `combine_add_sub_b2i` reads a temporary without counting the use, so dead-code elimination removes it (`ACO ERROR: ... never defined` with `MESA_SHADER_CACHE_DISABLE=true`); `RADV_DEBUG=llvm` passes. `cs_signed_zero_nan`: NIR's range analysis (`fmul_is_a_number`) calls `0 * x` a number when `x` may be infinite, so the `x != x` check folds to false despite `SignedZeroInfNanPreserve`. The same NIR code is behind llvmpipe's word 5 (#664) | Expected with these Mesa versions. From the source, the ACO function is gone from Mesa 26.0 and the NIR code was replaced in 26.1 (neither run); RADV from Mesa 26.3.1 passes both on an 8060S (gfx1151) |
314| Every test crashes inside `libnvidia-eglcore.so` | NVIDIA's 535 server driver (Ubuntu 24.04's default) | Use driver 615 or newer | 396| Every test crashes inside `libnvidia-eglcore.so` | NVIDIA's 535 server driver (Ubuntu 24.04's default) | Use driver 615 or newer |
315| `build.py`: 0 translated, reason `.text` | An old `build.py` with LLVM 19 | Update to current `main` | 397| `build.py`: 0 translated, reason `.text` | An old `build.py` with LLVM 19 | Update to current `main` |
316| `vk_harness` doesn't compile: `VK_KHR_maintenance8` names unknown | Vulkan headers older than the SDK the code was written against | Update to current `main` (the code now builds without it), or use current Khronos Vulkan-Headers; conda-forge's package is too old | 398| `vk_harness` doesn't compile: `VK_KHR_maintenance8` names unknown | Vulkan headers older than the SDK the code was written against | Update to current `main` (the code now builds without it), or use current Khronos Vulkan-Headers; conda-forge's package is too old |
@@ -326,6 +408,7 @@ The GPU tools of `runtime/test/shaders` (`vk_compute_test`, `vk_harness`, ...) r
326| `run_gpu_tests.py` fails on a `dict \| None` annotation | Python older than 3.10 | Use Python 3.11+ | 408| `run_gpu_tests.py` fails on a `dict \| None` annotation | Python older than 3.10 | Use Python 3.11+ |
327| `vulkaninfo` lists `Microsoft Direct3D12 (<gpu>)` next to the real GPU and the tests run on it | The Windows "OpenCL™, OpenGL® and Vulkan® Compatibility Pack" installs Mesa's Dozen, a Vulkan-on-D3D12 layer that reports `DISCRETE_GPU` like the native card | Current `main` prefers a native ICD over Microsoft's vendor (`0x1414`) in the runtime and every harness; set `LEONIDA_VK_DEVICE=<part of the real GPU name>` to select explicitly. See #915. | 409| `vulkaninfo` lists `Microsoft Direct3D12 (<gpu>)` next to the real GPU and the tests run on it | The Windows "OpenCL™, OpenGL® and Vulkan® Compatibility Pack" installs Mesa's Dozen, a Vulkan-on-D3D12 layer that reports `DISCRETE_GPU` like the native card | Current `main` prefers a native ICD over Microsoft's vendor (`0x1414`) in the runtime and every harness; set `LEONIDA_VK_DEVICE=<part of the real GPU name>` to select explicitly. See #915. |
328| A GPU test that uses `image_load` (or lighting built from real shaders) reads zeros from its image; @Silliana saw every texel except pixel (0,0) come back zero in their own layer (#603, not reproduced here) | In this runtime the shader turns the T# words into an index through the descriptor hash table (`runtime/src/descriptor_table.h`: a miss gives index 0), and index 0 is a 1×1 image of zeros (`runtime/src/vulkan_bindless.h`), so a hand-built or zeroed T# that was never registered reads zeros even at (0,0). The translator does not compare coordinates with the T# size, and `cs_imgload.asm` only uses its T# words as a hash key | Register the descriptor through the runtime (for D3D12, create it with `CreateShaderResourceView`) so its T# hits the table, with the image's real width and height (stored as size − 1, see `runtime/src/gfx10_descriptors.h`) | 410| A GPU test that uses `image_load` (or lighting built from real shaders) reads zeros from its image; @Silliana saw every texel except pixel (0,0) come back zero in their own layer (#603, not reproduced here) | In this runtime the shader turns the T# words into an index through the descriptor hash table (`runtime/src/descriptor_table.h`: a miss gives index 0), and index 0 is a 1×1 image of zeros (`runtime/src/vulkan_bindless.h`), so a hand-built or zeroed T# that was never registered reads zeros even at (0,0). The translator does not compare coordinates with the T# size, and `cs_imgload.asm` only uses its T# words as a hash key | Register the descriptor through the runtime (for D3D12, create it with `CreateShaderResourceView`) so its T# hits the table, with the image's real width and height (stored as size − 1, see `runtime/src/gfx10_descriptors.h`) |
411| `cs_sample_lz_int_d16`, `ps_sample_implicit_sint`, `ps_ssharp`, `ps_tex`, `ps_texture_mip0`, `ps_texture_sample` and `ps_texture_sample_d16` crash (exit -11 or 139) on an Intel GPU on Linux, while NVIDIA and llvmpipe pass them (TEST-399) | A bug in Mesa ANV's shader compiler: compiling these texture-sampling shaders, `nir_opt_gcm` (`nir_opt_gcm.c:430`, `gcm_schedule_early_src`) dereferences a phi source an earlier pass has freed. The SPIR-V passes `spirv-val`. Seen with Mesa 26.1.6 (Arrow Lake) and 26.2.7 (Iris Xe, ADL GT2); Mesa 26.3.1 and `main` (bb98606) pass the whole suite on the same Iris Xe | Use Mesa 26.3.1 or newer. To check a newer Mesa without installing it, build its Intel Vulkan driver and point `VK_DRIVER_FILES` at its `src/intel/vulkan/intel_devenv_icd.x86_64.json` |
329 412
330### Signed zero in a float storage image (SHADER-605) 413### Signed zero in a float storage image (SHADER-605)
331 414
@@ -348,7 +431,10 @@ On a GeForce RTX 5070 with Windows driver 616.56, both formats matched 765/768 w
348In the first texel, `(-0, +0, +0, +0)`, word 0 read back as positive zero. The second texel, 431In the first texel, `(-0, +0, +0, +0)`, word 0 read back as positive zero. The second texel,
349`(-0, 1, +0, +0)`, retained every bit. In the third, `(-0, -0, +0, +0)`, words 8 and 9 both 432`(-0, 1, +0, +0)`, retained every bit. In the third, `(-0, -0, +0, +0)`, words 8 and 9 both
350read back as positive zero. All guards matched. This reproduces the discrepancy independently 433read back as positive zero. All guards matched. This reproduces the discrepancy independently
351of RDNA translation. Other GPUs and drivers have yet to be tested with this probe. 434of RDNA translation. Independent runs of the same probe reproduced those three mismatches on
435a Linux RTX 5090 (595.99.02). On Windows, a Ryzen 7 9800X3D Radeon iGPU (25.10.30.02),
436an RTX 3080 (616.64) and an RTX 3060 (621.14) preserved all 768 words in both formats.
437The device reports are in [PR #3260](https://github.com/ItsNotRexed/Leonida/pull/3260).
352 438
353## Posting your result 439## Posting your result
354 440