7 Commits

Author SHA1 Message Date
839e14dc1e Tests: seven host comparisons take their hardware reference on the layer's own adapter
d3d12_copy_xfmt, d3d12_depth_resolve, d3d12_fence_events, d3d12_indirect_zero,
d3d12_node_mask, d3d12_query_rules and d3d12_resource_desc created their hardware
reference with D3D12CreateDevice(nullptr), the default adapter, and did not read
LEONIDA_HOST_ADAPTER. On a PC with two GPUs the layer then ran on one GPU and the
host driver on the other.

runtime/test/host_adapter.h picks the adapter by the rule d3d12_copy_compare.h
already follows for d3d12_vulkan_device: the adapter LEONIDA_HOST_ADAPTER names
(a name that matches none fails the run; "warp" leaves the hardware pass out),
else the adapter behind the Vulkan device (deviceLUID), else the default adapter.
The tests print the adapter's name instead of "the default adapter".

Measured on a Ryzen 7 9700X iGPU (AMD 32.0.21042.62) next to an RTX 3070
(NVIDIA 610.74, the default adapter): d3d12_depth_resolve with the layer on the
Radeon set aside nine resolves as host quirks before and after, but four of them
were NVIDIA's ("D24S8 stencil as X24_G8"); against the Radeon's own driver the
four are D24S8 depth MIN/MAX. The other six tests print the same results against
either adapter.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:35:52 +02:00
806ee523c4 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>
2026-11-22 12:25:32 +02:00
2c99d82448 Merge pull request #1050 from sanuk369 2026-11-22 01:38:03 -05:00
37e9e1e02a Tests: run four more GPU test programs under ctest, skipping without a Vulkan driver
d3d12_debug_markers_test, d3d12_fence_timing_test, d3d12_node_mask_test
and dxgi_swapchain_test were built but had no add_test, so ctest (and the
wine job's test list) never ran them; all four pass on an RTX 5070. Each
now exits 77 when there is no Vulkan GPU or driver, as the other GPU tests
do (dxgi_swapchain's SKIP branches exited 0, and with no driver at all it
failed at vkCreateInstance), and is registered with SKIP_RETURN_CODE 77.
2026-11-22 11:46:45 +05:30
4f9e5a605a ID3D12CommandQueue::GetDesc: node mask 0 reads back as 1
The host D3D12 runtime reports NodeMask 1 for a direct, compute or copy
queue created with 0 on a single adapter, as #838 made descriptor heaps and
resources do. d3d12_node_mask_test now compares the six queue cases with
the default adapter and WARP.
2026-11-22 11:02:21 +05:30
60d43248cf d3d12_node_mask_test: print the masks a failing case asked for, tidy
A mismatch now prints the node masks and heap flags the case asked for (the four mask cases share a name).
Corrects a comment that said CREATE_NOT_ZEROED is kept (the host drops it), and wraps lines over 120 columns.
No change to what is compared: 18 of 18 heap and 8 of 8 descriptor heap cases match on the default adapter
and WARP; against main's shim 18 heap and 4 descriptor heap cases differ on each.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 22:46:27 -05:00
7228f4d400 Runtime: node masks and resolved heap flags as the host reports them
ID3D12DescriptorHeap::GetDesc and ID3D12Resource::GetHeapProperties echoed their inputs. On the host, a node
mask of 0 reads back as 1 (one node), and a committed resource reports the heap flags the runtime resolves:
its own flags, without CREATE_NOT_RESIDENT and CREATE_NOT_ZEROED, plus DENY_* bits for the resource classes
it is not (buffers 0xC0, textures without render-target or depth use 0x44, the others 0x84).

Measured with a probe on the default adapter (RTX 3060, driver 596.36) and WARP, Windows 10 19041 runtime.
d3d12_node_mask_test compares 18 heap cases and 8 descriptor heap cases with the host on both; before this
change every descriptor heap with node mask 0 and every committed buffer or texture differed on each reference. Not in ctest, like d3d12_resource_desc_test.

AI-assisted (Claude Code). Tested: d3d12_node_mask_test with and without LEONIDA_VK_VALIDATION=1 (0 validation
errors); full ctest, where d3d12_vulkan_device fails on CheckFeatureSupport shader model and root signature
(Windows 10 host predates them, #816), as on main.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-11-21 22:46:27 -05:00