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>
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>
From the review on #2864. The exit code a host-step child gives when it
couldn't run its step (kNoChild, 0xC41DFA11) fell into the crash-status mask
and counted as a host fault, so a broken child path would have left those
steps "not compared" and passed. It is now checked first and fails the test,
and the values left out may not exceed the 11 measured (the nine null-pointer
steps the host faults on and the backwards fence twice), so the comparison
can't go vacuous. The summary and docs now say 58 steps and 110 values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d3d12_residency_test runs the same 110 MakeResident / Evict /
SetResidencyPriority / EnqueueMakeResident steps on the Vulkan-backed device
and on the host runtime, with a committed buffer, a heap, a placed buffer, a
descriptor heap, a query heap and a fence of each. It compares every HRESULT,
the device-removed reason after each step, and the value EnqueueMakeResident
leaves the fence at. Steps that leave the host runtime unusable run there in a
child process with a fresh device (--host-step). On main 7 steps differed (RTX
3060, driver 610.88); now none do:
- SetResidencyPriority takes a priority only for objects that own their
memory, committed resources and heaps. A placed resource (a reserved one too,
by the same rule; not measured), a descriptor heap, a query heap or a fence is E_INVALIDARG, also inside a
longer list (the layer accepted all of them). The host also removes its
device then (DXGI_ERROR_INVALID_CALL); the layer doesn't, since a title that
sets priorities on placed resources would lose its device over a hint.
- EnqueueMakeResident accepts a null fence and signals nothing (the layer
answered E_INVALIDARG).
Not compared: a nonzero count with a null array and a null entry in an array,
which the host dereferences; and a value below the fence's current one, which
moves the host's fence back but not the layer's (Vulkan timelines only go up,
already documented).
d3d12_vulkan_device_test's residency checks expected the old answers for a
fence and an allocator's priority and for a null fence, and now expect the
host's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>