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:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 23:14:50 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 23:14:50 -0500
commit9fd1d8ebdda2ba29121e23408d658747d7596668 (patch)
tree4fbd2242fa4e4ccdbb2dc05849c4d957526a72ba /docs/testing.md
parent6dff3e0e12368e8e18633acd49bd3e2ff58e6add (diff)
parentdb73bcfb372bcac8dec7700297a63a4d8ad068f4 (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.md43
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
196looked up only inside the SDK folder, so a Windows SDL3 for the GameInput shim is passed as `-DSDL3_DIR=<its 196looked up only inside the SDK folder, so a Windows SDL3 for the GameInput shim is passed as `-DSDL3_DIR=<its
197cmake folder>` (`CMAKE_PREFIX_PATH` is not searched here). 197cmake folder>` (`CMAKE_PREFIX_PATH` is not searched here).
198 198
199For 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 201Proton'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 202program once with `proton run` so that it lays down the prefix libraries; the `STEAM_COMPAT_DATA_PATH` folder has to
203pass the program's output on, so the tests can't run through it. 203exist first, because Proton opens `<data>/pfx.lock` in it:
204
205```sh
206mkdir -p ~/.local/share/leonida-proton
207STEAM_COMPAT_DATA_PATH="$HOME/.local/share/leonida-proton" \
208STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.local/share/Steam" \
209 "$HOME/.local/share/Steam/steamapps/common/Proton 11.0/proton" run cmd /c exit 0
210cmake -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"
213cmake --build runtime/build/proton --parallel 2
214WINEPREFIX="$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
219the prefix the emulator made: a prefix from another wine version fails every test with "wine client error: version
220mismatch". The tests need a real display here as well.
221
222Measured on 2026-11-23 with Proton 11.0 (wine-11.0, vkd3d-proton 3.0) on an RX 7600 XT (radv): 155 tests
223registered, 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
225the 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
205The host's D3D12 here is Wine's vkd3d or vkd3d-proton, not Microsoft's runtime, and Proton's `EnumWarpAdapter` 238The host's D3D12 here is Wine's vkd3d or vkd3d-proton, not Microsoft's runtime, and Proton's `EnumWarpAdapter`
206returns the hardware adapter, so "WARP" is vkd3d-proton on the GPU. Most tests that compare with the host or WARP 239returns the hardware adapter, so "WARP" is vkd3d-proton on the GPU. Most tests that compare with the host or WARP