mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-23 12:23:45 +00:00
Avoid SIMD functions if they're not defined.
This commit is contained in:
parent
a850cf0103
commit
47fbfa1615
1 changed files with 14 additions and 1 deletions
|
@ -34,12 +34,16 @@ static CompressionFunc ChooseFuncFromSettings(const SCompressionSettings &s) {
|
|||
case eCompressionFormat_BPTC:
|
||||
{
|
||||
BC7C::SetQualityLevel(s.iQuality);
|
||||
#ifdef HAS_SSE_41
|
||||
if(s.bUseSIMD) {
|
||||
return BC7C::CompressImageBC7SIMD;
|
||||
}
|
||||
else {
|
||||
#endif
|
||||
return BC7C::CompressImageBC7;
|
||||
#ifdef HAS_SSE_41
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -54,7 +58,16 @@ CompressedImage * CompressImage(
|
|||
const ImageFile &img,
|
||||
const SCompressionSettings &settings
|
||||
) {
|
||||
|
||||
|
||||
// Make sure that platform supports SSE if they chose this
|
||||
// option...
|
||||
#ifndef HAS_SSE_41
|
||||
if(settings.bUseSIMD) {
|
||||
ReportError("Platform does not support SIMD!\n");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
const unsigned int dataSz = img.GetWidth() * img.GetHeight() * 4;
|
||||
|
||||
// Allocate data based on the compression method
|
||||
|
|
Loading…
Reference in a new issue