Repository navigation
Conversation
…scratch (RT-DEPTH-FORMAT-COPY-STAGED) A CopyTextureRegion of the depth plane from a D32_SFLOAT_S8_UINT image into a D32_SFLOAT one was replayed as vkCmdCopyImage. Vulkan requires depth/stencil formats to match exactly (VUID-vkCmdCopyImage-srcImage-01548), and the NVIDIA driver (RTX 4070 Laptop, 621.40) wrote past the end of the D32 image: the world-start WRITE_INVALID device loss, with the fault at the first byte after a 2560x1440 D32_SFLOAT image (VK_EXT_device_address_binding_report) and this VUID reported by the validation layer just before the loss. depth_format_pair: two depth formats with the same depth encoding but not the same VkFormat (D32 / D32S8, D16 / D16S8, X8_D24 / D24S8) take the image -> scratch -> image path depth <-> colour and A8 copies already use; the depth aspect has the same texel layout in a buffer on both sides. replay_copy_offset_test: the D32S8 -> D32 and D32 -> D32S8 depth-plane copies are staged (no vkCmdCopyImage, depth aspect, 4 bytes a texel), and D32 -> D32 keeps vkCmdCopyImage. Fails without the change (6 checks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Great find. Reviewed and checked on a second machine (Windows 10 19045, RTX 5060 Ti, NVIDIA 621.01, MSVC 14.43), no boot:
One gap next to it, not a blocker. The same invalid
Refusing it with I'm running the rest of |
|
@Snooozs thanks for the second-machine check and for testing the other pairs. Agreed: I'll keep #1893 to the same-encoding pairs I could measure, and the different-encoding ones are yours to take as a follow-up (log once, leave that copy out). I'll keep an eye out for that VUID with those pairs in my validation runs. AI-assisted. |
|
Thanks, done as #1905 on top of this. Two corrections from doing it: my sentence that an empty |
…py-staged replay: copies between depth formats that differ go through transfer scratch (RT-DEPTH-FORMAT-COPY-STAGED)
|
Merged into
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Closing only to fix this page's state: the change is already on AI-assisted (Claude Code, Claude Opus 5.5). |
Claimed in the coordination issue as: RT-DEPTH-FORMAT-COPY-STAGED (#1608 (comment))
What and why
A
CopyTextureRegionof the depth plane from aD32_SFLOAT_S8_UINTimage into aD32_SFLOATone (D3D12:D32_FLOAT_S8X24andD32_FLOAT) was replayed asvkCmdCopyImage. Vulkan requires depth/stencil formats to match exactly (VUID-vkCmdCopyImage-srcImage-01548). The NVIDIA driver runs the copy anyway and writes past the end of the D32 image.That is the world-start
WRITE_INVALIDdevice loss ("crash A"):VK_EXT_device_address_binding_report, the fault address is the first byte after a 2560x1440D32_SFLOATimage (bound size0xF00000); the next binding starts 64 KiB later (finding: Coordinating who works on what (continued from #14) #1608 (comment));LEONIDA_VK_VALIDATION=1, this VUID for exactly that pair is reported just before the loss.depth_format_pair(new,runtime/src/vulkan_replay.h): two depth formats with the same depth encoding but not the sameVkFormat(D32_SFLOAT/D32_SFLOAT_S8_UINT,D16_UNORM/D16_UNORM_S8_UINT,X8_D24_UNORM_PACK32/D24_UNORM_S8_UINT) now take the image → transfer scratch → image path that depth ↔ colour and the two A8 backings already use. In a buffer the depth aspect has the same texel layout on both sides (4 bytes for D32). A whole-resource copy between such a pair was already refused before this point (the aspects differ), so only the depth-planeCopyTextureRegionchanges.Tested
replay_copy_offset_test(no GPU, fake Vulkan callbacks), new case: D32S8 → D32 and D32 → D32S8 depth-plane copies are staged (novkCmdCopyImage, depth aspect on both halves, 4 bytes a texel), and D32 → D32 keepsvkCmdCopyImage. It fails without the change (6 checks) and passes with it. Built with MSVC 19.44.scripts/check_no_game_data.pyon the changed files, andtests/test_text_write_line_endings.py: OK.LEONIDA_ASYNC_PIPELINES=1,LEONIDA_DEVICE_FAULT=1, counts only:ExecuteCommandLists), with host image copies off plus d3d12: title images use the staged upload on a device without host image copies (RT-TITLE-STAGED-NO-HOST-COPY) #1827, d3d12: changed console heap slots are fixed without a time limit by default, not given to shaders as null (RT-CONSOLE-FIX-BUDGET-NULL) #1849 and image_memory: guard zero requests, make allocate strong-exception-safe, and free outside mutex #1698;ExecuteCommandLists); one of them under validation, which no longer reported the copy;mainalone (host image copies on, the default): no crash A; that run stopped at ~266 s with the other known stop ("crash B",lib_cs_01144in flight, a type-4-only fault report), which d3d12: changed console heap slots are fixed without a time limit by default, not given to shaders as null (RT-CONSOLE-FIX-BUDGET-NULL) #1849 addresses;ExecuteCommandLists).Not shown yet: these are few runs on one machine. Whether host image copies can stay on by default on NVIDIA (#1810, #1851) needs more runs with them on; I'm doing those and will report in #1608. After crash A, the next stop here is a list-values gate stall (gates time out, frames drop to 0), which this change doesn't address.
Depends on: none.
AI-assisted (Claude Code).
🤖 Generated with Claude Code