X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=helpers%2Fd3d10size.hpp;h=6441bdcb7ae6579e40afcba1eed15f0e47aca7ee;hb=8772a4f54c5e245d5bd375e47b6ab9176c95d198;hp=92d4544e9b37af4cd4692b3621f5c53900962519;hpb=bb23f3a0bad625e3c427b9de991d4a42fa22e5f0;p=apitrace diff --git a/helpers/d3d10size.hpp b/helpers/d3d10size.hpp index 92d4544..6441bdc 100644 --- a/helpers/d3d10size.hpp +++ b/helpers/d3d10size.hpp @@ -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); }