1
0
mirror of https://github.com/microsoft/DirectXTex synced 2025-01-03 23:11:05 +00:00

DirectXTex: non-power-of-2 error should be in 2DBox, not 2DPoint

This commit is contained in:
walbourn_cp 2013-06-06 14:46:28 -07:00
parent cc6da6ef25
commit 4e1e8b49c1

View File

@ -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<XMVECTOR*>( _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<XMVECTOR*>( _aligned_malloc( (sizeof(XMVECTOR)*width*3), 16 ) ) );
if ( !scanline )