diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 15:12:43 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 15:12:43 -0500 |
| commit | aef623982ccb48da3e4846a2d353060e482ef555 (patch) | |
| tree | 7f0fd2d46c7e2400ffe614429a10ffbc24da2ef0 /docs/testing.md | |
| parent | 8ae8b256430b41fb3c2344921be968d043b67c59 (diff) | |
| parent | f1e8035314259d0838c4b39c5b2c56eba383dd55 (diff) | |
Merge pull request #2869 from Shrey Ratna
Diffstat (limited to 'docs/testing.md')
| -rw-r--r-- | docs/testing.md | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/docs/testing.md b/docs/testing.md index fd672ca14..53e54b2fb 100644 --- a/docs/testing.md +++ b/docs/testing.md | |||
| @@ -268,13 +268,17 @@ cmake -S runtime -B runtime/build/linux && cmake --build runtime/build/linux --p | |||
| 268 | python -I scripts/run_gpu_tests.py --build runtime/build/linux --llvm-mc /usr/lib/llvm-18/bin/llvm-mc | 268 | python -I scripts/run_gpu_tests.py --build runtime/build/linux --llvm-mc /usr/lib/llvm-18/bin/llvm-mc |
| 269 | LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime/build/linux \ | 269 | LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime/build/linux \ |
| 270 | --llvm-mc /usr/lib/llvm-18/bin/llvm-mc --filter cs_ | 270 | --llvm-mc /usr/lib/llvm-18/bin/llvm-mc --filter cs_ |
| 271 | LEONIDA_BARY_FALLBACK=1 python -I scripts/run_gpu_tests.py --build runtime/build/linux \ | ||
| 272 | --llvm-mc /usr/lib/llvm-18/bin/llvm-mc | ||
| 271 | ``` | 273 | ``` |
| 272 | 274 | ||
| 273 | With Mesa 25.2 (llvmpipe, LLVM 20) the first run passes 52 of 88 and skips 36, the second passes 37 of 39 and | 275 | With Mesa 25.2 (llvmpipe, LLVM 20) the first run passes 52 of 88 and skips 36, the second passes 37 of 39 and |
| 274 | skips 2. The skips are expected: llvmpipe has 8-wide subgroups (so every wave64 test skips without emulation, and | 276 | skips 2. The skips are expected: llvmpipe has 8-wide subgroups (so every wave64 test skips without emulation, and |
| 275 | the 32-lane tests `ps_bitmask_perm`, `cs_wqm_w32` and `cs_w32_lane_wrap` skip in both runs), no | 277 | the 32-lane tests `ps_bitmask_perm`, `cs_wqm_w32` and `cs_w32_lane_wrap` skip in both runs), no |
| 276 | `VK_KHR_fragment_shader_barycentric` (`ps_bary`, `ps_uniform_branch`, `ps_scc_mask32`) and no | 278 | `VK_KHR_fragment_shader_barycentric` (`ps_bary`, `ps_uniform_branch`, `ps_scc_mask32`) and no |
| 277 | `VK_KHR_maintenance8` (`ps_texoff`). With | 279 | `VK_KHR_maintenance8` (`ps_texoff`). The third run draws those three barycentric tests through the fallback below |
| 280 | (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 | ||
| 281 | geometry shader passes. With | ||
| 278 | `LEONIDA_W64_EMULATE=1` the mesh tests abort inside llvmpipe's compiler ("LLVM ERROR: Cannot emit physreg copy | 282 | `LEONIDA_W64_EMULATE=1` the mesh tests abort inside llvmpipe's compiler ("LLVM ERROR: Cannot emit physreg copy |
| 279 | instruction"), which is why the second run is limited to compute. llvmpipe is not a substitute for a result from a | 283 | instruction"), which is why the second run is limited to compute. llvmpipe is not a substitute for a result from a |
| 280 | real GPU in [#166](https://github.com/ItsNotRexed/Leonida/issues/166): it catches regressions, not hardware | 284 | real GPU in [#166](https://github.com/ItsNotRexed/Leonida/issues/166): it catches regressions, not hardware |
| @@ -283,13 +287,17 @@ differences. | |||
| 283 | ## GPUs without fragment barycentrics (NVIDIA Volta, Pascal and older) | 287 | ## GPUs without fragment barycentrics (NVIDIA Volta, Pascal and older) |
| 284 | 288 | ||
| 285 | `ps_bary`, `ps_uniform_branch` and `ps_scc_mask32` read raw barycentrics, which need | 289 | `ps_bary`, `ps_uniform_branch` and `ps_scc_mask32` read raw barycentrics, which need |
| 286 | `VK_KHR_fragment_shader_barycentric`; so do `ps_interp_f16_high` and `ms_f16_pack` (16-bit interpolants are | 290 | `VK_KHR_fragment_shader_barycentric`. NVIDIA has it from Turing on; Volta (V100, Titan V) and older lack it, as do |
| 287 | `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 | 291 | llvmpipe and some other drivers. Where the device lacks it those three are skipped; that's expected, not a failure. |
| 288 | llvmpipe and some other drivers. Where the device lacks it they're skipped; that's expected, not a failure. To | 292 | To test the fallback that runs them anyway, set `LEONIDA_BARY_FALLBACK=1`, **for both `build.py` and `check.py`** |
| 289 | test the fallback that runs them anyway, set `LEONIDA_BARY_FALLBACK=1`, **for both `build.py` and `check.py`** (or | 293 | (or for `run_gpu_tests.py`; CI does this on llvmpipe). The shaders are then translated with `--bary-fallback` and |
| 290 | for `run_gpu_tests.py`). The shaders are then translated with `--bary-fallback` and drawn through a pass-through | 294 | drawn through a pass-through geometry shader that supplies the barycentrics (`docs/design.md`, "Barycentric |
| 291 | geometry shader that supplies the barycentrics (`docs/design.md`, "Barycentric fallback"), so the device needs | 295 | fallback"), so the device needs geometry shaders instead. |
| 292 | geometry shaders instead. | 296 | |
| 297 | `ps_interp_f16_high` and `ms_f16_pack` read 16-bit interpolants as `PerVertexKHR` inputs, which need the extension | ||
| 298 | too and which `--bary-fallback` can't express. With `LEONIDA_F16_INTERP_FALLBACK=1` they read halves the producer | ||
| 299 | exports decoded instead (see Macs, below) and run with or without the bary fallback; `run_gpu_tests.py` turns that | ||
| 300 | on by itself where the device lacks the extension. Under the bary fallback without it they skip. | ||
| 293 | 301 | ||
| 294 | ## Macs: 16-bit interpolation without PerVertexKHR | 302 | ## Macs: 16-bit interpolation without PerVertexKHR |
| 295 | 303 | ||