diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 23:14:50 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 23:14:50 -0500 |
| commit | 9fd1d8ebdda2ba29121e23408d658747d7596668 (patch) | |
| tree | 4fbd2242fa4e4ccdbb2dc05849c4d957526a72ba /docs/testing.md | |
| parent | 6dff3e0e12368e8e18633acd49bd3e2ff58e6add (diff) | |
| parent | db73bcfb372bcac8dec7700297a63a4d8ad068f4 (diff) | |
Merge pull request #4452 from YaBulochka
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, 38 insertions, 5 deletions
diff --git a/docs/testing.md b/docs/testing.md index 7a7ceda98..d4383ebe0 100644 --- a/docs/testing.md +++ b/docs/testing.md | |||
| @@ -196,11 +196,44 @@ runtime/build/windows` takes a folder made by hand like a Windows build). CMake | |||
| 196 | looked up only inside the SDK folder, so a Windows SDL3 for the GameInput shim is passed as `-DSDL3_DIR=<its | 196 | looked up only inside the SDK folder, so a Windows SDL3 for the GameInput shim is passed as `-DSDL3_DIR=<its |
| 197 | cmake folder>` (`CMAKE_PREFIX_PATH` is not searched here). | 197 | cmake folder>` (`CMAKE_PREFIX_PATH` is not searched here). |
| 198 | 198 | ||
| 199 | For Proton, start any program once with `proton run` (with `STEAM_COMPAT_DATA_PATH` and | 199 | ### Proton's wine |
| 200 | `STEAM_COMPAT_CLIENT_INSTALL_PATH` set), so that it puts vkd3d-proton and DXVK into the prefix, then configure with | 200 | |
| 201 | `-DCMAKE_CROSSCOMPILING_EMULATOR="<Proton>/files/bin/wine"` and run `ctest` with | 201 | Proton's wine runs the suite against the D3D12 a Proton game gets: the prefix's vkd3d-proton and DXVK. Start any |
| 202 | `WINEPREFIX=$STEAM_COMPAT_DATA_PATH/pfx WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n"`. `proton run` itself doesn't | 202 | program once with `proton run` so that it lays down the prefix libraries; the `STEAM_COMPAT_DATA_PATH` folder has to |
| 203 | pass the program's output on, so the tests can't run through it. | 203 | exist first, because Proton opens `<data>/pfx.lock` in it: |
| 204 | |||
| 205 | ```sh | ||
| 206 | mkdir -p ~/.local/share/leonida-proton | ||
| 207 | STEAM_COMPAT_DATA_PATH="$HOME/.local/share/leonida-proton" \ | ||
| 208 | STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam" \ | ||
| 209 | "$HOME/.local/share/Steam/steamapps/common/Proton 11.0/proton" run cmd /c exit 0 | ||
| 210 | cmake -S runtime -B runtime/build/proton --toolchain "$PWD/runtime/cmake/clang-cl-xwin.cmake" \ | ||
| 211 | -DXWIN_DIR="$HOME/.local/share/xwin-sdk" \ | ||
| 212 | -DCMAKE_CROSSCOMPILING_EMULATOR="$HOME/.local/share/Steam/steamapps/common/Proton 11.0/files/bin/wine" | ||
| 213 | cmake --build runtime/build/proton --parallel 2 | ||
| 214 | WINEPREFIX="$HOME/.local/share/leonida-proton/pfx" WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n" \ | ||
| 215 | WINEDEBUG=-all ctest --test-dir runtime/build/proton | ||
| 216 | ``` | ||
| 217 | |||
| 218 | `proton run` itself doesn't pass the program's output on, so the tests can't run through it. `WINEPREFIX` must be | ||
| 219 | the prefix the emulator made: a prefix from another wine version fails every test with "wine client error: version | ||
| 220 | mismatch". The tests need a real display here as well. | ||
| 221 | |||
| 222 | Measured on 2026-11-23 with Proton 11.0 (wine-11.0, vkd3d-proton 3.0) on an RX 7600 XT (radv): 155 tests | ||
| 223 | registered, 154 run, 127 passed, 20 skipped, one disabled and seven failed. The skips are the usual ones (game data, | ||
| 224 | `LEONIDA_FIRST_LIGHT_DIR`, no independent Vulkan queue for `d3d12_queue_wait`, and so on). All seven failures are in | ||
| 225 | the comparisons with the host D3D12, which is vkd3d-proton here: | ||
| 226 | |||
| 227 | - `d3d12_fence_timing`, `d3d12_private_data`, `d3d12_sampler2` and `d3d12_subresource_copy` disagree with | ||
| 228 | vkd3d-proton on a return value or a field it writes (`GetCustomHeapProperties` of a custom heap type, | ||
| 229 | `SetName(nullptr)`, unknown sampler flags, CPU-copy boxes). | ||
| 230 | - `d3d12_r9g9b9e5_uav` compares a clear with WARP, and Proton's dxgi answers `EnumWarpAdapter` with the first | ||
| 231 | hardware adapter ("WARP not supported"), so the compared value is the hardware's. | ||
| 232 | - `d3d12_compute` and `d3d12_method_variants` crash with an access violation inside `d3d12core.dll` on their | ||
| 233 | null-argument checks, not on device creation: `GetCachedBlob(nullptr)` and `CreateCommandQueue1(nullptr, ...)` | ||
| 234 | are not validated by vkd3d-proton (filed upstream as vkd3d-proton issues 3512 and 3513; Wine's builtin d3d12 | ||
| 235 | crashes on the queue one too). `d3d12_compute` passes with only `WINEDLLOVERRIDES="dxgi=n"`, where the host is | ||
| 236 | Wine's own d3d12 and the comparison skips. | ||
| 204 | 237 | ||
| 205 | The host's D3D12 here is Wine's vkd3d or vkd3d-proton, not Microsoft's runtime, and Proton's `EnumWarpAdapter` | 238 | The host's D3D12 here is Wine's vkd3d or vkd3d-proton, not Microsoft's runtime, and Proton's `EnumWarpAdapter` |
| 206 | returns the hardware adapter, so "WARP" is vkd3d-proton on the GPU. Most tests that compare with the host or WARP | 239 | returns the hardware adapter, so "WARP" is vkd3d-proton on the GPU. Most tests that compare with the host or WARP |