diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/skia/Library_skia.mk | 3 | ||||
-rw-r--r-- | external/skia/UnpackedTarball_skia.mk | 2 | ||||
-rw-r--r-- | external/skia/fix-sse.patch.1 | 23 | ||||
-rw-r--r-- | external/skia/msvc-vectorcall-sse.patch.1 | 25 |
4 files changed, 26 insertions, 27 deletions
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 747556f2b0e6..bc653786bf4b 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -13,7 +13,8 @@ $(eval $(call gb_Library_set_warnings_disabled,skia)) $(eval $(call gb_Library_use_unpacked,skia,skia)) -$(eval $(call gb_Library_set_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) +$(eval $(call gb_Library_use_clang,skia)) +$(eval $(call gb_Library_set_clang_precompiled_header,skia,external/skia/inc/pch/precompiled_skia)) $(eval $(call gb_Library_add_defs,skia,\ -DSKIA_IMPLEMENTATION=1 \ diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index 82fdbc433ece..e0841e432daa 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -23,7 +23,7 @@ skia_patches := \ Wdeprecated-copy-dtor.patch.0 \ fix-msvc.patch.1 \ fix-gcc-x86.patch.1 \ - msvc-vectorcall-sse.patch.1 \ + fix-sse.patch.1 \ clang11-flax-vector-conversion.patch.0 \ clang-attributes-warning.patch.1 \ fontconfig-get-typeface.patch.0 \ diff --git a/external/skia/fix-sse.patch.1 b/external/skia/fix-sse.patch.1 new file mode 100644 index 000000000000..8a731725e488 --- /dev/null +++ b/external/skia/fix-sse.patch.1 @@ -0,0 +1,23 @@ +--- a/src/opts/SkRasterPipeline_opts.h ++++ b/src/opts/SkRasterPipeline_opts.h +@@ -1047,7 +1047,7 @@ static const size_t N = sizeof(F) / sizeof(float); + // TODO: crashes during compilation :( + #define ABI __attribute__((sysv_abi)) + #define JUMPER_NARROW_STAGES 0 +-#elif defined(_MSC_VER) ++#elif defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 + // Even if not vectorized, this lets us pass {r,g,b,a} as registers, + // instead of {b,a} on the stack. Narrow stages work best for __vectorcall. + #define ABI __vectorcall +--- a/include/private/SkVx.h ++++ b/include/private/SkVx.h +@@ -515,9 +515,6 @@ static inline Vec<N,uint8_t> approx_scale(const Vec<N,uint8_t>& x, const Vec<N,u + static inline Vec<4,float> rcp(const Vec<4,float>& x) { + return bit_pun<Vec<4,float>>(_mm_rcp_ps(bit_pun<__m128>(x))); + } +- static inline Vec<4,int> lrint(const Vec<4,float>& x) { +- return bit_pun<Vec<4,int>>(_mm_cvtps_epi32(bit_pun<__m128>(x))); +- } + + static inline Vec<2,float> sqrt(const Vec<2,float>& x) { + return shuffle<0,1>( sqrt(shuffle<0,1,0,1>(x))); diff --git a/external/skia/msvc-vectorcall-sse.patch.1 b/external/skia/msvc-vectorcall-sse.patch.1 deleted file mode 100644 index f06dca41cff3..000000000000 --- a/external/skia/msvc-vectorcall-sse.patch.1 +++ /dev/null @@ -1,25 +0,0 @@ -From 9a75d6249ed5c5eff36d70db2a9b87000437fc09 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@centrum.cz> -Date: Mon, 13 Jan 2020 14:34:12 +0100 -Subject: [PATCH] MSVC's __vectorcall does not work with /arch:SSE - ---- - src/opts/SkRasterPipeline_opts.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h -index 692530828f..7f2b473d82 100644 ---- a/src/opts/SkRasterPipeline_opts.h -+++ b/src/opts/SkRasterPipeline_opts.h -@@ -1047,7 +1047,7 @@ static const size_t N = sizeof(F) / sizeof(float); - // TODO: crashes during compilation :( - #define ABI __attribute__((sysv_abi)) - #define JUMPER_NARROW_STAGES 0 --#elif defined(_MSC_VER) -+#elif defined(_MSC_VER) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 - // Even if not vectorized, this lets us pass {r,g,b,a} as registers, - // instead of {b,a} on the stack. Narrow stages work best for __vectorcall. - #define ABI __vectorcall --- -2.16.4 - |