diff options
Diffstat (limited to 'docs/testing.md')
| -rw-r--r-- | docs/testing.md | 189 |
1 files changed, 153 insertions, 36 deletions
diff --git a/docs/testing.md b/docs/testing.md index 743d7b640..71aacf533 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` |
| @@ -227,6 +218,49 @@ and `vk_presenter_sync`, `xbox_present` and `dxgi_swapchain` pass, while they fa | |||
| 227 | compositor for those three. Six still failed with a real display: `device_proxy`, `d3d12_xs_root_signature`, | 218 | compositor for those three. Six still failed with a real display: `device_proxy`, `d3d12_xs_root_signature`, |
| 228 | `xdxr_build`, `d3d12_xdxr_rt`, `d3d12_present` and `d3d12_compute`. | 219 | `xdxr_build`, `d3d12_xdxr_rt`, `d3d12_present` and `d3d12_compute`. |
| 229 | 220 | ||
| 221 | Run one after another as above, the suite takes several seconds per test, although a test started by hand takes 0.1 to | ||
| 222 | 1 second. Four settings make a local run of the cross-build much faster: | ||
| 223 | |||
| 224 | ```sh | ||
| 225 | export WINEPREFIX="$HOME/.local/share/leonida-wine" WINEDEBUG=-all \ | ||
| 226 | WINEDLLOVERRIDES="winedbg.exe=d;winemenubuilder.exe=d" | ||
| 227 | mkdir -p "$WINEPREFIX" | ||
| 228 | xvfb-run -a sh -c 'wineserver -p; wine wineboot -u </dev/null >/dev/null 2>&1 | ||
| 229 | ctest --test-dir runtime/build/windows -j 6 --timeout 120; wineserver -k' | ||
| 230 | ``` | ||
| 231 | |||
| 232 | Start the server before `wineboot`: `wineserver -p` does nothing while another server runs for the prefix. Run | ||
| 233 | `wineboot` after it, with its output thrown away: the first Wine program a server runs starts the prefix's services, | ||
| 234 | which keep that program's output open for as long as the server lives, so a first test that started them would wait | ||
| 235 | for the end of its output until the timeout. | ||
| 236 | |||
| 237 | - `wineserver -p` keeps one Wine server for the whole run; without it a new one starts for each test. | ||
| 238 | - `winedbg.exe=d`: a test that crashes otherwise waits in Wine's debugger until its timeout. | ||
| 239 | - `winemenubuilder.exe=d`: without it `wineboot` on a fresh prefix writes `wine-extension-*.desktop` files and the MIME | ||
| 240 | cache into `~/.local/share/applications`, pointing your file associations at the test prefix. Set it before the | ||
| 241 | prefix is first made. | ||
| 242 | - `ctest -j 6` runs six tests at a time. The tests that share files under the temp directory (see "Known problems") | ||
| 243 | can then fail now and then; rerun such a failure on its own before you count it. | ||
| 244 | |||
| 245 | Measured with Wine 11.22 on llvmpipe, 40 tests of a clang-cl build (`ctest -R '^(d3d12_[a-c]|vk_[a-d]|xg)'`), adding | ||
| 246 | one setting at a time: | ||
| 247 | |||
| 248 | | Settings | Seconds | | ||
| 249 | |---|---| | ||
| 250 | | As above: one test after another | 179 | | ||
| 251 | | `wineserver -p` (and `wineboot` after it) | 35 | | ||
| 252 | | and `WINEDEBUG=-all` | 35 | | ||
| 253 | | and `winedbg.exe=d` | 35 | | ||
| 254 | | and `ctest -j 6` | 5.6 | | ||
| 255 | | `ctest -j 6` and the overrides, without `wineserver -p` | 18 | | ||
| 256 | |||
| 257 | The kept server is most of it: a test that takes 0.05 seconds with it took about 3.4 without, the time of a server | ||
| 258 | starting and stopping. `WINEDEBUG=-all` and `winedbg.exe=d` changed nothing here because no test crashed; with a crash, | ||
| 259 | `winedbg.exe=d` saves the rest of that test's timeout. The full suite (about 310 tests) took about 28 minutes run one | ||
| 260 | after another, and 67 seconds with all four settings for two devices (llvmpipe and an integrated GPU) run at the same | ||
| 261 | time. `scripts/run_wine_tests.py` (below) does the same: 32 seconds for those 40 tests with `--jobs 1`, 6 with | ||
| 262 | `--jobs 6`, and 19 seconds for all 312 tests with `--jobs 6`. | ||
| 263 | |||
| 230 | The build type defaults to `RelWithDebInfo`: xwin leaves out the debug CRT, so `Debug` needs `--include-debug-libs`. | 264 | The build type defaults to `RelWithDebInfo`: xwin leaves out the debug CRT, so `Debug` needs `--include-debug-libs`. |
| 231 | `make_game.py`'s `runtime` stage makes this same build on Linux when the tools and the SDK are there (`--runtime-build | 265 | `make_game.py`'s `runtime` stage makes this same build on Linux when the tools and the SDK are there (`--runtime-build |
| 232 | runtime/build/windows` takes a folder made by hand like a Windows build). CMake packages are | 266 | runtime/build/windows` takes a folder made by hand like a Windows build). CMake packages are |
| @@ -299,7 +333,12 @@ WINE=wine WINEPREFIX="$(mktemp -d)" WINEDLLOVERRIDES="mscoree,mshtml=" WINEDEBUG | |||
| 299 | 333 | ||
| 300 | The session script initializes a dedicated prefix and stops its Wine processes at exit. On a headless host, | 334 | The session script initializes a dedicated prefix and stops its Wine processes at exit. On a headless host, |
| 301 | put `xvfb-run -a` before `bash` so prefix initialization and the tests share one virtual display. The test runner | 335 | put `xvfb-run -a` before `bash` so prefix initialization and the tests share one virtual display. The test runner |
| 302 | maps the recorded Windows drive to the Linux checkout for shaders referenced by absolute Windows paths. It prints | 336 | maps the recorded Windows drive to the Linux checkout for shaders referenced by absolute Windows paths. It keeps one |
| 337 | wineserver alive for the run and stops it at the end, and adds `winedbg.exe=d;winemenubuilder.exe=d` to each test's | ||
| 338 | `WINEDLLOVERRIDES` (an entry of yours for the same program wins). `--jobs N` runs N tests at a time (default 1): tests | ||
| 339 | marked `RUN_SERIAL` run alone, tests that share a `RESOURCE_LOCK` never overlap, and the verdicts are printed in the | ||
| 340 | same order as with `--jobs 1`; the tests that share temp files can fail now and then in parallel (see "Known | ||
| 341 | problems"). It prints | ||
| 303 | every verdict and returns a failure status if any required test fails, skips or is missing. Check the printed | 342 | every verdict and returns a failure status if any required test fails, skips or is missing. Check the printed |
| 304 | verdicts for failures outside the required set. | 343 | verdicts for failures outside the required set. |
| 305 | 344 | ||
| @@ -345,6 +384,96 @@ 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 | 384 | 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. | 385 | isn't the requested size still prints `not available`, and those tests skip. |
| 347 | 386 | ||
| 387 | `cs_w32_shift64` checks `v_lshlrev_b64`, `v_lshrrev_b64` and `v_ashrrev_i64` with 64 memory-fed cases: | ||
| 388 | eight boundary values crossed with counts 0, 1, 31, 32, 33, 63, 64 and 65. The expected values come from Python | ||
| 389 | 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). | ||
| 390 | It also overlaps the destination with the count, one source word or the entire source pair. Both GPU runners | ||
| 391 | compare all 640 heap words (384 results and 256 unchanged input words); the operands are loaded at runtime so | ||
| 392 | the driver cannot replace the tested operations with constant-folded answers. Run it alone with | ||
| 393 | `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_shift64 --require-pass`. | ||
| 394 | It needs shader Int64 support; a device that lacks it reports a skip. This is a wave32 test of 64-bit values, | ||
| 395 | independent of wave64 emulation. On RTX 3080 Ti (616.92, Windows 11), all 640 words matched; replacing the count | ||
| 396 | mask with 31 or the arithmetic shift with a logical shift made the test fail at words 66 and 251 respectively. | ||
| 397 | |||
| 398 | `cs_w32_frexp_ldexp` checks `v_frexp_mant_f32`, `v_frexp_exp_i32_f32`, `v_ldexp_f32`, `v_frexp_mant_f64` and | ||
| 399 | `v_frexp_exp_i32_f64`, which the translator computes with integer ops on the float's words. 64 records of a binary32 | ||
| 400 | value, an `ldexp` exponent and a binary64 value are loaded at run time: normals, the clamp of the exponent at ±512 | ||
| 401 | and beyond, results that overflow to an infinity and that fall below the smallest normal, binary32 denormals (read | ||
| 402 | as zero), binary64 subnormals (normalized; single fraction bits on both sides of the dword boundary and patterns | ||
| 403 | with several), zeros, infinities and NaNs. Each thread stores the five results, `v_frexp_mant_f32` with a `neg` | ||
| 404 | source and `v_ldexp_f32` with an `abs` source run with the odd threads turned off, whose destination must keep the | ||
| 405 | word it held. The expected words come from an oracle written from the rows of [design.md](design.md) | ||
| 406 | (`frexp_mant_f32`, `frexp_exp_i32_f32`, `ldexp_f32` and `frexp_f64` in `check.py`), and | ||
| 407 | `tests/test_gpu_frexp_ldexp.py` checks it against `math.frexp` and `math.ldexp` wherever those agree with the | ||
| 408 | hardware. Both GPU runners compare all 768 heap words, the 256 unchanged input words included. Run it alone with | ||
| 409 | `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_frexp_ldexp --require-pass`. | ||
| 410 | On an RTX 4070 Ti (NVIDIA 620.70.06, Linux) and on llvmpipe (Mesa 26.2.6, LLVM 23.1.4) all 768 words match. While | ||
| 411 | the binary32 ops still applied `neg` and `abs` with `OpFNegate` and `FAbs`, six words differed on the 4070 Ti and none | ||
| 412 | on llvmpipe: every NaN source under a modifier came back as `0x7fffffff`, the driver's default NaN (word 419 is the | ||
| 413 | first: the mantissa of the negated `0x7fc00000`). Rules broken one at a time each failed the test on both devices: | ||
| 414 | the mantissa given the exponent field 127 (word 0) or, for binary64, 1023 (word 5), the exponent subtracting 127 | ||
| 415 | (word 1), `v_ldexp_f32` without its clamp (word 258) or overflowing to the largest finite value (word 106), a | ||
| 416 | binary32 denormal not read as zero (word 352), the binary64 subnormal exponent off by one in the low or in the high | ||
| 417 | dword (words 134 and 150), and the fixture without its `v_cmpx` (word 15). | ||
| 418 | |||
| 419 | `cs_w32_cmp_f64` checks the 32 binary64 vector compares, `v_cmp_*_f64` into VCC and `v_cmpx_*_f64` on EXEC, with | ||
| 420 | 256 memory-fed operand pairs: the product of 16 values (±inf, ±max, the 1-ULP neighbours of ±1, the smallest | ||
| 421 | subnormals, ±0, the smallest normal, a NaN whose payload is only in the low dword and a negative quiet NaN). Each | ||
| 422 | thread stores one bit per predicate for both forms, a bit for `tru` run with the odd threads turned off (an inactive | ||
| 423 | lane gets VCC 0 from `v_cmp_` and stays off through `v_cmpx_`) and two bits for `lt` and `nge` with VOP3 `abs`/`neg`. | ||
| 424 | The expected words come from Python floats (`cmp_f64_words` in `check.py`): IEEE-754 ordering, with every pair that | ||
| 425 | has a NaN unordered. Both GPU runners compare all 1536 heap words (512 result words and 1024 unchanged input words); | ||
| 426 | the operands are loaded at run time, so neither the translator nor the driver can fold a compare. Run it alone with | ||
| 427 | `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_cmp_f64 --require-pass`. | ||
| 428 | It is a wave32 test and no step of it needs a particular subgroup width, so it also runs on llvmpipe; the SGPR-pair | ||
| 429 | and constant operand forms are CPU-checked only (`tests/semantic/test_cmp_f64.py`). On an RTX 4070 Ti (NVIDIA | ||
| 430 | 620.70.06, Linux) all 1536 words matched, and seven translator rules broken one at a time each failed it: no `-0` | ||
| 431 | canonicalization at word 206, a NaN test that ignores the low dword at word 28, an ordering key without the low | ||
| 432 | dword at word 70, the raw result written to an inactive lane's VCC at word 2, `v_cmpx_` replacing EXEC at word 3, | ||
| 433 | `abs` ignored and `nlt` lowered as the negation of `le` at word 0. | ||
| 434 | |||
| 435 | `cs_w32_round_f64` checks `v_trunc_f64`, `v_ceil_f64`, `v_rndne_f64` and `v_floor_f64`, which the translator gives | ||
| 436 | to the driver's double-precision `Trunc`, `Ceil`, `RoundEven` and `Floor` (`shaderFloat64`). 64 inputs are loaded at | ||
| 437 | run time: signed zeros, the smallest subnormals and normals, values around 0.5 and 1 (the largest value below 0.5 | ||
| 438 | among them), ties from 0.5 to 5.5 and at 2^31 + 0.5, 2^51 + 0.5 and 2^52 - 0.5, integers from 2^52 to 2^63, 1e300, | ||
| 439 | the largest finite value, the infinities, and quiet and signalling NaNs. Each thread stores the four roundings, | ||
| 440 | `v_trunc_f64` with a `neg` source, `v_ceil_f64` with an `abs` source, a `v_floor_f64` whose destination pair overlaps | ||
| 441 | its source pair, and a `v_rndne_f64` run with the odd threads turned off, whose destination must keep the pair it | ||
| 442 | held. The expected words come from Python (`round_f64` in `check.py`: exact IEEE-754, the result keeping its | ||
| 443 | source's sign), and `tests/test_gpu_round_f64.py` checks that oracle against exact rational rounding. All 1152 heap | ||
| 444 | words are compared exactly, the 128 unchanged input words included: a NaN and a subnormal are rounded by the | ||
| 445 | translated code with integer ops and not by the driver, as the row in [design.md](design.md) says. (llvmpipe gets | ||
| 446 | one allowance, for what it does to `Trunc` and `RoundEven` on some CPUs; see below.) Run it alone with | ||
| 447 | `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_round_f64 --require-pass`. | ||
| 448 | It needs `shaderFloat64`; a device without it reports a skip. | ||
| 449 | |||
| 450 | Measured: on an RTX 4070 Ti (NVIDIA 620.70.06, Linux) and on llvmpipe (Mesa 26.2.6, LLVM 23.1.4) all 1152 words | ||
| 451 | match. While those two kinds of input still went to the driver's function, 15 of the 512 results differed on the | ||
| 452 | 4070 Ti, those of the two signalling NaNs, which came back quiet with sign and payload kept (`0x7ff0000000000001` | ||
| 453 | gave `0x7ff8000000000001`), and five more on llvmpipe, which read the two smallest subnormals as zero (`v_ceil_f64` | ||
| 454 | of the positive one gave +0 instead of 1, `v_floor_f64` of the negative one -0 instead of -1). Rules broken one at a | ||
| 455 | time each failed the test on both devices: a NaN left to the driver (word 784), the NaN and subnormal tests ignoring | ||
| 456 | the low dword, `v_ceil_f64` or `v_floor_f64` lifting the subnormal of the wrong sign (words 34 and 38), a subnormal's | ||
| 457 | result losing its sign (word 40), a NaN's low word dropped (word 784), `rndne` lowered as `floor(x + 0.5)` (word 20, | ||
| 458 | the sign of -0), `trunc` or `ceil` lowered as `Floor`, the `neg` or the `abs` source modifier ignored (words 8 and | ||
| 459 | 26), the two result words swapped (word 8), and the fixture without its `v_cmpx` (word 30). Two changes are not | ||
| 460 | caught everywhere: a subnormal left to the driver fails on llvmpipe (word 34) and passes on the 4070 Ti, which keeps | ||
| 461 | binary64 denormals, and `RoundEven` replaced by GLSL `Round` changes nothing on either device, since both send a tie | ||
| 462 | to the even integer. | ||
| 463 | |||
| 464 | llvmpipe gave those results on a CPU with AVX-512. On one without it, `Trunc` and `RoundEven` of a double go through | ||
| 465 | the code llvmpipe has for a float, because its double vectors are twice its native width (512 bits at the usual 256) | ||
| 466 | and it only has the exact rounding for a width the CPU has an extension for. There a magnitude above 2^24 comes back | ||
| 467 | unchanged (`v_trunc_f64` of 123456789.0625 is 123456789.0625) and `RoundEven` of a smaller one can give the other | ||
| 468 | neighbouring integer (1 for 1.5, 0 for the value just above 0.5): 48 of the 512 results, the same 48 with Mesa | ||
| 469 | 25.2.8 (LLVM 20.1.2) on a CI runner and with Mesa 26.2.6 under `GALLIUM_OVERRIDE_CPU_CAPS=avx`, which is how to see | ||
| 470 | it on a CPU that has AVX-512. `Floor` and `Ceil` are exact on that path. The CI's runners differ in this, so the | ||
| 471 | unchanged fixture passed or failed there by the machine it got. On llvmpipe the judge therefore lets `v_trunc_f64` | ||
| 472 | and `v_rndne_f64` return what that path can give, the source itself above 2^24 and either neighbouring integer | ||
| 473 | from 0.5 up to it, and nothing else (`ROUND_F64_FLOAT_PATH` in `check.py`); `v_floor_f64`, `v_ceil_f64`, the kept | ||
| 474 | pair and the inputs stay exact there, and no other device gets the allowance. `LP_NATIVE_VECTOR_WIDTH=128` makes | ||
| 475 | llvmpipe exact on a CPU with AVX. | ||
| 476 | |||
| 348 | ## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) | 477 | ## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) |
| 349 | 478 | ||
| 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 | 479 | Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the |
| @@ -384,23 +513,6 @@ Each line prints `ok`, a `SKIP` with its reason, or what differed. To add a fixt | |||
| 384 | 3. Add it to `EXPECT` in `tests/test_wave64_halves_fixtures.py` with the tier, reasons and idioms the translator | 513 | 3. Add it to `EXPECT` in `tests/test_wave64_halves_fixtures.py` with the tier, reasons and idioms the translator |
| 385 | should give it, and run `python -m pytest tests/test_wave64_halves_fixtures.py`. | 514 | should give it, and run `python -m pytest tests/test_wave64_halves_fixtures.py`. |
| 386 | 4. Run `w64_graphics.py` on a RADV GPU and say which GPU and Mesa version in the pull request. | 515 | 4. Run `w64_graphics.py` on a RADV GPU and say which GPU and Mesa version in the pull request. |
| 387 | ## GPUs with 128 bytes of push constants (AMD RDNA2 iGPUs on Windows, some Intel Arc drivers) | ||
| 388 | |||
| 389 | The translated shaders take 144 bytes of push constants: s0..s31, then the heap base and the code base. A device whose | ||
| 390 | `maxPushConstantsSize` is 128, Vulkan's minimum, can't take that, so the texture tests and every test drawn through | ||
| 391 | `vk_harness` skip there (`unsupported: need 144 push constant bytes, device has 128`); `vulkaninfo` shows the limit. | ||
| 392 | AMD's older Windows drivers report 128 on RDNA2 iGPUs (Radeon 680M on 22.40.84.06, 610M on 24.10.16.14, the Ryzen 5 | ||
| 393 | 7600's iGPU on 24.10.24); 26.11.2 reports 256 on a Radeon 610M, where these tests run without the variable below. | ||
| 394 | RADV reports more on the same chips. | ||
| 395 | |||
| 396 | To run them anyway, set `LEONIDA_PC_TAIL_UBO=1` **for both `build.py` and `check.py`** (or for | ||
| 397 | `run_gpu_tests.py`). The shaders are then translated with `--pc-tail-ubo`: s0..s31 stay in 128 push-constant bytes, | ||
| 398 | and the heap base and code base move to a uniform block at set 1 (`docs/design.md`, "Push-constant tail as a uniform | ||
| 399 | block"), which `vk_compute_test`, `vk_store_test`, `vk_harness`, `vk_texture_test`, `vk_sampler_test` and | ||
| 400 | `vk_bindless_test` bind (`runtime/test/vk_pc_tail.h`). If you set it | ||
| 401 | only for `check.py`, the shaders read the tail from push constants the programs no longer declare. `--mesh-compute` | ||
| 402 | (`LEONIDA_MESH_COMPUTE=1`) isn't combined with it yet: its vertex shader still reads the output address from push | ||
| 403 | constants, so those tests skip. | ||
| 404 | 516 | ||
| 405 | ## GPUs with 128 bytes of push constants (AMD RDNA2 iGPUs on Windows, some Intel Arc drivers) | 517 | ## GPUs with 128 bytes of push constants (AMD RDNA2 iGPUs on Windows, some Intel Arc drivers) |
| 406 | 518 | ||
| @@ -708,9 +820,14 @@ CS, 10,974 PS). | |||
| 708 | 820 | ||
| 709 | ## Posting your result | 821 | ## Posting your result |
| 710 | 822 | ||
| 711 | Use the template at the top of [#166](https://github.com/ItsNotRexed/Leonida/issues/166): GPU, driver, subgroup | 823 | 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 | 824 | 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 | 825 | [coordination issue][claims] before opening the pull request. |
| 714 | from your entry. | 826 | |
| 827 | Include your GPU, driver, subgroup range, OS, the commit you built, the tool versions, and the pass, skip and fail | ||
| 828 | counts each script printed. Label a single-test run clearly instead of presenting it as a full suite run. | ||
| 829 | Post counts and pass/fail lines only, never shaders or logs from the game. A failure that is not in the table | ||
| 830 | above gets its own issue, linked from your record. | ||
| 715 | 831 | ||
| 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/). | 832 | Use your system's detected CPU, GPU, VRAM and RAM model names in your result record, not benchmark scores. |
| 833 | For a rough browser-based check against reference profiles, you can use [Can I Run Leonida](https://assttro.github.io/can-i-run-leonida/). | ||