Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/core/SkOpts.cpp

Issue 1884683002: SkFloatConvert (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkOpts.cpp
diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp
index 50659d4590fa95948b02cd1fea2e16afbe274528..950c987dd444807bbbf5f6e3cdd7a0dd6d75d2d4 100644
--- a/src/core/SkOpts.cpp
+++ b/src/core/SkOpts.cpp
@@ -64,6 +64,8 @@ namespace SK_OPTS_NS {
namespace SkOpts {
+ bool has_f16c = false;
+
// Define default function pointer values here...
// If our global compile options are set high enough, these defaults might even be
// CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defaults.
@@ -128,6 +130,10 @@ namespace SkOpts {
(xgetbv(0) & 6 ) == 6 ){ // and check the OS supports XSAVE.
Init_avx();
+ if (abcd[2] & (1<<29)) {
+ has_f16c = true;
+ }
+
// AVX2 additionally needs bit 5 set on ebx after calling cpuid(7).
uint32_t abcd7[] = {0,0,0,0};
cpuid7(abcd7);
« src/core/SkOpts.h ('K') | « src/core/SkOpts.h ('k') | src/core/SkXfermodeU64.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698