Repository navigation
D3D-122: GetCopyableFootprints refuses the descriptions the host refuses - #1069
Conversation
The buffer branch only checked first/count and the texture branch never looked at Width, Height, DepthOrArraySize or SampleDesc, turning a zero extent into 1. The PC runtime gives the failure answer (every output all ones) for these; measured on WARP, and @quackottu's subset on an NVIDIA GPU. Buffers: Width 0, or any of Height, DepthOrArraySize, MipLevels, Format, Layout, SampleDesc or Alignment other than its one valid value. Textures: a zero extent, Count 0, or more than one sample outside a single-mip, non-ROW_MAJOR 2D render target or depth stencil, or a count that is not a power of two. Left unchecked because the host accepts them or adapters differ: Flags on buffers, extra mips, 2D ROW_MAJOR, Quality at one sample, extent limits, texture alignment, multisample quality and format support. d3d12_vulkan_device_test: footprint_validity_cases() is compared with the host runtime when there is one and checked on its own otherwise. AI-assisted
|
Tested
AI-assisted. No game files. |
quackottu
left a comment
There was a problem hiding this comment.
Tested 55bf9d0 on NVIDIA GeForce RTX 5070, driver 621.24, Windows 11 Pro (26300), VS 2022 Build Tools, Vulkan SDK 1.4.363.0, with LEONIDA_VK_VALIDATION=1 and LEONIDA_D3D12=vulkan: pass
ctest: 100% tests passed, 0 tests failed out of 47 (gameinputdisabled, no SDL3).d3d12_vulkan_device_test(changed here): exit 0. Its only validation messages are the 3 below, which main also has.- 40 test programs exit 0 with 0 validation messages.
- Same as
main, not from this PR:
|
Tested
No game files. AI-assisted. |
|
Tested
No game files were used. |
|
Tested 55bf9d0 on AMD RDNA2 iGPU and RTX 5070: pass. Windows 11 Home 10.0.26300, MSVC 14.44.35207, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0, Ninja RelWithDebInfo (
AI-assisted (Claude Code). No game files. |
Claimed in the coordination issue as: D3D-122 (claim); from @quackottu's finding
What and why
GetCopyableFootprintsreturned real footprints for descriptions the PC runtime refuses: the buffer branch only checkedfirst/count, and the texture branch never looked at Width, Height, DepthOrArraySize or SampleDesc (std::max<UINT>(1, …)turned a zero extent into 1). The host gives the failure answer (every output all ones, totalUINT64_MAX) for these, and so does the layer now:UNKNOWN,ROW_MAJOR, {1, 0}, 0 or 64 KiB). Flags aren't checked; the host gives a buffer with the render-target flag its footprint.ROW_MAJOR2D texture with the render-target or depth-stencil flag, or a count that isn't a power of two.As the finding advised, this doesn't reuse
allocation()'s checks. Left unchecked because the host accepts them, or adapters disagree: extra mips, 2DROW_MAJOR, Quality > 0 at one sample, extent limits, texture alignment, multisample quality, and per-format multisample support (WARP also refuses 32 samples, 4 MiB and 128 KiB texture alignment, BC1 at 4 samples, and Quality 1 at 2 samples).The host's answers were measured on WARP with a scratch probe of about 70 descriptions. @quackottu's subset was also measured on an NVIDIA GPU, and the code and test comments say which is which.
d3d12_vulkan_device_test:footprint_validity_cases()(23 refusals, 11 near misses the host answers) joinscompare_footprints, so it is compared output-for-output with the host, and is also checked on its own, so it runs where there's no host device.The finding notes that several open PRs touch this function; the change is two self-contained blocks, so a rebase should be simple. AI-assisted (Claude Code).
Tested
Windows 11 Home 25H2 (26200.9974), NVIDIA GeForce RTX 4070 SUPER, driver 621.01, VS 2022 Build Tools, at
43d4703:d3d12_vulkan_device_test: pass, includingcompare_footprintsagainst the hostd3d12.dllon the NVIDIA adapter (0 mismatches) and the new host-free checks.d3d12_method_variants_test,d3d12_descriptor_test,d3d12_typeless_rtv_test,dxgi_swapchain_test: pass.d3d12_clear_test: fails with the same three 1-ULP clear differences from WARP on this commit with and without this change (d3d12_clear_test: format 28 (R8G8B8A8_UNORM) rounding differs by 1 ULP from WARP on RTX 4060 Ti #917), unrelated.mainat43d4703(RT-57), so the Wine/llvmpipe job didn't run.Checklist
docs/design.md, with how it was confirmed. — n/a, no translator change.