From 4e1e8b49c1086697c9c683d180f256e99a1ce194 Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Thu, 6 Jun 2013 14:46:28 -0700 Subject: [PATCH] DirectXTex: non-power-of-2 error should be in 2DBox, not 2DPoint --- DirectXTex/DirectXTexMipmaps.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DirectXTex/DirectXTexMipmaps.cpp b/DirectXTex/DirectXTexMipmaps.cpp index 2959d77..382ee1a 100644 --- a/DirectXTex/DirectXTexMipmaps.cpp +++ b/DirectXTex/DirectXTexMipmaps.cpp @@ -611,9 +611,6 @@ static HRESULT _Generate2DMipsPointFilter( _In_ size_t levels, _In_ const Scratc size_t width = mipChain.GetMetadata().width; size_t height = mipChain.GetMetadata().height; - if ( !ispow2(width) || !ispow2(height) ) - return E_FAIL; - // Allocate temporary space (2 scanlines) ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast( _aligned_malloc( (sizeof(XMVECTOR)*width*2), 16 ) ) ); if ( !scanline ) @@ -698,6 +695,9 @@ static HRESULT _Generate2DMipsBoxFilter( _In_ size_t levels, _In_ const ScratchI size_t width = mipChain.GetMetadata().width; size_t height = mipChain.GetMetadata().height; + if ( !ispow2(width) || !ispow2(height) ) + return E_FAIL; + // Allocate temporary space (3 scanlines) ScopedAlignedArrayXMVECTOR scanline( reinterpret_cast( _aligned_malloc( (sizeof(XMVECTOR)*width*3), 16 ) ) ); if ( !scanline )