From a453307d5e6c1e8b476c703f0f596c56536d420f 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 4f362f91f..028b09a61 100644 --- a/renderdoc/driver/d3d11/d3d11_analyse.cpp +++ b/renderdoc/driver/d3d11/d3d11_analyse.cpp @@ -748,7 +748,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;