Repository navigation
Runtime: depth and stencil resolves in ResolveSubresourceRegion - #1155
Conversation
MIN and MAX of either plane, and AVERAGE of the depth plane when Format is the plane's own format, as the PC runtime accepts them (RTX 5070 and WARP). Each resolve is a vkCmdBeginRendering scope with no draws: the MSAA plane is the depth or stencil attachment and the destination plane its resolve target, checked at record time against D3D12's rules and the device's supported resolve modes. Colour resolves are unchanged.
|
Tested 73dd6d7 on Windows 11 with two GPUs on one machine (MSVC 14.51): the layer matches WARP everywhere, but
All 12 mismatches report |
|
Tested 73dd6d7 on NVIDIA GeForce RTX 5070, driver 621.24 (32.0.16.2124), Windows 11 26H2 (26300), MSVC 14.52 (VS Build Tools 18), Ninja, RelWithDebInfo: pass.
|
|
Tested The 12 mismatches are the same cases ( This lines up by GPU generation, not by driver: @marquezinii's RTX 5070 (Blackwell) passes on the same 621.24 driver, while this RTX 4060 Ti and the RTX 4080 SUPER (both Ada) and the UHD 770 fail with the same 12. The source comment says the cases were measured on the RTX 5070, so the host behaviour for these D24S8 modes looks hardware-specific. That supports @kapitche's suggestion to compare these cases with WARP only (or report hardware differences without failing). Everything else: on this PR the other 56 ctest tests pass and only AI-assisted (Claude Code). |
|
Tested 73dd6d7 on NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11 Home 25H2 (26200.9974), VS 2022 Build Tools, Vulkan SDK 1.4.363.1:
AI-assisted. No game files. |
…st quirk #1155's comparison failed on an RTX 4060 Ti: NVIDIA's D3D12 driver returns, for 12 of 31 D24S8 / R24G8 rectangle resolves, planes that match neither the clears nor WARP, while the layer matches both (WARP: 26 of 26). The layer is already checked against the clears above, so such a case is now reported as a host quirk and counted, not failed; a host that matches the clears still has to agree with the layer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/d3d12_vulkan.mdlisted depth-stencil resolves as open, andResolveSubresourceRegionrefused everything but AVERAGE on colour. It now resolves one depth or stencil plane:Formatis the plane's own format (R32_FLOAT,R24_UNORM_X8_TYPELESS).The AVERAGE rule is measured. On the PC runtime (RTX 5070 driver 621.24, and WARP, a fresh device per case),
Closefails withE_INVALIDARGfor AVERAGE whenFormatis the depth format (D32_FLOAT,D24_UNORM_S8_UINT) and for any stencil plane. MIN and MAX are accepted with either kind of format. The layer accepts and refuses the same set.How it works. Each resolve is a
vkCmdBeginRenderingscope with no draws:VK_KHR_depth_stencil_resolve, core in 1.2). The render area is the source rect.DEPTH_STENCIL_ATTACHMENT_OPTIMALand back through the existinground_triphelpers. The other plane is never attached, so it keeps its contents.supportedDepthResolveModes/supportedStencilResolveModes, queried at device creation. One plane per scope, soindependentResolvenever applies.Closeand records nothing.R32_FLOAT,R24_UNORM_X8,X24_G8R32_FLOAT/R24_UNORM_X8R32_TYPELESS/R24G8_TYPELESSresourcesCloseE_INVALIDARGCloseE_INVALIDARGTest: the new
d3d12_depth_resolve_testis registered in ctest and skips with 77 without a Vulkan GPU.Format=D32_FLOAT, which removes its device, and is compared on the resolved plane only, since it writes both D24S8 planes.Gaps:
AI-assisted.