tests: skip Wine's host comparisons where vkd3d answers differently #1035

Open
github-bot wants to merge 4 commits from github-bot/gh-1035 into main AGit
Owner

@⁠YaBulochka on GitHub · 2026-11-24 17:06 UTC · original
YaBulochka:fix/wine-host-comparisons → main · +55 −86 · 6 files · 4 commits · open

Claimed in the coordination issue as: carried over from the closed original repository (branch fix/wine-host-comparisons); no new claim

Depends on: none. Overlaps #519 (d3d12_indirect_dispatch_count, d3d12_residency) and #983 (gameinput_host_test); the parts those PRs already carry can be dropped from this one.

What and why

Several runtime tests compare their answers with a host D3D12 device, which is Wine's vkd3d in a Wine prefix. vkd3d answers differently (it rejects the console device over its WARP stand-in, returns S_OK for invalid residency arguments, accepts an unknown CreateSampler2 flag) and the test then reports a layer bug where the host is the outlier. This branch makes those tests keep every check of the layer's own answers and skip the host reference under Wine:

  • device_proxy_test: Wine's vkd3d rejects D3D12XboxCreateDevice over its WARP stand-in, so the test exits 77 with the HRESULT;
  • d3d12_residency_test and d3d12_sampler2_test: the host edge-case answers are compared only off Wine;
  • d3d12_indirect_dispatch_count_test: Wine's d3dcompiler_47 cannot compile the WARP reference shader (no InterlockedAdd on RWByteAddressBuffer), so it reports a skip instead of a bare failure;
  • gameinput_host_test: Wine's GameInput.dll is a stub (E_NOTIMPL / E_FAIL), so the import binding is still checked and the stub's answers are not;
  • run_tiny_atexit: the guest runs on Wine's CRT, which already deviates in the native runs and runs no handler or destructor through --run, so the script reports a skip (77, plus SKIP_REGULAR_EXPRESSION for CMake versions that cannot exit 77 from a -P script); on Windows any difference still fails.

Windows behaviour is unchanged: every path is behind hostwine::host_is_wine() or behind the Wine-only skip.

Tested

Not built here (no Windows/Wine toolchain in this environment); the changes are guards and printouts, and host_wine.h is used exactly as the tests that already merged do. The suite that measured these skips on Proton 11.0 was 148 passed, 23 skipped, 0 failed, per the commit message; that run is the author's, not repeated in this environment.

AI-assisted: yes.

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. (Not applicable: no translator change.)
**@⁠YaBulochka** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1035) `YaBulochka:fix/wine-host-comparisons` → `main` · +55 −86 · 6 files · 4 commits · open Claimed in the coordination issue as: carried over from the closed original repository (branch `fix/wine-host-comparisons`); no new claim Depends on: none. Overlaps #519 (`d3d12_indirect_dispatch_count`, `d3d12_residency`) and #983 (`gameinput_host_test`); the parts those PRs already carry can be dropped from this one. ### What and why Several runtime tests compare their answers with a host D3D12 device, which is Wine's vkd3d in a Wine prefix. vkd3d answers differently (it rejects the console device over its WARP stand-in, returns S_OK for invalid residency arguments, accepts an unknown `CreateSampler2` flag) and the test then reports a layer bug where the host is the outlier. This branch makes those tests keep every check of the layer's own answers and skip the host reference under Wine: - `device_proxy_test`: Wine's vkd3d rejects `D3D12XboxCreateDevice` over its WARP stand-in, so the test exits 77 with the HRESULT; - `d3d12_residency_test` and `d3d12_sampler2_test`: the host edge-case answers are compared only off Wine; - `d3d12_indirect_dispatch_count_test`: Wine's `d3dcompiler_47` cannot compile the WARP reference shader (no `InterlockedAdd` on `RWByteAddressBuffer`), so it reports a skip instead of a bare failure; - `gameinput_host_test`: Wine's `GameInput.dll` is a stub (`E_NOTIMPL` / `E_FAIL`), so the import binding is still checked and the stub's answers are not; - `run_tiny_atexit`: the guest runs on Wine's CRT, which already deviates in the native runs and runs no handler or destructor through `--run`, so the script reports a skip (77, plus `SKIP_REGULAR_EXPRESSION` for CMake versions that cannot exit 77 from a `-P` script); on Windows any difference still fails. Windows behaviour is unchanged: every path is behind `hostwine::host_is_wine()` or behind the Wine-only skip. ### Tested Not built here (no Windows/Wine toolchain in this environment); the changes are guards and printouts, and `host_wine.h` is used exactly as the tests that already merged do. The suite that measured these skips on Proton 11.0 was 148 passed, 23 skipped, 0 failed, per the commit message; that run is the author's, not repeated in this environment. AI-assisted: yes. ### Checklist - [x] 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. (Not applicable: no translator change.)
d3d12_residency and d3d12_sampler2 compare their edge cases with the host
runtime, which Wine's vkd3d answers differently (S_OK for invalid residency
arguments; it accepts an unknown CreateSampler2 flag), so under Wine they use
the recorded answers only and keep every check of the layer's own answers.
d3d12_heap_properties and d3d12_r9g9b9e5_uav already do this on main.

d3d12_indirect_dispatch_count runs the native case on WARP, whose shader it
compiles with d3dcompiler_47; Wine's compiler has no InterlockedAdd on
RWByteAddressBuffer yet, so it reports a skip (77) there instead of failing
silently. Windows is unchanged.
gameinput_host: Wine's GameInput.dll is a stub, GameInputCreate returns E_NOTIMPL and
GetCurrentTimestamp E_FAIL, so nothing it answers says anything about the loader. Under
Wine the test now checks the one part that is observable, the import binding to the host's
copy, and then exits 77 with the reason; a wrong binding is still a failure, not a skip.
Windows runs every check as before.

run_tiny_atexit: under Wine the guest runs on the host's CRT, and that CRT already
deviates in the native runs (a handler registered while handlers run is dropped, _exit
does not wait for the exit lock) and runs no handler or destructor at all through
`gta6rt --run`. So the Windows sequence is not observable there whatever the loader does.
When the native runs already differ, the script prints why and skips (77, plus
SKIP_REGULAR_EXPRESSION for CMake versions that cannot exit 77 from a -P script); on
Windows the native runs match, so any --run difference still fails.

The Proton 11.0 suite is now 148 passed, 23 skipped, 0 failed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:35 +00:00
This pull request has changes conflicting with the target branch.
  • runtime/test/check_atexit.cmake
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1035/head:github-bot/gh-1035'
git switch 'github-bot/gh-1035'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1035'
git switch 'github-bot/gh-1035'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1035'
git switch 'github-bot/gh-1035'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1035'
git switch 'main'
git merge --squash 'github-bot/gh-1035'
git switch 'main'
git merge --ff-only 'github-bot/gh-1035'
git switch 'main'
git merge 'github-bot/gh-1035'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.