X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=helpers%2Fd3d11size.hpp;h=ed75d64e3ad29f9932ea61309fbca889090c971d;hb=7a9fb5103e052150232b64cb5d99374cda3f1234;hp=f746d80a00b232f530767640ce7de7d3fc90fef4;hpb=cbe34810938b91291bc46a5de5535057b869f750;p=apitrace diff --git a/helpers/d3d11size.hpp b/helpers/d3d11size.hpp index f746d80..ed75d64 100644 --- a/helpers/d3d11size.hpp +++ b/helpers/d3d11size.hpp @@ -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); }