From aa604a531cdf38d4e53688ffbd65a67b7be5c99e Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Fri, 22 Jun 2012 12:14:10 -0700 Subject: [PATCH] DirectXTex updated to use XNAMath 2.05 instead of 2.04 for USE_XNAMATH builds --- DirectXTex/DirectXTexConvert.cpp | 6 +++--- DirectXTex/DirectXTexP.h | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/DirectXTex/DirectXTexConvert.cpp b/DirectXTex/DirectXTexConvert.cpp index e722070..46e6db8 100644 --- a/DirectXTex/DirectXTexConvert.cpp +++ b/DirectXTex/DirectXTexConvert.cpp @@ -16,8 +16,8 @@ #include "directxtexp.h" #ifdef USE_XNAMATH -#if XNAMATH_VERSION < 204 -#error This file requires XNAMATH v2.04 or later +#if XNAMATH_VERSION < 205 +#error This file requires XNAMATH v2.05 or later #endif #else using namespace DirectX::PackedVector; @@ -1400,7 +1400,7 @@ bool _StoreScanline( LPVOID pDestination, size_t size, DXGI_FORMAT format, for( size_t icount = 0; icount < size; icount += sizeof(XMUBYTEN4) ) { if ( sPtr >= ePtr ) break; - XMVECTOR v = XMVectorPermute( *sPtr++, g_XMIdentityR3 ); + XMVECTOR v = XMVectorPermute<2, 1, 0, 7>( *sPtr++, g_XMIdentityR3 ); XMStoreUByteN4( dPtr++, v ); } } diff --git a/DirectXTex/DirectXTexP.h b/DirectXTex/DirectXTexP.h index 9665c08..197d66a 100644 --- a/DirectXTex/DirectXTexP.h +++ b/DirectXTex/DirectXTexP.h @@ -58,22 +58,6 @@ struct IWICImagingFactory; namespace DirectX { - -#ifdef USE_XNAMATH - template - inline XMVECTOR XMVectorSwizzle(FXMVECTOR V) - { - return XMVectorSwizzle( V, SwizzleX, SwizzleY, SwizzleZ, SwizzleW ); - } - - template - inline XMVECTOR XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2) - { - static XMVECTORI32 control = { PermuteX, PermuteY, PermuteZ, PermuteW }; - return XMVectorPermute( V1, V2, control ); - } -#endif // USE_XNAMATH - //--------------------------------------------------------------------------------- // WIC helper functions DXGI_FORMAT _WICToDXGI( _In_ const GUID& guid );