From 341842d725d5db2c039ca1f7cf1cc51b67031112 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Thu, 13 Sep 2012 17:43:58 -0400 Subject: [PATCH] Make sure to not even compile the definition for the SIMD function. --- BPTCEncoder/include/BC7Compressor.h | 6 +++++- Core/src/ThreadGroup.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/BPTCEncoder/include/BC7Compressor.h b/BPTCEncoder/include/BC7Compressor.h index b05b574..2e87bd5 100755 --- a/BPTCEncoder/include/BC7Compressor.h +++ b/BPTCEncoder/include/BC7Compressor.h @@ -15,6 +15,8 @@ // //-------------------------------------------------------------------------------------- +#include "BC7Config.h" + namespace BC7C { // This is the error metric that is applied to our error measurement algorithm @@ -52,10 +54,12 @@ namespace BC7C // the image in pixels. void CompressImageBC7(const unsigned char *inBuf, unsigned char *outBuf, unsigned int width, unsigned int height); +#ifdef HAS_SSE_41 // Compress the image given as RGBA data to BC7 format using an algorithm optimized for SIMD // enabled platforms. Width and Height are the dimensions of the image in pixels. void CompressImageBC7SIMD(const unsigned char* inBuf, unsigned char* outBuf, unsigned int width, unsigned int height); +#endif // Decompress the image given as BC7 data to R8G8B8A8 format. Width and Height are the dimensions of the image in pixels. - void DecompressImageBC7SIMD(const unsigned char* inBuf, unsigned char* outBuf, unsigned int width, unsigned int height); + void DecompressImageBC7(const unsigned char* inBuf, unsigned char* outBuf, unsigned int width, unsigned int height); } diff --git a/Core/src/ThreadGroup.cpp b/Core/src/ThreadGroup.cpp index 4851e59..3f2cabe 100644 --- a/Core/src/ThreadGroup.cpp +++ b/Core/src/ThreadGroup.cpp @@ -71,12 +71,16 @@ ThreadGroup::~ThreadGroup() { unsigned int ThreadGroup::GetCompressedBlockSize() { if(m_Func == BC7C::CompressImageBC7) return 16; +#ifdef HAS_SSE_41 if(m_Func == BC7C::CompressImageBC7SIMD) return 16; +#endif } unsigned int ThreadGroup::GetUncompressedBlockSize() { if(m_Func == BC7C::CompressImageBC7) return 64; +#ifdef HAS_SSE_41 if(m_Func == BC7C::CompressImageBC7SIMD) return 64; +#endif } void ThreadGroup::Start() {