Claimed in the coordination issue as: d3d12_rgb96 / d3d12_stencil_copy skip under Wine (new TEST item, follow-up to #1343)
What and why
Under Wine with a Vulkan GPU, two host-comparison tests fail where the other host comparisons skip:
d3d12_stencil_copy: its ctest entry setsLEONIDA_HOST_ADAPTER=warp. Under Wine,copycmp::try_create_hostreturns false, andcopycmp::create_hostthen exits 1 because the variable is set (LEONIDA_HOST_ADAPTER=warp: no such adapter, or no D3D12 device on it).d3d12_rgb96: it expects Wine to have no WARP adapter (return 77; // Wine: ctest skips), but Wine 11 has one, backed by vkd3d. The test then compares our footprints with vkd3d's and fails:format 6 2D: footprints differ from WARP (total 2584, WARP 2584).
Both now return 77 when the host D3D12 is Wine's. They use the same host_is_wine() check that #1343 added to the other host comparisons: copycmp::host_is_wine in d3d12_stencil_copy_test.cpp, and hostwine::host_is_wine (host_wine.h) in d3d12_rgb96_test.cpp. The check runs only under Wine, so Windows runs both tests as before.
main
vk.create / initialize -> 77 without a Vulkan GPU (the CI Wine job stops here)
create_vulkan_device(ours)
+ host_is_wine() -> 77 (new)
host device: create_host / EnumWarpAdapter
Wine: exit 1 (stencil_copy), or compare with vkd3d (rgb96) <- the failures
compare ours with the hostThe CI Wine job has no GPU, so these tests return 77 at device creation there and never reach the comparison. Only a Wine run on a real GPU sees the failure.
Tested
RTX 5090 (NVIDIA 615.78.08), Linux 7.2 (Arch-based), Wine 11.20 Staging. The runtime was cross-built with clang-cl 23.1.3 + xwin (MSVC 14.44, SDK 10.0.26100), with LEONIDA_VK_DEVICE=NVIDIA. No game files.
Merge base 99f9989 against this branch 4ffc2bc, with ctest --test-dir runtime/build/windows -R '^(d3d12_rgb96|d3d12_stencil_copy)$':
| Test | Base 99f9989 | Head 4ffc2bc |
|---|---|---|
d3d12_rgb96 | Failed: format 6 2D: footprints differ from WARP (total 2584, WARP 2584) | Skipped |
d3d12_stencil_copy | Failed: LEONIDA_HOST_ADAPTER=warp: no such adapter, or no D3D12 device on it | Skipped |
- Checks:
ctest --test-dir runtime/build/windows -j1 --timeout 300 -E '^(d3d12_present|xbox_present)$'on the head gives 86 tests: 77 passed, 8 skipped, 1 failed (device_proxy, a host comparison thatdocs/testing.mdlists as failing under Wine). - Not verified: Windows. The change adds only an early return guarded by
host_is_wine(), which is false on Windows, but I have no Windows machine to run it on. - Not verified here:
d3d12_presentandxbox_present, which this desktop breaks, not the change. The tiling window manager resizes the 320x240 window, and with the display off, Xwayland throttles presents to about 1 fps.d3d12_presentpasses in a rootful Xwayland.
Checklist
- No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
- A new translator rule is in the contract table of
docs/design.md, with how it was confirmed. (No translator change.)
Merge Danger
Door: two-way
A revert restores the two failing tests. Nothing is persisted.
Blast Radius: local
Only these two test programs under Wine. Windows runs take the same path as before.
AI-assisted (Claude Code).