From 90eae7a480674b7ae3452185399d6376352c0907 Mon Sep 17 00:00:00 2001 From: castano Date: Mon, 11 Feb 2008 07:00:14 +0000 Subject: [PATCH] Fix compilation error when SIMD is not supported. --- src/nvtt/squish/simd.h | 6 ++++++ src/nvtt/squish/simd_sse.h | 6 ------ src/nvtt/squish/simd_ve.h | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/nvtt/squish/simd.h b/src/nvtt/squish/simd.h index 0406cec..cb98e7f 100644 --- a/src/nvtt/squish/simd.h +++ b/src/nvtt/squish/simd.h @@ -28,6 +28,12 @@ #include "maths.h" +#ifdef __GNUC__ +# define SQUISH_ALIGN_16 __attribute__ ((__aligned__ (16))) +#else +# define SQUISH_ALIGN_16 __declspec(align(16)) +#endif + #if SQUISH_USE_ALTIVEC #include "simd_ve.h" #endif diff --git a/src/nvtt/squish/simd_sse.h b/src/nvtt/squish/simd_sse.h index 7624f40..853ee7a 100644 --- a/src/nvtt/squish/simd_sse.h +++ b/src/nvtt/squish/simd_sse.h @@ -35,12 +35,6 @@ #define SQUISH_SSE_SPLAT( a ) \ ( ( a ) | ( ( a ) << 2 ) | ( ( a ) << 4 ) | ( ( a ) << 6 ) ) -#ifdef __GNUC__ -# define SQUISH_ALIGN_16 __attribute__ ((__aligned__ (16))) -#else -# define SQUISH_ALIGN_16 __declspec(align(16)) -#endif - namespace squish { #define VEC4_CONST( X ) Vec4( _mm_set1_ps( X ) ) diff --git a/src/nvtt/squish/simd_ve.h b/src/nvtt/squish/simd_ve.h index cfed6a9..d22b370 100644 --- a/src/nvtt/squish/simd_ve.h +++ b/src/nvtt/squish/simd_ve.h @@ -29,8 +29,6 @@ #include #undef bool -#define SQUISH_ALIGN_16 __attribute__ ((__aligned__ (16))) - namespace squish { #define VEC4_CONST( X ) Vec4( ( vector float )( X ) )