From ef788c7e4f4bc355ddeea784d3723abdb21f5cfb Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 5 Jan 2018 10:50:44 +0000 Subject: [PATCH] Account correctly for UAV mip slice when fetching 2D texture data --- renderdoc/driver/d3d11/d3d11_analyse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d11/d3d11_analyse.cpp b/renderdoc/driver/d3d11/d3d11_analyse.cpp index dc994a711..3aa99da41 100644 --- a/renderdoc/driver/d3d11/d3d11_analyse.cpp +++ b/renderdoc/driver/d3d11/d3d11_analyse.cpp @@ -739,7 +739,7 @@ void D3D11DebugManager::CreateShaderGlobalState(ShaderDebug::GlobalState &global rowPitch = mapped.RowPitch; depthPitch = 0; - size_t datasize = rowPitch * desc.Height; + size_t datasize = rowPitch * RDCMAX(1U, desc.Height >> udesc.Texture2D.MipSlice); uint32_t numSlices = 1;