From 038028f4bae57c55b45caf8dd38e5aa22ebf85e2 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 28 Oct 2019 16:16:28 +0000 Subject: [PATCH] Use integer copy for MSAA<->array when texture is typeless * Copying as floats may not be safe as subnormal values will get flushed. --- renderdoc/driver/d3d11/d3d11_msaa_array_conv.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/renderdoc/driver/d3d11/d3d11_msaa_array_conv.cpp b/renderdoc/driver/d3d11/d3d11_msaa_array_conv.cpp index f9e18009d..2367db0ee 100644 --- a/renderdoc/driver/d3d11/d3d11_msaa_array_conv.cpp +++ b/renderdoc/driver/d3d11/d3d11_msaa_array_conv.cpp @@ -202,7 +202,8 @@ void D3D11DebugManager::CopyArrayToTex2DMS(ID3D11Texture2D *destMS, ID3D11Textur } bool depthFormat = IsDepthFormat(descMS.Format); - bool intFormat = IsUIntFormat(descMS.Format) || IsIntFormat(descMS.Format); + bool intFormat = + IsUIntFormat(descMS.Format) || IsIntFormat(descMS.Format) || IsTypelessFormat(descMS.Format); ID3D11Texture2D *rtvResource = NULL; ID3D11Texture2D *srvResource = NULL; @@ -547,7 +548,8 @@ void D3D11DebugManager::CopyTex2DMSToArray(ID3D11Texture2D *destArray, ID3D11Tex D3D11_TEXTURE2D_DESC srvResDesc = descMS; bool depthFormat = IsDepthFormat(descMS.Format); - bool intFormat = IsUIntFormat(descMS.Format) || IsIntFormat(descMS.Format); + bool intFormat = + IsUIntFormat(descMS.Format) || IsIntFormat(descMS.Format) || IsTypelessFormat(descMS.Format); rtvResDesc.BindFlags = depthFormat ? D3D11_BIND_DEPTH_STENCIL : D3D11_BIND_RENDER_TARGET; srvResDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;