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:
authorYaBulochka <157796093+YaBulochka@users.noreply.github.com>2026-11-23 04:30:39 +0300
committerYaBulochka <157796093+YaBulochka@users.noreply.github.com>2026-11-23 04:30:39 +0300
commit968f6a7f16286d67c68ca46a35ad3fad7baa0a45 (patch)
tree5efa32ab3ea93c34aa32a18321b48f72b413d0af /docs/testing.md
parent03b09a086592a197db64d91655c6e65c30764d96 (diff)
docs(testing): run the Windows suite under Proton's wine
Prefix setup, the emulator flag and WINEDLLOVERRIDES in one place, with the measured result on Proton 11.0: 127 passed, 20 skipped, seven host-comparison failures against vkd3d-proton (two of them a crash in d3d12core.dll when the host device is created).
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md41
1 files changed, 36 insertions, 5 deletions
diff --git a/docs/testing.md b/docs/testing.md
index fc695d014..0aebc55c8 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -180,11 +180,42 @@ runtime/build/windows` takes a folder made by hand like a Windows build). CMake
180looked up only inside the SDK folder, so a Windows SDL3 for the GameInput shim is passed as `-DSDL3_DIR=<its 180looked up only inside the SDK folder, so a Windows SDL3 for the GameInput shim is passed as `-DSDL3_DIR=<its
181cmake folder>` (`CMAKE_PREFIX_PATH` is not searched here). 181cmake folder>` (`CMAKE_PREFIX_PATH` is not searched here).
182 182
183For Proton, start any program once with `proton run` (with `STEAM_COMPAT_DATA_PATH` and 183### Proton's wine
184`STEAM_COMPAT_CLIENT_INSTALL_PATH` set), so that it puts vkd3d-proton and DXVK into the prefix, then configure with 184
185`-DCMAKE_CROSSCOMPILING_EMULATOR="<Proton>/files/bin/wine"` and run `ctest` with 185Proton's wine runs the suite against the D3D12 a Proton game gets: the prefix's vkd3d-proton and DXVK. Start any
186`WINEPREFIX=$STEAM_COMPAT_DATA_PATH/pfx WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n"`. `proton run` itself doesn't 186program once with `proton run` so that it lays down the prefix libraries; the `STEAM_COMPAT_DATA_PATH` folder has to
187pass the program's output on, so the tests can't run through it. 187exist first, because Proton opens `<data>/pfx.lock` in it:
188
189```sh
190mkdir -p ~/.local/share/leonida-proton
191STEAM_COMPAT_DATA_PATH="$HOME/.local/share/leonida-proton" \
192STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam" \
193 "$HOME/.local/share/Steam/steamapps/common/Proton 11.0/proton" run cmd /c exit 0
194cmake -S runtime -B runtime/build/proton --toolchain "$PWD/runtime/cmake/clang-cl-xwin.cmake" \
195 -DXWIN_DIR="$HOME/.local/share/xwin-sdk" \
196 -DCMAKE_CROSSCOMPILING_EMULATOR="$HOME/.local/share/Steam/steamapps/common/Proton 11.0/files/bin/wine"
197cmake --build runtime/build/proton --parallel 2
198WINEPREFIX="$HOME/.local/share/leonida-proton/pfx" WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n" \
199 WINEDEBUG=-all ctest --test-dir runtime/build/proton
200```
201
202`proton run` itself doesn't pass the program's output on, so the tests can't run through it. `WINEPREFIX` must be
203the prefix the emulator made: a prefix from another wine version fails every test with "wine client error: version
204mismatch". The tests need a real display here as well.
205
206Measured on 2026-11-23 with Proton 11.0 (wine-11.0, vkd3d-proton 3.0) on an RX 7600 XT (radv): 155 tests
207registered, 154 run, 127 passed, 20 skipped, one disabled and seven failed. The skips are the usual ones (game data,
208`LEONIDA_FIRST_LIGHT_DIR`, no independent Vulkan queue for `d3d12_queue_wait`, and so on). All seven failures are in
209the comparisons with the host D3D12, which is vkd3d-proton here:
210
211- `d3d12_fence_timing`, `d3d12_private_data`, `d3d12_sampler2` and `d3d12_subresource_copy` disagree with
212 vkd3d-proton on a return value or a field it writes (`GetCustomHeapProperties` of a custom heap type,
213 `SetName(nullptr)`, unknown sampler flags, CPU-copy boxes).
214- `d3d12_r9g9b9e5_uav` compares a clear with WARP, and Proton's dxgi answers `EnumWarpAdapter` with the first
215 hardware adapter ("WARP not supported"), so the compared value is the hardware's.
216- `d3d12_compute` and `d3d12_method_variants` crash with an access violation in `d3d12core.dll` (vkd3d-proton)
217 when they create the host device. `d3d12_compute` passes with only `WINEDLLOVERRIDES="dxgi=n"`, where the host is
218 Wine's own d3d12 and the comparison skips.
188 219
189The tests that compare with the host's D3D12 (`root_sig_test`, `root_sig`, `device_proxy`, `d3d12_vulkan_device`) 220The tests that compare with the host's D3D12 (`root_sig_test`, `root_sig`, `device_proxy`, `d3d12_vulkan_device`)
190check against Wine's vkd3d or vkd3d-proton here, not Microsoft's runtime, so some of them fail for that reason. 221check against Wine's vkd3d or vkd3d-proton here, not Microsoft's runtime, so some of them fail for that reason.