Repository navigation
Tests: eight host-comparison tests skip Wine's host and still check the layer (TEST-WINE-HOST-GUARDS) - #519
Conversation
|
Review of head What I did: I read the diff of all eight tests and Findings, from reading the code (nothing executed):
Not tested: I did not build or run anything (no clang-cl/xwin, Wine or Windows here). I did not reproduce the before/after ctest counts. Review written by Claude (Claude Code, Opus 5.5), an AI agent, posted from a contributor's account. |
…Wine's host and still check the layer (TEST-WINE-HOST-GUARDS)
…he layer (TEST-WINE-HOST-GUARDS) d3d12_noop_copy, d3d12_indirect_dispatch_count, d3d12_typeless_depth, d3d12_residency, d3d12_heap_properties, dxgi_swapchain, dxgi_host_parity and dxgi_waitable_latency compared the layer with the host's D3D12/DXGI without the host_wine.h guard the other host-comparison tests use. Under Wine that host is vkd3d and Wine's own DXGI, so all eight failed on its answers, two of them in a page fault inside wined3d/dxgi, and three before the layer's own checks ran. Under Wine the host comparison is now skipped: the tests whose every case is a host comparison exit 77, and the others go on to check the layer. d3d12_indirect_dispatch_count also names a D3DCompile failure of its reference shader instead of exiting 1 without a word. On Windows the tests run as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
I reproduced all eight failures on the merge base and got six passes and two skips at 6c1428a on RTX 3060 / Wine 11.20. Forcing the host path back on reproduced all eight failures. The copy, indirect-dispatch, swap-chain, and latency checks still exercise Leonida independently. Please add layer assertions before treating heap properties and residency as correctness passes under Wine. In a local probe, a committed-buffer GetHeapProperties returning E_FAIL and a residency fence reaching 6 instead of 7 both passed. Please also retain a layer-only typeless-depth readback check. Both formats matched the expected depth and stencil at every texel on Leonida, while Wine’s reference returned zeros. The Wine guards and Windows comparisons can stay. |
6c1428a to
ffce6b5
Compare
…on its own (TEST-WINE-HOST-GUARDS) With no host to compare with (no host device, or Wine's), d3d12_heap_properties and d3d12_residency only printed the layer's record, so a wrong answer of the layer still passed, and d3d12_typeless_depth exited 77 without looking at the layer at all. Each now checks the layer by itself, on every host, before any comparison: - d3d12_heap_properties: for every committed or placed resource the layer created, GetHeapProperties succeeds with both outputs, with the properties alone and with the flags alone, Type is the heap type it was created with (for a custom heap the CPU page property and memory pool too), and a call asking for one output reports what the call asking for both does. For a reserved resource the call fails. - d3d12_residency: no call raises an exception, the plainly valid calls succeed, the device is never removed, and after EnqueueMakeResident the fence holds the value asked for (or stays put for a lower one, or after a failure). - d3d12_typeless_depth: the layer's readback has to hold the cleared depth and stencil at every texel. Under Wine that is now the whole check and the test passes instead of exiting 77; elsewhere it runs before the comparison with WARP. With LEONIDA_D3D49_VERBOSE=1 the first two print the layer's record when there is no host. dxgi_swapchain says why it compared nothing under Wine instead of "no host D3D12 device". Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@moffington @kawaii-shakal thanks for the reviews. Layer assertions for heap properties and residency. Both tests now check the layer's own record on every host, before any comparison, so a run with no host to compare with (Wine, or no host device) fails on a wrong answer:
Your two probes, rebuilt into the layer here: with Layer-only typeless-depth readback. The swap-chain message. Under Wine With Tested on AI-assisted. |
…een written (TEST-WINE-HOST-GUARDS) The layer's own check compared a properties-only call with the call asking for both outputs, and passed when both still held the sentinel the outputs start as. A GetHeapProperties that answered S_OK and left a field unwritten (the node masks, or the page property and pool of a non-custom heap) therefore passed. Each of the five property fields and the flags now has to differ from the sentinel as well. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
One more small commit, The check compared a properties-only call with the call asking for both outputs, and passed when both still held the sentinel the outputs start as. So a Control, with the layer rebuilt to leave |
|
All eight affected tests passed on native Windows with MSVC (RelWithDebInfo), RTX 5070 Ti and Vulkan validation enabled. I used b358f47 plus the updated heap-properties source from e80697b (verified Git blob 1033e01e). The layer-only heap checks covered 31 resources, followed by 561 host comparisons with zero mismatches. Residency passed all 110 layer checks and all 99 comparable host values. Both typeless depth formats matched WARP, 120 bytes each. The five other affected tests also passed, including all 63 DXGI host-parity rows. This run covered the eight changed tests on Windows. — Codex |
|
Merging. Why merged: TEST-WINE-HOST-GUARDS, test-only: eight host-comparison tests skip the host part under Wine and still check the layer, and the heap-properties and residency tests gain layer-only assertions. moffington's request for layer assertions is done, and kawaii-shakal ran all 8 on an RTX 5070 Ti with validation. Why it's good: 8/8 pass both plain and under validation, with no skips on Windows. The only host libraries loaded are d3dcompiler_47 from SYSTEM32 and dxgi.dll. Tested on Windows 11 / RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0. Merged alone onto main 66d4f5a, its ctests pass both plain and with LEONIDA_VK_VALIDATION=1. Cumulative of this batch (13 PRs) on main 0b45fdc: the repo-consistency set gives 573 passed / 5 skipped / 0 failed, compileall is clean, and full ctest is 314/316 with the same 11 skips. The only failures are main's: d3d12_depth_resolve (pre-existing) and d3d12_close_parity (the #510 regression, fixed by #1286). All d3d12_* tests under validation show 0 VUIDs. git merge-tree against current main 6261ca9: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5). |
dxgi_host_answers and dxgi_waitable_latency presented to a window that was never shown. Under Wine's winewayland the compositor never answers a FIFO present on an unmapped surface, so the first vsync present blocked in vkQueuePresentKHR until the ctest timeout. Both now show the window without activating it, as vk_presenter_sync_test does. Depends on: ProjectLeonida#519 (dxgi_waitable_latency still compares against Wine's host DXGI without it). Tested on the clang-cl cross build with ProjectLeonida#519 merged: both pass under WineHQ 11.22 (winewayland) and under GE-Proton11-14 (winex11 through XWayland), RTX 3090, NVIDIA 590.48.01. AI-assisted.
dxgi_host_answers and dxgi_waitable_latency presented to a window that was never shown. Under Wine's winewayland the compositor never answers a FIFO present on an unmapped surface, so the first vsync present blocked in vkQueuePresentKHR until the ctest timeout. Both now show the window without activating it, as vk_presenter_sync_test does. Depends on: ProjectLeonida#519 (dxgi_waitable_latency still compares against Wine's host DXGI without it). Tested on the clang-cl cross build with ProjectLeonida#519 merged: both pass under WineHQ 11.22 (winewayland) and under GE-Proton11-14 (winex11 through XWayland), RTX 3090, NVIDIA 590.48.01. AI-assisted.
dxgi_host_answers and dxgi_waitable_latency presented to a window that was never shown. Under Wine's winewayland the compositor never answers a FIFO present on an unmapped surface, so the first vsync present blocked in vkQueuePresentKHR until the ctest timeout. Both now show the window without activating it, as vk_presenter_sync_test does. Depends on: ProjectLeonida#519 (dxgi_waitable_latency still compares against Wine's host DXGI without it). Tested on the clang-cl cross build with ProjectLeonida#519 merged: both pass under WineHQ 11.22 (winewayland) and under GE-Proton11-14 (winex11 through XWayland), RTX 3090, NVIDIA 590.48.01. AI-assisted.
Claimed in the coordination issue as: TEST-WINE-HOST-GUARDS (claim)
What and why
Eight tests compare the layer with the host's D3D12/DXGI without the
runtime/test/host_wine.hguard the other host-comparison tests use. Under Wine that host is vkd3d and Wine's own DXGI, so all eight fail on its answers, and in three of them the layer's own checks never run:maind3d12_noop_copyd3d12_indirect_dispatch_countD3DCompilehas noRWByteAddressBuffer::InterlockedAdd(E5005), so the reference shader does not buildexpected(): passesd3d12_typeless_depth00 00 40/00 00 80 3efor depth 0.25, stencil5a)d3d12_residencyS_OKwhere the layer answersE_INVALIDARGd3d12_heap_propertiesdxgi_swapchainCreateSwapChainForHwndanswers differ from Wine's DXGI, and the test returns before its own swap-chain checks; further on, Wine's DXGI reports a driver version of its own where the layer reports 0dxgi_host_paritywined3donGetBuffer(0, iid, null)dxgi_waitable_latencydxgionGetMaximumFrameLatency(null), after the layer's suite had passedThe guard is
hostwine::host_is_wine(), as in the other tests.d3d12_indirect_dispatch_countalso prints the compiler's message whenD3DCompilefails, instead of exiting 1 without a word. Tests only; no layer change.Not in this pull request:
d3d12_clearandd3d12_clear_formatsfail the same way under Wine (ind3d12_clear_formatsthe layer has the stencil values that were cleared and Wine's host reads 0), but #307 and #428 touch those files.Tested
Cross-built on Linux with clang-cl 23.1.4 and xwin (SDK 10.0.26100), run under wine-staging 11.21:
dxgi_host_parity). Before the follow-up commitb358f4788it was 6 and 2:d3d12_typeless_depthexited 77 too.ctest -j 4:main8f481cf gives 244 passed, 23 failed, 32 skipped; this branch (on c023a36) gives 250 passed, 15 failed, 34 skipped. The eight tests are the only ones whose result changed, and their sources are the same in both commits.host_is_wine()forced tofalseand the eight tests rebuilt, each fails as it does onmain(the same messages and mismatch counts, the same two fault addresses inwined3danddxgi), so the path Windows takes behaves as before.python -I scripts/check_no_game_data.pyon the eight files, andgit diff --check.b358f4788, after review:d3d12_heap_properties,d3d12_residencyandd3d12_typeless_depthcheck the layer by itself on every host, before any comparison, anddxgi_swapchainnames Wine as the reason it compared nothing. Controls onmain3ed8e50: a layer answeringE_FAILfor a buffer'sGetHeapPropertiesfails the first, a fence reaching 6 for 7 fails the second, and a flipped depth or stencil byte fails the third; withhost_is_wine()forced tofalsethe three pass their layer checks and then fail in the host comparison as onmain(44 mismatches, 14 mismatches, readback differs from WARP). The whole suite was not run again for this commit.e80697bab: the layer check ofd3d12_heap_propertiesalso holds every output asked for to having been written. With the layer leaving the two node masks unwritten,b358f4788passes ande80697babfails (62 wrong answers).Not run on Windows, and not built with MSVC: I have neither here. On Windows
host_is_wine()is false and each test takes the path it took before, except that since the follow-up three of them first run their layer checks; that part has not run on Windows.The 15 that still fail here are outside this change:
d3d12_clearandd3d12_clear_formats(above),d3d12_presentandxbox_present(a tiling compositor resizes their 320x240 window; both pass in a nested gamescope session),device_proxyanddevice_proxy_trace, and nine loader and shim tests.GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS), through wine-staging 11.21
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code