diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 17:15:39 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 17:15:39 -0500 |
| commit | 438859b525e8a4e8c55669da0252f143a6d49751 (patch) | |
| tree | b2baee7c71ed4105cca6d4a841882f2a2786aa63 /docs/testing.md | |
| parent | 88b8dbad9d59aab22da34c49035bd7841c822633 (diff) | |
| parent | 9f25f1ef2c9000c3d463bc4f5358cfcfd41a0c76 (diff) | |
Merge main into RT-SLOT41 (#377)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/testing.md')
| -rw-r--r-- | docs/testing.md | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/docs/testing.md b/docs/testing.md index 743d7b640..f8246f888 100644 --- a/docs/testing.md +++ b/docs/testing.md | |||
| @@ -2,13 +2,14 @@ | |||
| 2 | 2 | ||
| 3 | The GPU tests are small hand-written RDNA2 programs in `runtime/test/shaders`. They are translated to SPIR-V and run | 3 | The GPU tests are small hand-written RDNA2 programs in `runtime/test/shaders`. They are translated to SPIR-V and run |
| 4 | on your GPU, and the results are compared with what the RDNA2 hardware gives. They need no game files, and every | 4 | on your GPU, and the results are compared with what the RDNA2 hardware gives. They need no game files, and every |
| 5 | result helps: post it in [#166](https://github.com/ItsNotRexed/Leonida/issues/166), one comment per GPU and driver. | 5 | result helps: submit a pull request adding a record under [`gpu-test-results/`](../gpu-test-results), following |
| 6 | the existing files there and [CONTRIBUTING.md](../CONTRIBUTING.md). | ||
| 6 | If your GPU is already covered there, testing an open pull request from the review queue in the [coordination | 7 | If your GPU is already covered there, testing an open pull request from the review queue in the [coordination |
| 7 | issue][claims] helps more. | 8 | issue][claims] helps more. |
| 8 | 9 | ||
| 9 | This page collects the setup steps and the problems testers have run into so far. | 10 | This page collects the setup steps and the problems testers have run into so far. |
| 10 | 11 | ||
| 11 | [claims]: https://github.com/ItsNotRexed/Leonida/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22 | 12 | [claims]: https://github.com/ubiquitarianism/leonida/issues/14 |
| 12 | 13 | ||
| 13 | ## What you need | 14 | ## What you need |
| 14 | 15 | ||
| @@ -143,7 +144,7 @@ Write-Output "Test exit code: $LASTEXITCODE" | |||
| 143 | ``` | 144 | ``` |
| 144 | 145 | ||
| 145 | Report the executable name, the workflow run and its commit, your GPU and driver, | 146 | Report the executable name, the workflow run and its commit, your GPU and driver, |
| 146 | the exit code, and the test summary in [#166](https://github.com/ItsNotRexed/Leonida/issues/166). | 147 | the exit code, and the test summary in your `gpu-test-results/` record. |
| 147 | Label it as a single-test run so the result is easy to distinguish from a full suite run. | 148 | Label it as a single-test run so the result is easy to distinguish from a full suite run. |
| 148 | 149 | ||
| 149 | ## Run them | 150 | ## Run them |
| @@ -170,16 +171,6 @@ python -I runtime/test/shaders/build.py <out dir> | |||
| 170 | python -I runtime/test/shaders/check.py <out dir> <folder with the test programs> | 171 | python -I runtime/test/shaders/check.py <out dir> <folder with the test programs> |
| 171 | ``` | 172 | ``` |
| 172 | 173 | ||
| 173 | For the standalone `v_mullit_f32` readback, build the full-screen triangle and the | ||
| 174 | hand-written semantic fixture, then run 120 draws with runtime SGPR inputs. | ||
| 175 | The driver checks every pixel against an integer product rounded to 24 bits. | ||
| 176 | It reports the input words, pixel and channel on the first mismatch. | ||
| 177 | |||
| 178 | ```sh | ||
| 179 | python -I runtime/test/shaders/build.py <out-dir> vs_ids ps_mullit | ||
| 180 | python -I runtime/test/shaders/mullit_readback.py <out-dir> <harness-directory> | ||
| 181 | ``` | ||
| 182 | |||
| 183 | For 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"). | 174 | For 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"). |
| 184 | 175 | ||
| 185 | `vk_compute_test`, `vk_bindless_test` and `vk_image_fuzz` read `LEONIDA_VK_VALIDATION` too (`vk_compute_test` | 176 | `vk_compute_test`, `vk_bindless_test` and `vk_image_fuzz` read `LEONIDA_VK_VALIDATION` too (`vk_compute_test` |
| @@ -345,6 +336,17 @@ on an Apple M3 Max (MoltenVK 1.4.2 and 1.4.3): 17 workgroup shapes from 1 to 102 | |||
| 345 | subgroups, with and without full subgroups and register pressure, all 32 lanes in order. A device whose default | 336 | subgroups, with and without full subgroups and register pressure, all 32 lanes in order. A device whose default |
| 346 | isn't the requested size still prints `not available`, and those tests skip. | 337 | isn't the requested size still prints `not available`, and those tests skip. |
| 347 | 338 | ||
| 339 | `cs_w32_shift64` checks `v_lshlrev_b64`, `v_lshrrev_b64` and `v_ashrrev_i64` with 64 memory-fed cases: | ||
| 340 | eight boundary values crossed with counts 0, 1, 31, 32, 33, 63, 64 and 65. The expected values come from Python | ||
| 341 | integers using the low six count bits, as specified by the [RDNA2 ISA, VOP3 opcodes 767–769](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content). | ||
| 342 | It also overlaps the destination with the count, one source word or the entire source pair. Both GPU runners | ||
| 343 | compare all 640 heap words (384 results and 256 unchanged input words); the operands are loaded at runtime so | ||
| 344 | the driver cannot replace the tested operations with constant-folded answers. Run it alone with | ||
| 345 | `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_shift64 --require-pass`. | ||
| 346 | It needs shader Int64 support; a device that lacks it reports a skip. This is a wave32 test of 64-bit values, | ||
| 347 | independent of wave64 emulation. On RTX 3080 Ti (616.92, Windows 11), all 640 words matched; replacing the count | ||
| 348 | mask with 31 or the arithmetic shift with a logical shift made the test fail at words 66 and 251 respectively. | ||
| 349 | |||
| 348 | ## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) | 350 | ## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) |
| 349 | 351 | ||
| 350 | Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the | 352 | Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the |
| @@ -708,9 +710,14 @@ CS, 10,974 PS). | |||
| 708 | 710 | ||
| 709 | ## Posting your result | 711 | ## Posting your result |
| 710 | 712 | ||
| 711 | Use the template at the top of [#166](https://github.com/ItsNotRexed/Leonida/issues/166): GPU, driver, subgroup | 713 | Submit a pull request adding a file under [`gpu-test-results/`](../gpu-test-results), using the existing files |
| 712 | range, OS, the commit you built, the tool versions and the counts each script printed. Post counts and pass/fail | 714 | there as format examples. Follow [CONTRIBUTING.md](../CONTRIBUTING.md) and claim the work in the |
| 713 | lines only, never shaders or logs from the game. A failure that isn't in the table above gets its own issue, linked | 715 | [coordination issue][claims] before opening the pull request. |
| 714 | from your entry. | 716 | |
| 717 | Include your GPU, driver, subgroup range, OS, the commit you built, the tool versions, and the pass, skip and fail | ||
| 718 | counts each script printed. Label a single-test run clearly instead of presenting it as a full suite run. | ||
| 719 | Post counts and pass/fail lines only, never shaders or logs from the game. A failure that is not in the table | ||
| 720 | above gets its own issue, linked from your record. | ||
| 715 | 721 | ||
| 716 | Use your system's detected CPU, GPU, VRAM and RAM model names in the #166 entry, not benchmark scores. For a rough browser-based check against reference profiles, you can use [Can I Run Leonida](https://assttro.github.io/can-i-run-leonida/). | 722 | Use your system's detected CPU, GPU, VRAM and RAM model names in your result record, not benchmark scores. |
| 723 | For a rough browser-based check against reference profiles, you can use [Can I Run Leonida](https://assttro.github.io/can-i-run-leonida/). | ||