]> git.cworth.org Git - apitrace/blobdiff - helpers/d3d11size.hpp
d3d10,d3d11: Take the UpdateSubresource box in full consideration.
[apitrace] / helpers / d3d11size.hpp
index f746d80a00b232f530767640ce7de7d3fc90fef4..ed75d64e3ad29f9932ea61309fbca889090c971d 100644 (file)
@@ -169,6 +169,12 @@ _calcSubresourceSize(ID3D11Resource *pDstResource, UINT DstSubresource, const D3
         return 0;
     }
 
+    if (pDstBox) {
+        Width  = pDstBox->right  - pDstBox->left;
+        Height = pDstBox->bottom - pDstBox->top;
+        Depth  = pDstBox->back   - pDstBox->front;
+    }
+
     return _calcMipDataSize(MipLevel, Format, Width, Height, SrcRowPitch, Depth, SrcDepthPitch);
 }