--- src/gl/textures/gl_hqresize.cpp +++ src/gl/textures/gl_hqresize.cpp @@ -41,8 +41,10 @@ #include "c_cvars.h" #include "gl/hqnx/hqx.h" #ifdef _MSC_VER +#ifdef _M_IX86 #include "gl/hqnx_asm/hqnx_asm.h" #endif +#endif CUSTOM_CVAR(Int, gl_texture_hqresize, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) { @@ -184,6 +186,7 @@ static unsigned char *scaleNxHelper( voi // [BB] hqnx scaling is only supported with the MS compiler. #ifdef _MSC_VER +#ifdef _M_IX86 static unsigned char *hqNxAsmHelper( void (*hqNxFunction) ( int*, unsigned char*, int, int, int ), const int N, unsigned char *inputBuffer, @@ -213,6 +216,7 @@ static unsigned char *hqNxAsmHelper( voi return newBuffer; } #endif +#endif static unsigned char *hqNxHelper( void (*hqNxFunction) ( unsigned*, unsigned*, int, int ), const int N, @@ -286,12 +290,14 @@ unsigned char *gl_CreateUpsampledTexture outHeight = inHeight; int type = gl_texture_hqresize; #ifdef _MSC_VER +#ifdef _M_IX86 // ASM-hqNx does not preserve the alpha channel so fall back to C-version for such textures if (!hasAlpha && type > 3 && type <= 6) { type += 3; } #endif +#endif switch (type) { @@ -308,6 +314,7 @@ unsigned char *gl_CreateUpsampledTexture case 6: return hqNxHelper( &hq4x_32, 4, inputBuffer, inWidth, inHeight, outWidth, outHeight ); #ifdef _MSC_VER +#ifdef _M_IX86 case 7: return hqNxAsmHelper( &HQnX_asm::hq2x_32, 2, inputBuffer, inWidth, inHeight, outWidth, outHeight ); case 8: @@ -315,6 +322,7 @@ unsigned char *gl_CreateUpsampledTexture case 9: return hqNxAsmHelper( &HQnX_asm::hq4x_32, 4, inputBuffer, inWidth, inHeight, outWidth, outHeight ); #endif +#endif } } return inputBuffer;