Skip to content

Commit aa604a5

Browse files
walbourn_cpwalbourn_cp
walbourn_cp
authored and
walbourn_cp
committed
DirectXTex updated to use XNAMath 2.05 instead of 2.04 for USE_XNAMATH builds
1 parent fe9bb94 commit aa604a5

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

DirectXTex/DirectXTexConvert.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include "directxtexp.h"
1717

1818
#ifdef USE_XNAMATH
19-
#if XNAMATH_VERSION < 204
20-
#error This file requires XNAMATH v2.04 or later
19+
#if XNAMATH_VERSION < 205
20+
#error This file requires XNAMATH v2.05 or later
2121
#endif
2222
#else
2323
using namespace DirectX::PackedVector;
@@ -1400,7 +1400,7 @@ bool _StoreScanline( LPVOID pDestination, size_t size, DXGI_FORMAT format,
14001400
for( size_t icount = 0; icount < size; icount += sizeof(XMUBYTEN4) )
14011401
{
14021402
if ( sPtr >= ePtr ) break;
1403-
XMVECTOR v = XMVectorPermute<XM_PERMUTE_0Z, XM_PERMUTE_0Y, XM_PERMUTE_0X, XM_PERMUTE_1W>( *sPtr++, g_XMIdentityR3 );
1403+
XMVECTOR v = XMVectorPermute<2, 1, 0, 7>( *sPtr++, g_XMIdentityR3 );
14041404
XMStoreUByteN4( dPtr++, v );
14051405
}
14061406
}

DirectXTex/DirectXTexP.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,22 +58,6 @@ struct IWICImagingFactory;
5858

5959
namespace DirectX
6060
{
61-
62-
#ifdef USE_XNAMATH
63-
template<uint32_t SwizzleX, uint32_t SwizzleY, uint32_t SwizzleZ, uint32_t SwizzleW>
64-
inline XMVECTOR XMVectorSwizzle(FXMVECTOR V)
65-
{
66-
return XMVectorSwizzle( V, SwizzleX, SwizzleY, SwizzleZ, SwizzleW );
67-
}
68-
69-
template<uint32_t PermuteX, uint32_t PermuteY, uint32_t PermuteZ, uint32_t PermuteW>
70-
inline XMVECTOR XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2)
71-
{
72-
static XMVECTORI32 control = { PermuteX, PermuteY, PermuteZ, PermuteW };
73-
return XMVectorPermute( V1, V2, control );
74-
}
75-
#endif // USE_XNAMATH
76-
7761
//---------------------------------------------------------------------------------
7862
// WIC helper functions
7963
DXGI_FORMAT _WICToDXGI( _In_ const GUID& guid );

0 commit comments

Comments
 (0)