external/skia: Adapt to recent LLVM 22 trunk change
...<https://github.com/llvm/llvm-project/commit/f8653cecd11ede482a175a5c4d6fa147812562dd> "[Clang][X86] Replace F16C `vcvtph2ps/256` intrinsics with `(convert|shuffle)vector` builtins (#152911)"; see <https://issues.skia.org/u/1/issues/438918298> "__builtin_ia32_vcvtph2ps256 gone from Clang 22 trunk" and <https://skia.googlesource.com/skcms/+/135488419331644e59091ecc73e682299d3937a4> "Change use of removed intrinsic", which needed to be slightly modified with s/_Float16/__fp16/ to avoid "error: _Float16 is not supported on this target" with Clang 12.0.1 on Linux (<https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/188331/>), but which would then cause "error: ‘__fp16’ does not name a type" with GCC 12.2.1 on Linux (<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/194504/>) Change-Id: I4e848b9caf2cda14e416711624db42450da60e82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189730 Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com> Tested-by: Jenkins
This commit is contained in:
+1
@@ -42,6 +42,7 @@ skia_patches := \
|
||||
0002-loong64-Honor-existing-LASX-LSX-settings.patch \
|
||||
0003-loong64-Fix-missing-rounding-in-loong64-scaled_mult-.patch \
|
||||
0004-loong64-Fix-the-remaining-implicit-vector-casts.patch \
|
||||
modified-skcms-0001-Change-use-of-removed-intrinsic.patch \
|
||||
|
||||
ifneq ($(MSYSTEM),)
|
||||
# use binary flag so patch from git-bash won't choke on mixed line-endings in patches
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 135488419331644e59091ecc73e682299d3937a4 Mon Sep 17 00:00:00 2001
|
||||
From: Devon Loehr <dloehr@google.com>
|
||||
Date: Fri, 15 Aug 2025 14:31:27 +0000
|
||||
Subject: Change use of removed intrinsic
|
||||
|
||||
A recent LLVM change removed the __builtin_ia32_vcvtph2ps256 intrinsic
|
||||
because it can be implemented using __builtin_shufflevector and/or
|
||||
__builtin_convertvector. This CL changes skia to use convertvector as
|
||||
to match.
|
||||
|
||||
Bug: chromium:438445382
|
||||
Change-Id: I2ed16cd507d7feeafba4c082b3840cbdd6368dd9
|
||||
Reviewed-on: https://skia-review.googlesource.com/c/skcms/+/1038217
|
||||
Reviewed-by: Ben Wagner <bungeman@google.com>
|
||||
Commit-Queue: Ben Wagner <bungeman@google.com>
|
||||
Auto-Submit: Devon Loehr <dloehr@google.com>
|
||||
---
|
||||
src/Transform_inl.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/Transform_inl.h b/src/Transform_inl.h
|
||||
index bc10e7d..99faf25 100644
|
||||
--- a/modules/skcms/src/Transform_inl.h
|
||||
+++ b/modules/skcms/src/Transform_inl.h
|
||||
@@ -156,8 +156,12 @@ SI F F_from_Half(U16 half) {
|
||||
#elif defined(USING_AVX512F)
|
||||
return (F)_mm512_cvtph_ps((__m256i)half);
|
||||
#elif defined(USING_AVX_F16C)
|
||||
- typedef int16_t __attribute__((vector_size(16))) I16;
|
||||
- return __builtin_ia32_vcvtph2ps256((I16)half);
|
||||
+#if defined __clang__
|
||||
+ typedef __fp16 __attribute__((vector_size(16))) F16;
|
||||
+#else
|
||||
+ typedef _Float16 __attribute__((vector_size(16))) F16;
|
||||
+#endif
|
||||
+ return __builtin_convertvector((F16)half, F);
|
||||
#else
|
||||
U32 wide = cast<U32>(half);
|
||||
// A half is 1-5-10 sign-exponent-mantissa, with 15 exponent bias.
|
||||
--
|
||||
2.50.1
|
||||
|
||||
Reference in New Issue
Block a user