From 25e9e8bf1d2d96a5ed464211faa2c773009ee017 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sun, 2 Dec 2012 05:26:11 +0100 Subject: [PATCH] Stubs for __asm in DXTEncoder.cpp to make it compile TODO: needs implementation with intrinsics and/or plain C(++)! --- neo/renderer/DXT/DXTEncoder.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/neo/renderer/DXT/DXTEncoder.cpp b/neo/renderer/DXT/DXTEncoder.cpp index 14b7b9db..eb7dd0a1 100644 --- a/neo/renderer/DXT/DXTEncoder.cpp +++ b/neo/renderer/DXT/DXTEncoder.cpp @@ -1110,6 +1110,7 @@ NormalDistanceDXT1 */ int NormalDistanceDXT1( const int* vector, const int* normalized ) { +#if defined(_MSC_VER) && defined(_M_IX86) int result; __asm { @@ -1150,6 +1151,11 @@ int NormalDistanceDXT1( const int* vector, const int* normalized ) movd result, xmm0 } return result; +#else // not _MSC_VERSION && defined(_M_IX86) + // DG: alternative implementation for non-MSVC builds + return 0; // FIXME: implementation!! + // DG end +#endif // _MSC_VERSION && defined(_M_IX86) } /* @@ -1159,6 +1165,7 @@ NormalDistanceDXT5 */ int NormalDistanceDXT5( const int* vector, const int* normalized ) { +#ifdef _MSC_VER && defined(_M_IX86) int result; __asm { @@ -1209,6 +1216,11 @@ int NormalDistanceDXT5( const int* vector, const int* normalized ) movd result, xmm0 } return result; +#else // not _MSC_VER && defined(_M_IX86) + // DG: alternative implementation for non-MSVC builds + return 0; // FIXME: implementation!! + // DG end +#endif // _MSC_VER && defined(_M_IX86) } /*