From 0aa54a804539719d504a83d5724680bca2034fd4 Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Tue, 2 Jul 2013 12:53:52 -0700 Subject: [PATCH] DirectXTex: Workaround to avoid ICE when building VS 2013 preview Debug ARM config --- DirectXTex/DirectXTexMipmaps.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DirectXTex/DirectXTexMipmaps.cpp b/DirectXTex/DirectXTexMipmaps.cpp index 356a270..a059e85 100644 --- a/DirectXTex/DirectXTexMipmaps.cpp +++ b/DirectXTex/DirectXTexMipmaps.cpp @@ -2334,7 +2334,8 @@ static HRESULT _Generate3DMipsTriangleFilter( _In_ size_t depth, _In_ size_t lev } else { - sliceAcc->scanline.reset( reinterpret_cast( _aligned_malloc( sizeof(XMVECTOR) * nwidth * nheight, 16 ) ) ); + size_t bytes = sizeof(XMVECTOR) * nwidth * nheight; + sliceAcc->scanline.reset( reinterpret_cast( _aligned_malloc( bytes, 16 ) ) ); if ( !sliceAcc->scanline ) return E_OUTOFMEMORY; }