ALL: Add Cpu prefix to SIMD extension features

This commit is contained in:
Wyatt Radkiewicz 2023-08-07 16:26:41 -07:00 committed by Eugene Sandulenko
parent f5dfa6b8d1
commit 787837ca41
4 changed files with 12 additions and 12 deletions

View File

@ -103,9 +103,9 @@ void BaseBackend::initBackend() {
}
bool BaseBackend::hasFeature(Feature f) {
if (f == kFeatureSSE2) return _cpuFeatures & kCpuFeatureSSE2;
if (f == kFeatureAVX2) return _cpuFeatures & kCpuFeatureAVX2;
if (f == kFeatureNEON) return _cpuFeatures & kCpuFeatureNEON;
if (f == kFeatureCpuSSE2) return _cpuFeatures & kCpuFeatureSSE2;
if (f == kFeatureCpuAVX2) return _cpuFeatures & kCpuFeatureAVX2;
if (f == kFeatureCpuNEON) return _cpuFeatures & kCpuFeatureNEON;
return false;
}

View File

@ -645,7 +645,7 @@ bool OSystem_Android::hasFeature(Feature f) {
if (f == kFeatureOpenGLForGame) return true;
/* GLES2 always supports shaders */
if (f == kFeatureShadersForGame) return true;
if (f == kFeatureNEON) return _neonSupport;
if (f == kFeatureCpuNEON) return _neonSupport;
return ModularGraphicsBackend::hasFeature(f);
}

View File

@ -584,28 +584,28 @@ public:
* Arm-v8 requires NEON extensions, but before that, NEON was just
* optional, so this signifies that the processor can use NEON.
*/
kFeatureNEON,
kFeatureCpuNEON,
/**
* For x86/x86_64 platforms that have SSE2 support
*/
kFeatureSSE2,
kFeatureCpuSSE2,
/**
* For x86/x86_64 platforms that have SSE4.1 support
*/
kFeatureSSE41,
kFeatureCpuSSE41,
/**
* For x86_64 platforms that have AVX2 support
*/
kFeatureAVX2,
kFeatureCpuAVX2,
/**
* For PowerPC platforms that have the altivec standard as of 1999.
* Covers a wide range of platforms, Apple Macs, XBox 360, PS3, and more
*/
kFeatureAltivec,
kFeatureCpuAltivec,
};
/**

View File

@ -532,13 +532,13 @@ void BlendBlit::blit(byte *dst, const byte *src,
// Get the correct blit function
blitFunc = blitGeneric;
#ifdef SCUMMVM_NEON
if (g_system->hasFeature(OSystem::kFeatureNEON)) blitFunc = blitNEON;
if (g_system->hasFeature(OSystem::kFeatureCpuNEON)) blitFunc = blitNEON;
#endif
#ifdef SCUMMVM_SSE2
if (g_system->hasFeature(OSystem::kFeatureSSE2)) blitFunc = blitSSE2;
if (g_system->hasFeature(OSystem::kFeatureCpuSSE2)) blitFunc = blitSSE2;
#endif
#ifdef SCUMMVM_AVX2
if (g_system->hasFeature(OSystem::kFeatureAVX2)) blitFunc = blitAVX2;
if (g_system->hasFeature(OSystem::kFeatureCpuAVX2)) blitFunc = blitAVX2;
#endif
}