From d7c2e3ac768735d4dc9b75c99130537284b2d94b Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Tue, 24 Sep 2024 23:45:52 +0200 Subject: [PATCH] [d3d9] Use correct aspect mask when blitting depth stencil textures We don't want to blit stencil when the D3D9 format doesn't have stencil. --- src/d3d9/d3d9_device.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 59ae516ad..0d0ef4c1c 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -7640,16 +7640,13 @@ namespace dxvk { const D3D9_VK_FORMAT_MAPPING srcFormatInfo = LookupFormat(srcDesc->Format); const D3D9_VK_FORMAT_MAPPING dstFormatInfo = LookupFormat(dstDesc->Format); - auto srcVulkanFormatInfo = lookupFormatInfo(srcFormatInfo.FormatColor); - auto dstVulkanFormatInfo = lookupFormatInfo(dstFormatInfo.FormatColor); - const VkImageSubresource dstSubresource = dstTextureInfo->GetSubresourceFromIndex( - dstVulkanFormatInfo->aspectMask, 0); + dstFormatInfo.Aspect, 0); const VkImageSubresource srcSubresource = srcTextureInfo->GetSubresourceFromIndex( - srcVulkanFormatInfo->aspectMask, src->GetSubresource()); + srcFormatInfo.Aspect, src->GetSubresource()); const VkImageSubresourceLayers dstSubresourceLayers = { dstSubresource.aspectMask,