From 6521db8d122cc767b1a723a14999fe61f4e64319 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Wed, 20 Jun 2018 21:30:59 +0200 Subject: community/embree: fix for SSE2 ISA and against 64-bit intrinsics --- community/embree/PKGBUILD | 17 +++++++++++++++++ community/embree/embree-3.2.0-intrinsic.patch | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 community/embree/PKGBUILD create mode 100644 community/embree/embree-3.2.0-intrinsic.patch (limited to 'community') diff --git a/community/embree/PKGBUILD b/community/embree/PKGBUILD new file mode 100644 index 00000000..8d2043c8 --- /dev/null +++ b/community/embree/PKGBUILD @@ -0,0 +1,17 @@ +# avoid breakage in newer CPU ISAs, supporting SSE2 should be enough for +# 32-bit platforms +eval "$( + declare -f build | \ + sed ' + /cmake/s/-DEMBREE_MAX_ISA="AVX512SKX"/-DEMBREE_MAX_ISA="SSE2"/ + ' +)" + +# some 32-bit fixes around intrinsics where applied to WIN32 only, +# applying a counter-patch here +source+=('embree-3.2.0-intrinsic.patch') +sha256sums+=('7d5e44a034b02e14d7d37cd038d8c279d13d66b54a449c09e0687458f117723f') +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i "$srcdir/embree-3.2.0-intrinsic.patch" +} diff --git a/community/embree/embree-3.2.0-intrinsic.patch b/community/embree/embree-3.2.0-intrinsic.patch new file mode 100644 index 00000000..afb49357 --- /dev/null +++ b/community/embree/embree-3.2.0-intrinsic.patch @@ -0,0 +1,12 @@ +diff -rauN embree-3.2.0/common/simd/vint4_sse2.h embree-3.2.0-intrinsic-patch/common/simd/vint4_sse2.h +--- embree-3.2.0/common/simd/vint4_sse2.h 2018-05-15 08:02:58.000000000 +0200 ++++ embree-3.2.0-intrinsic-patch/common/simd/vint4_sse2.h 2018-06-20 20:44:57.322042285 +0200 +@@ -455,7 +455,7 @@ + __forceinline int toScalar(const vint4& v) { return _mm_cvtsi128_si32(v); } + + __forceinline size_t toSizeT(const vint4& v) { +-#if defined(__WIN32__) && !defined(__X86_64__) // win32 workaround ++#if !defined(__X86_64__) // win32 workaround + return toScalar(v); + #else + return _mm_cvtsi128_si64(v); -- cgit v1.2.3-70-g09d2