Under Wine the host D3D12 is vkd3d and under Proton vkd3d-proton, and
Proton's EnumWarpAdapter returns the hardware adapter, so the host and
WARP references six tests compare with are not Microsoft's runtime:
d3d12_r9g9b9e5_uav, d3d12_method_variants and d3d12_sampler2 fail under
Proton (the last two crash inside vkd3d-proton), d3d12_fence_timing and
d3d12_subresource_copy under both, d3d12_private_data under Wine.
The six skip the host comparison there with hostwine::host_is_wine() and
check the layer against Microsoft's answers recorded in the test instead,
so Wine and Proton still check values. d3d12_r9g9b9e5_uav gets WARP's
words for its six clear cases, from the packing rule in
docs/d3d12_vulkan.md. d3d12_subresource_copy and d3d12_private_data get
answer tables, taken from the records that Windows runs on NVIDIA and AMD
compared with Microsoft's runtime with no mismatches; LEONIDA_D3D49_DUMP=1
prints the host's record on Windows to regenerate them. The other three
already had recorded answers. Windows still compares with the live
runtime too.
ID3D12Fence::Signal from the CPU called vkSignalSemaphore at once, also while a queue Signal of a lower value
was still pending on the GPU. Vulkan requires a host signal to stay below every pending signal
(VUID-VkSemaphoreSignalInfo-value-03259), and D3D12 allows the order. The fence now records the highest value a
queue will signal, under the same lock as the claim, and a CPU signal above a value the GPU has not reached yet
(or made while an earlier one is held) is handed to the fence dispatcher, which applies it once the GPU passes
that value, in the order the signals were made. The callback holds no pointer to the fence; when the fence is
released (cancel) or the device is lost before the queue value is reached, the held signal is dropped, since
signalling then would break the same rule. Until a held signal is applied, GetCompletedValue reads the GPU's
progress.
d3d12_fence_timing_test: a queue Signal kept pending by a Wait on a gate fence, a CPU Signal above it (held, then
applied), and two CPU signals held behind one queue signal (applied in order). Fails on main's Fence at the first
check: the event for the CPU value fired while the queue signal was still pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For CUSTOM, an unknown heap type and a node mask other than node 0, the
layer answered an all-zero D3D12_HEAP_PROPERTIES. The host runtime
(RTX 5070, driver 621.14) answers the same zeros, but with node 0 in
CreationNodeMask and VisibleNodeMask. The masks are now set first, for
every answer.
d3d12_fence_timing_test compares those four cases with the host too:
CUSTOM on node masks 0 and 1, type 99 and UPLOAD on node mask 2. Before,
only DEFAULT, UPLOAD and READBACK were compared. Its local check of the
CUSTOM answer now includes the memory pool and the masks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two GetClockCalibration results had to agree within 2 ms. The fallback (a submitted timestamp query) is off by
up to a submission round trip, and with the GPU busy (a pipeline-cache build) that round trip passed 2 ms, so the
test failed about one run in ten. Each calibration is now allowed the time its call took, with 2 ms as the floor;
calibrated timestamps still have to agree within 2 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
- SetEventOnMultipleFenceCompletion, ALL and ANY: a null event is one
vkWaitSemaphores (WAIT_ANY_BIT for ANY); with an event, each fence's
existing wait thread counts down one shared waiter, so no new threads.
- Queue GetClockCalibration: vkGetCalibratedTimestampsKHR (or the EXT
alias) over the DEVICE and QueryPerformanceCounter domains when the
device has the extension (the standalone device now enables it);
otherwise a submitted vkCmdWriteTimestamp bracketed by QPC reads.
- GetAdapterLuid from VkPhysicalDeviceIDProperties::deviceLUID.
- GetCustomHeapProperties per the D3D12 docs' NUMA table, matching the
UMA = FALSE the device reports.
d3d12_fence_timing_test covers both calibration paths, the LUID against
DXGI's adapter list and the heap answers against the host runtime.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>