Make sure to not even compile the definition for the SIMD function.

This commit is contained in:
Pavel Krajcevski 2012-09-13 17:43:58 -04:00
parent ef2a370fc6
commit 341842d725
2 changed files with 9 additions and 1 deletions

View File

@ -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);
}

View File

@ -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() {