From 113c6f35aee609e054015dbc4f61c58cae60114c Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 29 Jun 2020 18:25:23 +0100 Subject: [PATCH] Add ALLOW_DEPTH_STENCIL to array textures copied to MSAA. Closes #1960 * Nothing seems to suggest that this is necessary technically and there are no validation errors, but without this flag sampling from the array texture causes DEVICE_HUNG on nvidia GPUs. --- renderdoc/driver/d3d12/d3d12_initstate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_initstate.cpp b/renderdoc/driver/d3d12/d3d12_initstate.cpp index c8cfca8c7..4d784193f 100644 --- a/renderdoc/driver/d3d12/d3d12_initstate.cpp +++ b/renderdoc/driver/d3d12/d3d12_initstate.cpp @@ -659,6 +659,9 @@ bool D3D12ResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceI bool isDepth = IsDepthFormat(resDesc.Format) || (resDesc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL) != 0; + if(isDepth) + arrayDesc.Flags = D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL; + D3D12_RESOURCE_DESC msaaDesc = resDesc; msaaDesc.Alignment = 0; msaaDesc.Flags = isDepth ? D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL