Repository navigation
Runtime: support shifted depth and stencil resolves - #4745
gabrielsteglich wants to merge 1 commit into
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Built and ran both tests at 68a33c756 on Windows 11, RTX 5070 Ti:
d3d12_depth_resolve_test-> exit 0:42 of 42 matchagainst the NVIDIA host,36 of 36 matchagainst WARP, 5 refusals alike;11 shifted cases matched the clears, 78 host comparisons matched, 9 refusals kept the destination.replay_depth_resolve_offset_test-> exit 0:intermediate failures and stencil-only copy verified.
Shifted depth and stencil resolves are now replayed with the correct offsets through vulkan_replay.h/vulkan_backend.h, and the two tests cover the shifted rects, the host comparisons, refusals and the stencil-only copy. git diff --check clean. No blocking issue.
|
Tested
No blocking issue. AI-assisted. |
|
Verified commit
Reviewed AI-assisted (Gemini, Antigravity). |
|
PASS. MSVC build of the new and existing depth-resolve tests; One non-blocking cost: the temporary image is full-mip-sized even for a small source rectangle ( Approve. AI-assisted review, no game files, no game data. |
Claimed in coordination issue #4683.
Depends on: #3977, #3019
The branch is based directly on
main. #3977 overlaps invulkan_replay.h. #3019 already conflicts withmainand changes the same replay paths.What and why
ResolveSubresourceRegioncan now write a depth or stencil rectangle to a different origin in a same-format 2D texture. Replay resolves the selected plane into a single-sample temporary image at the source coordinates, then copies only that rectangle to the destination. This preserves the surrounding texels and other plane.The command queue keeps temporaries alive until submitted work is complete. The D3D12 entry point checks source and destination mip bounds. Enhanced barriers with
SYNC_RESOLVEcover the final Vulkan copy.Tested
Commit
68a33c75on Windows 11 Pro build 26300, NVIDIA GeForce RTX 3090 with driver 621.01, MSVC 19.44.35229, Windows SDK 10.0.26100.0, Vulkan SDK 1.4.363.0, RelWithDebInfo. Vulkan synchronization validation was enabled withLEONIDA_VK_VALIDATION=1.98fa503freturnedE_INVALIDARGatClosefor all 11 shifted cases in the new fixture. The patch passes all 11, covering 13 shifted copies, rectangle edges, overlapping writes with Enhanced Barriers, and consecutive submissions on one DIRECT queue. Nine negative cases preserve the destination.AI-assisted: yes. Independently reviewed before submission.
Checklist