Keeps both sides; the discard emit now passes the binding to image_barrier
as main's version takes it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A region with NumSubresources = UINT_MAX was recorded like a null region and
skipped the FirstSubresource check. DiscardResource now has a whole flag;
explicit ranges are checked in 64-bit at recording and replay. Tests at the
UINT_MAX boundary in command_list_test, part F and the COM device test.
Found by matheuskshn in review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D3D12's baseline is 5.1, and both WARP and the RTX 5070 runtime answer a 5.1 request with S_OK and 5.1; the layer
refused everything below 6.0, so a caller asking for the minimum got E_INVALIDARG. The host comparison now covers
5.1, the test pins it, and the docs record both measurements.
CreateRenderTargetView refused D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY, so after the DSV change in
#683 a multisample array could be a depth target but not a colour target (found by @Derpbeat on
#683). The view is {resource, mip 0, FirstArraySlice, ArraySize}, as for the DSV; the replay
already checks the range and clears through a view of those layers.
d3d12_vulkan_device_test: a 4-layer 4x RGBA8 target is cleared red through a whole-array view and
green through a view of slices 1-2; every slice is resolved and read back, so slices 0 and 3 must
stay red and 1-2 green. A view of slices 3-4 is refused at execute (invalid_subresource). Without
the change the test fails at the captured-range check.
docs/d3d12_vulkan.md: the RTV/DSV bullet lists TEXTURE2DMSARRAY for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Single-sampled attachments and storage images could bypass the device's format limits. Use the same query for allocation info and committed creation so unsupported requests get the same answer before Vulkan allocates an image.
Windows 10's host D3D12 runtime cannot answer unaligned block-compressed GetCopyableFootprints cases (no D3D12_OPTIONS8.UnalignedBlockTexturesSupported) and has no ID3D12GraphicsCommandList7 for ResolveSubresourceRegion. Both comparisons failed before the device checks, so a Windows 10 run stopped at line 1061/1080.
Skip unaligned BC footprint cases when the host lacks the option, and compare only the full ResolveSubresource form when the host list has no list7. The full form still covers every supported format and sample count, and a self-check covers the classification used by the footprint skip.
The Vulkan path can sample a top-level mip with partial edge blocks, but callers querying OPTIONS8 receive E_INVALIDARG. Report the logical device's enabled BC feature so callers can select the matching upload path.
CheckFeatureSupport fell through to E_INVALIDARG for
D3D12_FEATURE_SHADER_MODEL and D3D12_FEATURE_ROOT_SIGNATURE, so a game
asking either got an error where the PC runtime answers. Report DXIL 1.0
and root signature 1.1, the versions this layer can honour rather than
the driver's maximum, clamp higher requests down, and refuse an undefined
value, a wrong DataSize and a null buffer, as the host runtime does.
CreateDepthStencilView refused D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY, so the descriptor held an
empty TargetView and any clear through it failed when the list was recorded. Multisample textures
have one mip, so the view is {resource, mip 0, FirstArraySlice, ArraySize}; the replay already
checks the range against the image and clears through a view of those layers.
d3d12_vulkan_device_test: a 4-layer 4x multisampled D32 texture, a view of slices 1-2 captures
that range and its clear replays; a view of slices 3-4 is refused at execute
(invalid_subresource). D3D12 can't copy a multisampled texture to a buffer, so the cleared
values are not read back. Without the change the test fails at the captured-range check.
docs/d3d12_vulkan.md: drop the duplicated RTV/DSV bullet and list the new dimension. The 1D and
1D-array DSVs need 1D textures first (D3D-63, #561).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test was built but only run by hand, so GPU-specific failures (for
example the AMD GetResourceTiling one) never showed up in ctest. Return
77 when no Vulkan device can be created and register the test with
SKIP_RETURN_CODE 77 so CI reports it as skipped rather than failed.
The tiling comparison required the same standard/packed mip split as the host. D3D11.3 functional spec 5.9.2.8.5
(D3D12_PACKED_MIP_INFO) only requires that a mip filling a tile in every dimension stays standard; a smaller mip
"may or may not be packed, depending on the IHV". Measured on one laptop: an RTX 5070 packs from the first mip
below the tile (as the layer does), a Radeon 880M keeps one or two more standard, WARP packs nothing. The test
failed with 24 mismatches on an AMD or WARP host. It now checks the tile shape, that no mip filling a tile is
packed (layer and host), and the tile counts of the mips both sides keep standard; the split itself is printed.
With that fixed, the same test failed further down on those hosts for host-specific answers:
- depth/colour sample counts a software host (WARP, 16x) offers but the Vulkan GPU's limits lack are skipped;
- a null source rectangle in ResolveSubresourceRegion is the whole source; the Radeon 880M and WARP do not resolve
it that way, so where a host disagrees with its own whole-source rectangle the layer is held to that result.
The host is picked with LEONIDA_HOST_ADAPTER through d3d12_copy_compare.h (D3D-46).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main added SetPredication (D3D-18) and reserved resources; both sides are
kept. The predication replay test took part E, so the D3D-26 test is now
part F. An atomic copy recorded under a predicate is counted with the
other copies that Vulkan's conditional rendering cannot skip, and
SetPredication, DiscardResource and the atomic copies are all refused in
a bundle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add DXGI-to-Vulkan mappings and block sizes for missing integer and typeless formats in the Vulkan D3D12 device (D3D-60):
- R32G32 (_TYPELESS, _UINT, _SINT)
- R16G16B16A16 (_UINT, _SINT)
- R10G10B10A2_UINT
- R16G16 (_TYPELESS, _UINT, _SINT)
- R8G8 (_TYPELESS, _UINT, _SINT)
Exclude these integer formats from color resolve matching in color_resolve_format_matches (integer resolves are disallowed in Vulkan and D3D12).
Add footprint and allocation tests comparing against host D3D12 WARP, as well as CheckFeatureSupport and committed resource creation checks.
Tested on AMD Radeon RX 9070 (driver 26.10.1, Windows 11) and host D3D12 WARP.
AI-assisted.
D3D12 stores blue in the low five bits of B5G6R5. Use the Vulkan packed format with the same ordering and check the two-byte words returned by full-image and rectangular clears.
Map the shared-exponent format through resource creation and buffer-image copies so shaders can resolve its existing GFX10 view. Check the sampled channels and compare the mip-array footprints with the host runtime.
CopyResource, CopyTextureRegion (texture to texture, footprint to texture and back, boxes, offsets, array slices,
mips, 3D) and CopyBufferRegion run on the layer and on a host D3D12 device (LEONIDA_HOST_ADAPTER picks it) and the
bytes read back are compared, for 39 format/shape cases including BC1-7 and depth-stencil.
Layer fixes it found: texture formats R8G8_SNORM, R16_UNORM, R32G32_UINT, R9G9B9E5, B5G6R5 and B5G5R5A1 were
refused; a block-compressed texture-to-texture box reaching the padded mip edge was refused as invalid_copy.
Known differences (TEXTURE1D, D24 on GPUs without it, D24 X8 byte) are documented.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve reserved-resource coverage alongside multisample resolve support and comparison tests. Fix the Windows SDK ResolveSubresourceRegion rectangle mutability.