Commit Graph

2 Commits

Author SHA1 Message Date
3e70baa099 d3d12_residency_test: a child that can't run its step fails the test
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>
2026-11-22 22:04:47 +01:00
173ce07977 d3d12: residency calls answer as the host runtime does
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>
2026-11-22 22:04:47 +01:00