Commit Graph

5 Commits

Author SHA1 Message Date
e80697babe Tests: d3d12_heap_properties holds every output asked for to having been written (TEST-WINE-HOST-GUARDS)
The layer's own check compared a properties-only call with the call asking for both outputs, and passed when
both still held the sentinel the outputs start as. A GetHeapProperties that answered S_OK and left a field
unwritten (the node masks, or the page property and pool of a non-custom heap) therefore passed. Each of the
five property fields and the flags now has to differ from the sentinel as well.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:39:08 -06:00
b358f4788b Tests: heap properties, residency and typeless depth check the layer on its own (TEST-WINE-HOST-GUARDS)
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>
2026-11-24 10:42:39 -06:00
ffce6b5c39 Tests: eight host-comparison tests skip Wine's host and still check the layer (TEST-WINE-HOST-GUARDS)
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>
2026-11-24 04:11:27 -06:00
a86d7f9508 d3d12: an integrated GPU reports UMA and refuses MEMORY_POOL_L1 heaps, as the host does (#6569)
Squash-merged after diff review of PR #6569
2026-11-23 12:42:09 -06:00
467660963d d3d12: a placed resource reports its heap's flags as they are
d3d12_heap_properties_test compares what ID3D12Resource::GetHeapProperties
returns on the Vulkan-backed device and on the host runtime: the properties
and heap flags of committed resources in every heap type (custom ones and
SHARED, ALLOW_DISPLAY, CREATE_NOT_ZEROED, CREATE_NOT_RESIDENT included), of
placed resources in heaps of each kind, and of reserved resources, with null
arguments too, and whether each call wrote its outputs: 561 values. On main 4
differed (RTX 3060, driver 610.88), all the same rule: a placed resource
reports its heap's flags as they are, so one in an ALLOW_ALL heap reads back
0, while the layer added the DENY bits of the resource classes it isn't (0xC0
for a buffer, 0x44 for a texture). Those bits are the runtime's choice only for
a committed resource's implicit heap, where the layer already matched.

Builds on #2864, which adds the placed_ flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:06:27 +01:00