From fca8e9b21e7f15169e9d7358ffc57265c28fbf9f Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 23 Sep 2026 12:51:40 -0400 Subject: [PATCH] [MG_Backend] (P7): widen wire image barriers to both aspects for D16_UNORM_S8_UINT --- .../MG_Backend/DirectVulkan/Renderer/WireFramebuffer.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MobileGL/MG_Backend/DirectVulkan/Renderer/WireFramebuffer.inc b/MobileGL/MG_Backend/DirectVulkan/Renderer/WireFramebuffer.inc index 6b91b9c7..dfd37cf8 100644 --- a/MobileGL/MG_Backend/DirectVulkan/Renderer/WireFramebuffer.inc +++ b/MobileGL/MG_Backend/DirectVulkan/Renderer/WireFramebuffer.inc @@ -194,7 +194,10 @@ GetImageTransitionSourceState(image.layout, stage, access); // One tracked layout per image: move the complete mip chain, never just the surface. VkImageAspectFlags barrierAspect = image.aspect; - if (image.format == VK_FORMAT_D24_UNORM_S8_UINT || image.format == VK_FORMAT_D32_SFLOAT_S8_UINT) + // Every packed format, D16_UNORM_S8_UINT included (g5-msrbo review round): the layout is + // tracked per image, so a one-aspect barrier would leave the other aspect behind the + // tracked layout - and CopyWireDepthStencilBlit moves the two aspects in two legs. + if (WireFormatIsPackedDepthStencil(image.format)) barrierAspect = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; if (image.layout == layout) { // GENERAL->GENERAL is not a layout transition, but the next load,