diff options
| author | lloyd <nichlloyd@gmail.com> | 2026-11-22 12:25:32 +0200 |
|---|---|---|
| committer | lloyd <nichlloyd@gmail.com> | 2026-11-22 12:25:32 +0200 |
| commit | 806ee523c4d2e99644fc544f88c1bf95fb9c2206 (patch) | |
| tree | 784601088907db0d32be60b330a6317f853e3b19 /runtime/test/d3d12_query_rules_test.cpp | |
| parent | c0ac5fd6518b3ba9fa66765b8b07099990dadd74 (diff) | |
tests: D3D12 host comparisons skip under Wine (TEST-105 follow-up)
The host-comparison tests added since #869 create their host devices with
D3D12CreateDevice themselves, so copycmp::try_create_host's Wine check never
reached them. Under Wine the reference is vkd3d, not Microsoft's runtime,
and they failed on a real GPU for that reason alone.
runtime/test/host_wine.h has the same check (ntdll's wine_get_version) for
them. Under Wine:
- d3d12_fence_events, d3d12_query_rules: the layer's own expectations
still run; only the host references are skipped.
- d3d12_depth_resolve: the layer is still checked against the clears; a
host reference is no longer required.
- d3d12_resource_desc, d3d12_node_mask, d3d12_copy_xfmt,
d3d12_typeless_rtv, d3d12_predicated_copy: every case compares with the
host (or WARP), so they exit 77, which ctest already reads as a skip.
Windows runs them all as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/d3d12_query_rules_test.cpp')
| -rw-r--r-- | runtime/test/d3d12_query_rules_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/test/d3d12_query_rules_test.cpp b/runtime/test/d3d12_query_rules_test.cpp index e77672b2f..f50536b6f 100644 --- a/runtime/test/d3d12_query_rules_test.cpp +++ b/runtime/test/d3d12_query_rules_test.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | // device does not enable pipelineStatisticsQuery). No game data or shaders. Run explicitly (needs Vulkan | 4 | // device does not enable pipelineStatisticsQuery). No game data or shaders. Run explicitly (needs Vulkan |
| 5 | // hardware); LEONIDA_VK_VALIDATION=1 checks Vulkan usage. | 5 | // hardware); LEONIDA_VK_VALIDATION=1 checks Vulkan usage. |
| 6 | #include "vk_test_device.h" | 6 | #include "vk_test_device.h" |
| 7 | #include "host_wine.h" | ||
| 7 | #include "../shims/d3d12_com.h" | 8 | #include "../shims/d3d12_com.h" |
| 8 | #include <dxgi1_4.h> | 9 | #include <dxgi1_4.h> |
| 9 | #include <cstdio> | 10 | #include <cstdio> |
| @@ -285,6 +286,7 @@ int main() { | |||
| 285 | if (FAILED(CreateDXGIFactory1(IID_PPV_ARGS(&factory.p)))) return 1; | 286 | if (FAILED(CreateDXGIFactory1(IID_PPV_ARGS(&factory.p)))) return 1; |
| 286 | unsigned differ = 0; | 287 | unsigned differ = 0; |
| 287 | for (const bool warp : {false, true}) { | 288 | for (const bool warp : {false, true}) { |
| 289 | if (hostwine::host_is_wine()) break; | ||
| 288 | Ref<IDXGIAdapter> adapter; | 290 | Ref<IDXGIAdapter> adapter; |
| 289 | Ref<ID3D12Device> host; | 291 | Ref<ID3D12Device> host; |
| 290 | if (warp && FAILED(factory->EnumWarpAdapter(IID_PPV_ARGS(&adapter.p)))) continue; | 292 | if (warp && FAILED(factory->EnumWarpAdapter(IID_PPV_ARGS(&adapter.p)))) continue; |