Repository navigation
Conversation
|
Independent build + test: PASS AI-assisted (Claude Code). Windows 11 x64, MSVC 19.44.35220, Ninja RelWithDebInfo, NVIDIA GeForce RTX 3080 driver 621.24 / 32.0.16.2124 (Vulkan layer and host D3D12), plus WARP. Head
So the new test fails without the one-line Neighbouring test: Notes:
|
|
Independent Windows RDNA2 verification for Leonida PR #7942 AMD Radeon RX 6700 XT, AMD Adrenalin 26.10.1 (32.0.21045.16010), Vulkan Baseline: dde82f2 (the PR's parent).
Supplemental AVERAGE check: I ran the same locally instrumented fixture All inputs were synthetic. AI-assisted with Codex. |
|
Independent dual-GPU test of head
WARP edge mismatches are allowed by this test, so these totals do not assert exact agreement on those cases. No Vulkan validation errors appeared in either log. Synthetic inputs only; no game files. AI-assisted (Codex). |
|
Tested Built No game files. AI-assisted (Claude Code). |
|
Checked against native D3D12 on an RTX 4070 Ti SUPER (debug layer on; standalone program outside the repo): 4x MSAA D16_UNORM or R16_TYPELESS source cleared to 0.25 with a half-screen triangle at 0.75, so edge pixels mix both depths.
That matches d3d12_vulkan_device.cpp:8405 with the AVERAGE check at :8431: R16_UNORM never matches the D16 image in color_resolve_format_matches (:8387), so it takes the depth path (d3d12_com.cpp:658) and vulkan_replay.h:1960-1965 resolves through a real depth attachment (the driver lists AVERAGE in supportedDepthResolveModes). Optional: a refusal case for Format = DXGI_FORMAT_R16_TYPELESS in d3d12_d16_depth_resolve_test.cpp's refused[] (already rejected by the typeless checks at :8383 and :8414). AI-assisted (Claude Code). |
Claimed in coordination issue #7804: #7804 (comment)
What and why
depth_stencil_resolve_supported()inruntime/shims/d3d12_vulkan_device.cppmapped depth/stencil plane SRV formats for D32 (DXGI_FORMAT_R32_FLOAT), D24S8 (DXGI_FORMAT_R24_UNORM_X8_TYPELESS/DXGI_FORMAT_X24_TYPELESS_G8_UINT), and D32S8 (DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS/DXGI_FORMAT_X32_TYPELESS_G8X24_UINT), but omittedDXGI_FORMAT_R16_UNORMforDXGI_FORMAT_D16_UNORM/DXGI_FORMAT_R16_TYPELESS.As a result:
ResolveSubresourceRegionon aD16_UNORMorR16_TYPELESSdepth texture withFormat = DXGI_FORMAT_R16_UNORMwas refused at recording (Close()returnedE_INVALIDARG) forMIN,MAX, andAVERAGE.D3D12_RESOLVE_MODE_AVERAGEwas completely unusable for 16-bit depth targets, since D3D12 requires the depth plane's SRV format (DXGI_FORMAT_R16_UNORM) rather thanDXGI_FORMAT_D16_UNORMforAVERAGE.This PR adds
case DXGI_FORMAT_R16_UNORM: family = DXGI_FORMAT_D16_UNORM, named_plane = 0; break;todepth_stencil_resolve_supported(), adds a minimal synthetic GPU regression testd3d12_d16_depth_resolve_test, and notesR16_UNORMindocs/d3d12_vulkan.md.Tested
Environment: Windows 11, MSVC 19.51.36263.0 + Ninja, CMake 4.4.3, Vulkan SDK 1.4.363.0,
RelWithDebInfo,LEONIDA_VK_VALIDATION=1.origin/main) on NVIDIA GeForce RTX 5090 (driver 32.0.16.2124 / 621.24):d3d12_d16_depth_resolve_testfailed as expected: all 15DXGI_FORMAT_R16_UNORMcases (D16_UNORMandR16_TYPELESS,MIN/MAX/AVERAGE, whole and rectangle, plus edge draw) returnedClose 0x80070057(E_INVALIDARG) on the layer, while both native D3D12 (RTX 5090) and WARP returnedS_OK.LEONIDA_VK_VALIDATION=1):d3d12_d16_depth_resolve_test: 23/23 layer cases passed, 23/23 matched native RTX 5090 D3D12 (edgeAVERAGEwithin 1 ULP on the 0.5 halfway tie: layer 24576 vs host 24575), 12/15 matched WARP (the 3 edge cases differ in WARP MSAA sample coverage), 3/3 refusals kept destination and matched both hosts, 0 Vulkan validation errors.LEONIDA_VK_VALIDATION=1):d3d12_d16_depth_resolve_test: 23/23 layer cases passed (correctly refusingAVERAGEsincesupportedDepthResolveModes = 0xdlacksAVERAGE), 18/18 matched native Radeon D3D12, 10/10 matched WARP, 3/3 refusals matched, 0 Vulkan validation errors.LEONIDA_VK_VALIDATION=1, RTX 5090):ctest -R "^(d3d12_d16_depth_resolve|d3d12_com|vk_command_replay|d3d12_view_slices)$"— 4/4 passed.python -I tests/test_ctest_registration.py— 4/4 OK.python -I tests/test_ci_registration.py— 14/14 OK.python -I scripts/check_no_game_data.py runtime/shims/d3d12_vulkan_device.cpp runtime/CMakeLists.txt runtime/test/d3d12_d16_depth_resolve_test.cpp docs/d3d12_vulkan.md— clean.AI-assisted: yes (Gemini).
Checklist
test_ctest_registration.pyandtest_ci_registration.pypass).LEONIDA_VK_VALIDATION=1(0 validation errors).