Repository navigation
D3D12/Vulkan: fix copies within one texture subresource - #3348
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Tested
First NVIDIA coverage for the within-one-subresource copy fix. AI-assisted. |
Desamodeth
left a comment
There was a problem hiding this comment.
Tested 9e6544a3 on Windows 11, MSVC 19.44, physical RTX 5070 (NVIDIA 621.24), with Khronos validation 1.4.363 and synchronization validation enabled. The unmodified Release vk_command_replay_test passed all ten parts (A–J) with zero validation errors.
I also tried a vertical copy to complement J's horizontal case: two distinct pixels copied from the bottom row to the top row at the same X offset. All eight RGBA8 pixels matched, including the untouched columns. The PR rejected a partially overlapping copy during preparation. With only vulkan_replay.h restored to main f847748c, the same rejection assertion failed before command submission.
Synthetic textures only. AI-assisted with Codex.
Flyander
left a comment
There was a problem hiding this comment.
Reviewed at 9e6544a36b2a24a5fe11f0c0a022ce630f325781.
The static review found the same-subresource path uses one GENERAL layout with a read/write dependency, and overlap is rejected before command submission. The existing independent test comment reports Release vk_command_replay_test A–J passing with synchronization validation on an RTX 5070, including vertical disjoint copy and overlap rejection. The PR also reports a llvmpipe run.
I did not compile the C++ target or rerun Vulkan locally; no game files were used. I found no correctness issue in the diff.
|
Tested 9e6544a on Windows 11, RTX 5080 (driver 616.92) and AMD Radeon iGPU gfx1036 (driver 26.10.1):
AI-assisted. |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Code review of 9e6544a (read only, no runs): looks right to me.
One note for merge order: #2928 moves a copy's prepared data ( AI-assisted (Claude Code). |
|
Tested 9e6544a (merged onto main aa2988c) on RTX 3060 (Ampere), driver 617.14, Windows 11, MSVC 14.44, RelWithDebInfo: pass
AI-assisted: this check was run and written with Claude Code (Anthropic) on my machine; the numbers above are its unedited output. |
Claimed in the coordination issue as: claiming: new D3D item for #3232 — replay disjoint same-subresource copies in GENERAL and reject overlapping regions. Claim included here because this account cannot comment upstream.
What and why
D3D12 Enhanced Barriers allow a COMMON-layout subresource to copy between disjoint regions of itself. On first use, replay put the same mip into two different Vulkan layouts (VUID-vkCmdCopyImage-srcImage-09460). Use GENERAL for both sides with one read/write dependency, and reject intersecting regions before emitting GPU commands.
Tested
vk_command_replay_test: reproduced the layout error before the fix; after it, synchronization validation is clean, synthetic RGBA8 readback matches, and partial overlap is rejected.command_list,vk_sync_validation,vk_bc_zero_init,replay_copy_offset, andreplay_readback_stagespassed.Checklist