Repository navigation
Conversation
…instead of failing depth_resolve, query_rules, fence_timing and clear asked for Microsoft's DXGI or WARP before checking whether the host is Wine-like (hostwine::host_is_wine). Under Wine that worked because Wine ships a DXGI. A host that answers like Wine and has no DXGI at all (the macOS host of ItsNotRexed#2947) failed all four, even though every check that needs DXGI is a host comparison that Wine already skips. - depth_resolve, query_rules: their host comparison loop already stops under Wine. They no longer require a DXGI factory there. - fence_timing: GetAdapterLuid's DXGI lookup is skipped when a Wine-like host has no DXGI. The non-zero LUID check still runs. - clear: every check compares with WARP, so a Wine-like host without WARP skips (77). A host that is not Wine-like and has no WARP still fails. Nothing changes on Windows, where DXGI and WARP are always present. Tested on an Apple M5 (macOS 26.6, MoltenVK 1.4.2) through the macOS host: depth_resolve, query_rules and fence_timing pass, and clear skips (with the host's matching D3D12CreateDevice stub).
gut0to
left a comment
There was a problem hiding this comment.
Validated on Windows after building the four affected targets (d3d12_clear_test, d3d12_depth_resolve_test, d3d12_fence_timing_test, and d3d12_query_rules_test). Their corresponding CTest cases all passed (4/4). The Wine/no-DXGI branch itself is not exercised on this Windows host, so this confirms the native path and build but not the environment-specific skip behavior.
|
Tested on an Apple M5 Pro (macOS 27.2.1, MoltenVK 1.4.2) through the #7446 host, with this PR on One more test has the same shape: @@ -5,6 +5,7 @@
// No game data or shaders. Run explicitly (needs Vulkan hardware and WARP); LEONIDA_VK_VALIDATION=1 checks Vulkan
// usage. A format the layer cannot create yet is listed as "not exposed" and does not fail the test; any other
// difference does.
+#include "host_wine.h"
#include "vk_test_device.h"
#include "../shims/d3d12_com.h"
#include <dxgi1_4.h>
@@ -342,6 +343,12 @@ int main() {
if (FAILED(CreateDXGIFactory1(IID_PPV_ARGS(&factory.p))) ||
FAILED(factory->EnumWarpAdapter(IID_PPV_ARGS(&warp.p))) ||
FAILED(D3D12CreateDevice(warp.p, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&host.p)))) {
+ // Every check below compares with WARP. A host that answers like Wine and has no WARP has nothing to
+ // compare with: a skip there, a failure on Windows, where WARP is always present.
+ if (hostwine::host_is_wine()) {
+ std::puts("WARP reference unavailable on this host: differential test skipped");
+ return 77;
+ }
std::fprintf(stderr, "WARP reference unavailable: differential test cannot run\n");
return 1;
}AI-assisted. |
|
@vakaobr thanks for running it on the M5 Pro.
The two PRs do conflict in One case neither PR covers: under Wine with its own DXGI, |
|
Independent Wine run on Linux (no Windows host involved): the Wine/no-DXGI guard does what it says on RADV. GPU: AMD RX 9060 XT (RDNA4/GFX1200), RADV Mesa 26.0.8, Ubuntu 26.04 Tested head Negative control (same tree and build directory, only the four test sources from Worth noting the RADV/Wine path really has no WARP: the skip line above matches the missing-reference case, and AI-assisted (Claude Code). No game files; synthetic tests only. |
Claimed in the coordination issue as: #7599 (comment)
Depends on: none. #4362 also edits
d3d12_fence_timing_test.cpp, only its include lines; this touchescheck_luid, so the two do not conflict.What and why
d3d12_depth_resolve_test,d3d12_query_rules_test,d3d12_fence_timing_testandd3d12_clear_testasked for Microsoft's DXGI or WARP before checkinghostwine::host_is_wine(). Under Wine that works because Wine ships a DXGI. A host that answers like Wine but has no DXGI at all fails all four: the macOS host of #2947 exportswine_get_versionand answersCreateDXGIFactory1withDXGI_ERROR_UNSUPPORTED. Yet every check in these tests that needs DXGI is a host comparison, which Wine already skips.depth_resolve,query_rules: the host comparison loop already stops under Wine. They no longer require a DXGI factory there.fence_timing: the DXGI lookup incheck_luidis skipped when a Wine-like host has no DXGI. The non-zero LUID check still runs.clear: every check compares with WARP, so a Wine-like host without WARP skips (77). A host that is not Wine-like and has no WARP still fails, as before.Nothing changes on Windows, where DXGI and WARP are always present, or under Wine with its DXGI.
Tested
Apple M5, macOS 26.6, MoltenVK 1.4.2 (universal release), tests cross-built from this branch with clang-cl + xwin (SDK 10.0.26100) and
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded, run through the macOS host of #2947 with its matchingD3D12CreateDevicestub (adrbn#3):depth_resolve,query_rulesandfence_timingexit 0,clearexits 77 (before: all four exit 1). The full D3D12 set on that host goes from 36 pass / 15 skip / 6 fail to 40 / 16 / 1. The remaining failure,uav_clear, is MoltenVK canonicalising NaN payloads and is not addressed here. Not run on Windows or Wine.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. (No translator change.)