]> git.cworth.org Git - apitrace/blobdiff - helpers/d3d10size.hpp
d3d10,d3d11: Take the UpdateSubresource box in full consideration.
[apitrace] / helpers / d3d10size.hpp
index 92d4544e9b37af4cd4692b3621f5c53900962519..6441bdcb7ae6579e40afcba1eed15f0e47aca7ee 100644 (file)
@@ -238,6 +238,12 @@ _calcSubresourceSize(ID3D10Resource *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);
 }