From f121b05fda1bc4886b42ceba68ef91e643fb787a Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 11 Feb 2020 13:40:55 +0000 Subject: [PATCH] Fix check for depth in MSAA <-> Array copies --- renderdoc/driver/d3d12/d3d12_msaa_array_conv.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/d3d12/d3d12_msaa_array_conv.cpp b/renderdoc/driver/d3d12/d3d12_msaa_array_conv.cpp index c5ddf7c8a..81397474b 100644 --- a/renderdoc/driver/d3d12/d3d12_msaa_array_conv.cpp +++ b/renderdoc/driver/d3d12/d3d12_msaa_array_conv.cpp @@ -63,7 +63,8 @@ void D3D12DebugManager::CopyTex2DMSToArray(ID3D12Resource *destArray, ID3D12Reso dsvDesc.Texture2DArray.MipSlice = 0; bool isDepth = IsDepthFormat(rtvDesc.Format) || - (descMS.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0; + (descMS.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0 || + (descArr.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0; bool intFormat = IsUIntFormat(rtvDesc.Format) || IsIntFormat(rtvDesc.Format); bool stencil = false; @@ -331,7 +332,8 @@ void D3D12DebugManager::CopyArrayToTex2DMS(ID3D12Resource *destMS, ID3D12Resourc dsvDesc.Texture2DMSArray.ArraySize = 1; bool isDepth = IsDepthFormat(rtvDesc.Format) || - (descArr.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0; + (descArr.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0 || + (descMS.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0; bool intFormat = IsUIntFormat(rtvDesc.Format) || IsIntFormat(rtvDesc.Format); bool stencil = false;