Revert "add CPU feature detection for iOS / ARM Mac"
This reverts commit 51c01588f3
.
Reason for revert: doesn't work on iOS, not needed on Mac.
Original change's description:
> add CPU feature detection for iOS / ARM Mac
>
> My reference was mostly `man 3 sysctl`.
>
> I'm pretty sure 'neon_fp16' is the right bit for FP16 NEON compute and
> 'neon_hpfp' just mean's its got f32<->f16 instructions, but I could be
> mixed up. It'll become extremely obvious once I start using that bit.
>
> Bug: skia:11001
> Change-Id: I8bb73aef71b750b766aa1d0e29878fd7a8e8d6da
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/339837
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,herb@google.com,brianosman@google.com
Change-Id: Ie93605514fd806a1c708f71c52e7d80a4ef34131
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11001
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340176
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
387826f6f6
commit
0861331ff7
@ -115,24 +115,6 @@
|
||||
return features;
|
||||
}
|
||||
|
||||
#elif defined(SK_CPU_ARM64) && __has_include(<sys/sysctl.h>)
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
static uint32_t read_cpu_features() {
|
||||
auto has_feature = [](const char* name) {
|
||||
int32_t feature = 0;
|
||||
size_t size = sizeof(feature);
|
||||
return 0 == sysctlbyname(name, &feature,&size, nullptr,0)
|
||||
&& size == sizeof(feature)
|
||||
&& feature;
|
||||
};
|
||||
uint32_t features = 0;
|
||||
if (has_feature("hw.optional.armv8_crc32")) { features |= SkCpu::CRC32; }
|
||||
if (has_feature("hw.optional.neon_fp16" )) { features |= SkCpu::ASIMDHP; }
|
||||
return features;
|
||||
}
|
||||
|
||||
|
||||
#elif defined(SK_CPU_ARM32) && __has_include(<sys/auxv.h>) && \
|
||||
(!defined(__ANDROID_API__) || __ANDROID_API__ >= 18)
|
||||
// sys/auxv.h will always be present in the Android NDK due to unified
|
||||
|
Loading…
Reference in New Issue
Block a user