mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
ALL: Add Cpu prefix to SIMD extension features
This commit is contained in:
parent
f5dfa6b8d1
commit
787837ca41
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user