mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
a8f91653d1
Found with the Khronos validation layer on AMD RX 7900 XT (Windows, mingw), where D24S8 is unavailable and choose_ds_format() picks the combined D32_SFLOAT_S8_UINT: - VUID-VkImageMemoryBarrier-image-03320: every view/barrier/clear on the canonical and wide depth-stencil images named only the STENCIL aspect. Without separateDepthStencilLayouts, a combined depth/stencil format must be transitioned with both aspects. Added DS_ASPECT and used it for the image views, barriers and vkCmdClearDepthStencilImage ranges. (vkCmdClearAttachments keeps the stencil-only mask - that is legal.) - VUID-vkCmdClearDepthStencilImage-pRanges-02659: the canonical DS image is cleared with vkCmdClearDepthStencilImage but lacked VK_IMAGE_USAGE_TRANSFER_DST_BIT (the wide DS images already had it). - VUID-vkCmdCopyImageToBuffer-dstBuffer-00191: staging buffers are used for readbacks (vkCmdCopyImageToBuffer) but were created with TRANSFER_SRC only. Validation messages over the same 20 s boot (SmackDown 2, Vulkan): 53 -> 3 (the remaining VUID-vkQueueSubmit-pSignalSemaphores-00067 swapchain semaphore reuse is untouched). The fix also cleared the downstream VkImageMemoryBarrier-oldLayout-01213 and vkCmdDraw-None-09600 reports. This change was made with AI assistance (Claude Opus 5.5, Anthropic) and reviewed/tested by the submitter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>