diff --git a/media-libs/embree/embree-3.12.2.recipe b/media-libs/embree/embree-3.12.2.recipe index c994ca4a6..920309084 100644 --- a/media-libs/embree/embree-3.12.2.recipe +++ b/media-libs/embree/embree-3.12.2.recipe @@ -10,14 +10,14 @@ algorithms that best matches the instruction set of your CPU" HOMEPAGE="https://embree.github.io" COPYRIGHT="2013-2021 Intel Corporation" LICENSE="Apache v2" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/embree/embree/archive/v$portVersion.tar.gz" CHECKSUM_SHA256="22a527622497e07970e733f753cc9c10b2bd82c3b17964e4f71a5fd2cdfca210" SOURCE_FILENAME="embree-v$portVersion.tar.gz" PATCHES="embree-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="!x86" +SECONDARY_ARCHITECTURES="x86" libVersion="$portVersion" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" @@ -69,6 +69,8 @@ BUILD() cmake $cmakeDirArgs \ .. \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DEMBREE_MAX_ISA=DEFAULT \ -DEMBREE_TUTORIALS=OFF \ -DEMBREE_ISPC_SUPPORT=OFF \ -DEMBREE_TASKING_SYSTEM=OFF \ diff --git a/media-libs/embree/patches/embree-3.12.2.patchset b/media-libs/embree/patches/embree-3.12.2.patchset index 3a8d8641d..a2b0300a0 100644 --- a/media-libs/embree/patches/embree-3.12.2.patchset +++ b/media-libs/embree/patches/embree-3.12.2.patchset @@ -1,4 +1,4 @@ -From 022c1e9ca29838bd76ab15ef52d21dcc31b0a1a8 Mon Sep 17 00:00:00 2001 +From ccfdc8cd62590a320089788448db85b39622d65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Sat, 24 Aug 2019 09:32:55 +0200 Subject: Applied patches @@ -53,7 +53,7 @@ index 1bc30fe..930f7d9 100644 /* fallback to 4k pages */ void* ptr = (char*) mmap(0, bytes, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); diff --git a/common/sys/array.h b/common/sys/array.h -index 3da2a14..b470508 100644 +index 3da2a14..13565ea 100644 --- a/common/sys/array.h +++ b/common/sys/array.h @@ -139,7 +139,7 @@ namespace embree @@ -65,6 +65,15 @@ index 3da2a14..b470508 100644 __forceinline Ty& operator[](const size_t i) { assert(i=0 && i - #include diff --git a/kernels/builders/bvh_builder_sah.h b/kernels/builders/bvh_builder_sah.h index fff4bf2..137729b 100644 --- a/kernels/builders/bvh_builder_sah.h @@ -151,17 +136,17 @@ index fff4bf2..137729b 100644 if (RTC_BUILD_ARGUMENTS_HAS(settings,maxLeafSize )) maxLeafSize = settings.maxLeafSize; if (RTC_BUILD_ARGUMENTS_HAS(settings,traversalCost )) travCost = settings.traversalCost; -- -2.30.0 +2.30.2 -From 9467d9162b39f0e0701233f541d1fa0f915a2fc9 Mon Sep 17 00:00:00 2001 +From c4a0e9f41d9f5b98319eda8e498443c2b88287c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Tue, 5 Jan 2021 20:45:01 +0100 Subject: CPU count diff --git a/common/sys/sysinfo.cpp b/common/sys/sysinfo.cpp -index a712fc6..ae2e632 100644 +index ef9cd77..ae2e632 100644 --- a/common/sys/sysinfo.cpp +++ b/common/sys/sysinfo.cpp @@ -10,6 +10,9 @@ @@ -174,7 +159,27 @@ index a712fc6..ae2e632 100644 //////////////////////////////////////////////////////////////////////////////// /// All Platforms -@@ -601,6 +604,10 @@ namespace embree +@@ -45,6 +48,10 @@ namespace embree + return "Unix (32bit)"; + #elif defined(__UNIX__) && defined(__X86_64__) + return "Unix (64bit)"; ++#elif defined(__HAIKU__) && !defined(__X86_64__) ++ return "Haiku (32bit)"; ++#elif defined(__HAIKU__) && defined(__X86_64__) ++ return "Haiku (64bit)"; + #else + return "Unknown"; + #endif +@@ -478,7 +485,7 @@ namespace embree + /// Linux Platform + //////////////////////////////////////////////////////////////////////////////// + +-#if defined(__LINUX__) ++#if defined(__LINUX__) || defined(__HAIKU__) + + #include + #include +@@ -597,6 +604,10 @@ namespace embree #if defined(__MACOSX__) nThreads = sysconf(_SC_NPROCESSORS_ONLN); // does not work in Linux LXC container assert(nThreads); @@ -186,5 +191,28 @@ index a712fc6..ae2e632 100644 cpu_set_t set; if (pthread_getaffinity_np(pthread_self(), sizeof(set), &set) == 0) -- -2.30.0 +2.30.2 + + +From e3f86c3fb531e757357505c0da1f0144df18c5c9 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 12 Jan 2022 16:40:24 +1000 +Subject: Use workaround for Haiku + + +diff --git a/common/simd/vint4_sse2.h b/common/simd/vint4_sse2.h +index 9814d5c..2a50cca 100644 +--- a/common/simd/vint4_sse2.h ++++ b/common/simd/vint4_sse2.h +@@ -452,7 +452,7 @@ namespace embree + __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(__WIN32__) || defined(__HAIKU__)) && !defined(__X86_64__) // win32 workaround + return toScalar(v); + #else + return _mm_cvtsi128_si64(v); +-- +2.30.2