From 3d7f1555865a981b7144becfc58d3f3f34362f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 9 Mar 2022 21:15:53 +0100 Subject: Remove unused Bullet module and thirdparty code It has been disabled in `master` since one year (#45852) and our plan is for Bullet, and possibly other thirdparty physics engines, to be implemented via GDExtension so that they can be selected by the users who need them. --- thirdparty/bullet/LinearMath/btCpuFeatureUtility.h | 88 ---------------------- 1 file changed, 88 deletions(-) delete mode 100644 thirdparty/bullet/LinearMath/btCpuFeatureUtility.h (limited to 'thirdparty/bullet/LinearMath/btCpuFeatureUtility.h') diff --git a/thirdparty/bullet/LinearMath/btCpuFeatureUtility.h b/thirdparty/bullet/LinearMath/btCpuFeatureUtility.h deleted file mode 100644 index 5e4b9a313c..0000000000 --- a/thirdparty/bullet/LinearMath/btCpuFeatureUtility.h +++ /dev/null @@ -1,88 +0,0 @@ - -#ifndef BT_CPU_UTILITY_H -#define BT_CPU_UTILITY_H - -#include "LinearMath/btScalar.h" - -#include //memset -#ifdef USE_SIMD -#include -#ifdef BT_ALLOW_SSE4 -#include -#endif //BT_ALLOW_SSE4 -#endif //USE_SIMD - -#if defined BT_USE_NEON -#define ARM_NEON_GCC_COMPATIBILITY 1 -#include -#include -#include //for sysctlbyname -#endif //BT_USE_NEON - -///Rudimentary btCpuFeatureUtility for CPU features: only report the features that Bullet actually uses (SSE4/FMA3, NEON_HPFP) -///We assume SSE2 in case BT_USE_SSE2 is defined in LinearMath/btScalar.h -class btCpuFeatureUtility -{ -public: - enum btCpuFeature - { - CPU_FEATURE_FMA3 = 1, - CPU_FEATURE_SSE4_1 = 2, - CPU_FEATURE_NEON_HPFP = 4 - }; - - static int getCpuFeatures() - { - static int capabilities = 0; - static bool testedCapabilities = false; - if (0 != testedCapabilities) - { - return capabilities; - } - -#ifdef BT_USE_NEON - { - uint32_t hasFeature = 0; - size_t featureSize = sizeof(hasFeature); - int err = sysctlbyname("hw.optional.neon_hpfp", &hasFeature, &featureSize, NULL, 0); - if (0 == err && hasFeature) - capabilities |= CPU_FEATURE_NEON_HPFP; - } -#endif //BT_USE_NEON - -#ifdef BT_ALLOW_SSE4 - { - int cpuInfo[4]; - memset(cpuInfo, 0, sizeof(cpuInfo)); - unsigned long long sseExt = 0; - __cpuid(cpuInfo, 1); - - bool osUsesXSAVE_XRSTORE = cpuInfo[2] & (1 << 27) || false; - bool cpuAVXSuport = cpuInfo[2] & (1 << 28) || false; - - if (osUsesXSAVE_XRSTORE && cpuAVXSuport) - { - sseExt = _xgetbv(0); - } - const int OSXSAVEFlag = (1UL << 27); - const int AVXFlag = ((1UL << 28) | OSXSAVEFlag); - const int FMAFlag = ((1UL << 12) | AVXFlag | OSXSAVEFlag); - if ((cpuInfo[2] & FMAFlag) == FMAFlag && (sseExt & 6) == 6) - { - capabilities |= btCpuFeatureUtility::CPU_FEATURE_FMA3; - } - - const int SSE41Flag = (1 << 19); - if (cpuInfo[2] & SSE41Flag) - { - capabilities |= btCpuFeatureUtility::CPU_FEATURE_SSE4_1; - } - } -#endif //BT_ALLOW_SSE4 - - testedCapabilities = true; - return capabilities; - } -}; - -#endif //BT_CPU_UTILITY_H -- cgit v1.2.3