diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/embree/Makefile | 34 | ||||
-rw-r--r-- | graphics/embree/distinfo | 5 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_math_math.h | 20 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_sys_intrinsics.h | 61 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_sys_sysinfo.cpp | 34 | ||||
-rw-r--r-- | graphics/embree/files/patch-common_sys_thread.cpp | 59 | ||||
-rw-r--r-- | graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp | 15 | ||||
-rw-r--r-- | graphics/embree/pkg-plist | 2 |
8 files changed, 13 insertions, 217 deletions
diff --git a/graphics/embree/Makefile b/graphics/embree/Makefile index 6409366d3575..d949ca09017f 100644 --- a/graphics/embree/Makefile +++ b/graphics/embree/Makefile @@ -3,8 +3,7 @@ PORTNAME= embree DISTVERSIONPREFIX= v -DISTVERSION= 2.10.0 -PORTREVISION= 1 +PORTVERSION= 2.11.0 CATEGORIES= graphics MAINTAINER= danfe@FreeBSD.org @@ -24,40 +23,27 @@ USE_GL= glut USE_XORG= xmu USE_LDCONFIG= yes -CMAKE_ARGS= -DRTCORE_TASKING_SYSTEM:STRING=INTERNAL \ - -DENABLE_ISPC_SUPPORT:BOOL=OFF +CMAKE_ARGS= -DEMBREE_TASKING_SYSTEM:STRING=INTERNAL \ + -DEMBREE_ISPC_SUPPORT:BOOL=OFF CXXFLAGS+= -msse2 # required on i386 DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}2 PLIST_SUB+= VERSION=${DISTVERSION} -OPTIONS_DEFINE= IMAGE_MAGICK JPEG OPENEXR PNG -IMAGE_MAGICK_DESC= BMP, GIF, PNG, TGA, TIFF image formats support +OPTIONS_DEFINE= IMAGEMAGICK JPEG OPENEXR PNG +IMAGEMAGICK_DESC= BMP, GIF, PNG, TGA, TIFF image formats support -IMAGE_MAGICK_LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick -IMAGE_MAGICK_CMAKE_ON= -DUSE_IMAGE_MAGICK:BOOL=ON +IMAGEMAGICK_LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick +IMAGEMAGICK_CMAKE_ON= -DEMBREE_TUTORIALS_IMAGE_MAGICK:BOOL=ON JPEG_USES= jpeg -JPEG_CMAKE_OFF= -DUSE_LIBJPEG:BOOL=OFF +JPEG_CMAKE_OFF= -DEMBREE_TUTORIALS_LIBJPEG:BOOL=OFF OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR -OPENEXR_CMAKE_OFF= -DUSE_OPENEXR:BOOL=OFF +OPENEXR_CMAKE_OFF= -DEMBREE_TUTORIALS_OPENEXR:BOOL=OFF PNG_LIB_DEPENDS= libpng.so:graphics/png -PNG_CMAKE_OFF= -DUSE_LIBPNG:BOOL=OFF - -post-patch: - @${REINPLACE_CMD} -e 's,MAP_HUGETLB,MAP_ALIGNED_SUPER,' \ - ${WRKSRC}/common/sys/alloc.cpp - @${REINPLACE_CMD} -e '/__aligned/s,^,//,' \ - ${WRKSRC}/common/sys/platform.h - @${REINPLACE_CMD} -e 's,MAP_POPULATE,MAP_PREFAULT_READ,' \ - ${WRKSRC}/tests/benchmark.cpp - @${REINPLACE_CMD} -e '/encodeRGB8_to_JPEG/s,size_t \*,unsigned \ - long *,' ${WRKSRC}/tutorials/common/image/image.h \ - ${WRKSRC}/tutorials/common/image/jpeg.cpp - @${REINPLACE_CMD} -e 's,__forceinline,inline __attribute__((always_inline)),' \ - ${WRKSRC}/include/embree2/rtcore_ray.h +PNG_CMAKE_OFF= -DEMBREE_TUTORIALS_LIBPNG:BOOL=OFF .include <bsd.port.mk> diff --git a/graphics/embree/distinfo b/graphics/embree/distinfo index c81342b17881..47a46d8590be 100644 --- a/graphics/embree/distinfo +++ b/graphics/embree/distinfo @@ -1,2 +1,3 @@ -SHA256 (embree-embree-v2.10.0_GH0.tar.gz) = c011dc3c035c9618733a2e256ca24efe54aea937f86069e24ff87b02af2d50e4 -SIZE (embree-embree-v2.10.0_GH0.tar.gz) = 1774006 +TIMESTAMP = 1472729819 +SHA256 (embree-embree-v2.11.0_GH0.tar.gz) = 35283fa82c3f345a05a9d3ff3af5a36cf71d75d19dc9150a681999f301d67832 +SIZE (embree-embree-v2.11.0_GH0.tar.gz) = 1789427 diff --git a/graphics/embree/files/patch-common_math_math.h b/graphics/embree/files/patch-common_math_math.h deleted file mode 100644 index bb1cfc4612b1..000000000000 --- a/graphics/embree/files/patch-common_math_math.h +++ /dev/null @@ -1,20 +0,0 @@ ---- common/math/math.h.orig 2016-05-20 05:45:13 UTC -+++ common/math/math.h -@@ -83,7 +83,7 @@ namespace embree - return _mm_cvtss_f32(c); - } - --#if !defined(__WIN32__) -+#if !defined(__WIN32__) && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION < 3800) - __forceinline float abs ( const float x ) { return ::fabsf(x); } - __forceinline float acos ( const float x ) { return ::acosf (x); } - __forceinline float asin ( const float x ) { return ::asinf (x); } -@@ -179,7 +179,7 @@ namespace embree - } - #endif - --#if defined(__WIN32__) -+#if defined(__WIN32__) || defined(__FreeBSD__) - __forceinline void sincosf(float x, float *s, float *c) { - *s = sinf(x); *c = cosf(x); - } diff --git a/graphics/embree/files/patch-common_sys_intrinsics.h b/graphics/embree/files/patch-common_sys_intrinsics.h deleted file mode 100644 index e15937e2005e..000000000000 --- a/graphics/embree/files/patch-common_sys_intrinsics.h +++ /dev/null @@ -1,61 +0,0 @@ ---- common/sys/intrinsics.h.orig 2016-05-20 05:45:13 UTC -+++ common/sys/intrinsics.h -@@ -268,6 +268,7 @@ namespace embree - #endif - } - -+#if defined(__X86_64__) - __forceinline unsigned __bsf(unsigned v) - { - #if defined(__AVX2__) -@@ -276,6 +277,7 @@ namespace embree - unsigned r = 0; asm ("bsf %1,%0" : "=r"(r) : "r"(v)); return r; - #endif - } -+#endif - - __forceinline size_t __bsf(size_t v) { - #if defined(__AVX2__) -@@ -306,12 +308,14 @@ namespace embree - return i; - } - -+#if defined(__X86_64__) - __forceinline unsigned int __bscf(unsigned int& v) - { - unsigned int i = __bsf(v); - v &= v-1; - return i; - } -+#endif - - __forceinline size_t __bscf(size_t& v) - { -@@ -328,6 +332,7 @@ namespace embree - #endif - } - -+#if defined(__X86_64__) - __forceinline unsigned __bsr(unsigned v) { - #if defined(__AVX2__) - return 31 - _lzcnt_u32(v); -@@ -335,6 +340,7 @@ namespace embree - unsigned r = 0; asm ("bsr %1,%0" : "=r"(r) : "r"(v)); return r; - #endif - } -+#endif - - __forceinline size_t __bsr(size_t v) { - #if defined(__AVX2__) -@@ -363,7 +369,11 @@ namespace embree - #if defined(__INTEL_COMPILER) - return _blsr_u64(v); - #else -+#if defined(__X86_64__) - return __blsr_u64(v); -+#else -+ return __blsr_u32(v); -+#endif - #endif - #else - return v & (v-1); diff --git a/graphics/embree/files/patch-common_sys_sysinfo.cpp b/graphics/embree/files/patch-common_sys_sysinfo.cpp deleted file mode 100644 index 785c6a13e41d..000000000000 --- a/graphics/embree/files/patch-common_sys_sysinfo.cpp +++ /dev/null @@ -1,34 +0,0 @@ ---- common/sys/sysinfo.cpp.orig 2015-09-17 06:11:18 UTC -+++ common/sys/sysinfo.cpp -@@ -414,6 +414,31 @@ namespace embree - #endif - - //////////////////////////////////////////////////////////////////////////////// -+/// FreeBSD Platform -+//////////////////////////////////////////////////////////////////////////////// -+ -+#ifdef __FreeBSD__ -+ -+#include <sys/sysctl.h> -+ -+namespace embree -+{ -+ std::string getExecutableFileName() -+ { -+#if __FreeBSD_version > 900009 -+ const -+#endif -+ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; -+ char buf[1024]; -+ size_t len = sizeof(buf); -+ if (sysctl(mib, 4, buf, &len, 0x0, 0) == -1) *buf = '\0'; -+ return std::string(buf); -+ } -+} -+ -+#endif -+ -+//////////////////////////////////////////////////////////////////////////////// - /// Mac OS X Platform - //////////////////////////////////////////////////////////////////////////////// - diff --git a/graphics/embree/files/patch-common_sys_thread.cpp b/graphics/embree/files/patch-common_sys_thread.cpp deleted file mode 100644 index ef18224f1227..000000000000 --- a/graphics/embree/files/patch-common_sys_thread.cpp +++ /dev/null @@ -1,59 +0,0 @@ ---- common/sys/thread.cpp.orig 2016-05-20 05:45:13 UTC -+++ common/sys/thread.cpp -@@ -239,6 +239,29 @@ namespace embree - #endif - - //////////////////////////////////////////////////////////////////////////////// -+/// FreeBSD Platform -+//////////////////////////////////////////////////////////////////////////////// -+ -+#if defined(__FreeBSD__) -+ -+#include <pthread_np.h> -+ -+namespace embree -+{ -+ /*! set affinity of the calling thread */ -+ void setAffinity(ssize_t affinity) -+ { -+ cpuset_t cset; -+ CPU_ZERO(&cset); -+ CPU_SET(affinity, &cset); -+ -+ if (pthread_setaffinity_np(pthread_self(), sizeof(cset), &cset) != 0) -+ WARNING("pthread_setaffinity_np failed"); // on purpose only a warning -+ } -+} -+#endif -+ -+//////////////////////////////////////////////////////////////////////////////// - /// MacOSX Platform - //////////////////////////////////////////////////////////////////////////////// - -@@ -291,7 +314,8 @@ namespace embree - { - _mm_setcsr(_mm_getcsr() | /*FTZ:*/ (1<<15) | /*DAZ:*/ (1<<6)); - --#if !defined(__LINUX__) -+#if defined(__MACOSX__) -+ /*! Mac OS X does not support setting affinity at thread creation time */ - if (parg->affinity >= 0) - setAffinity(parg->affinity); - #endif -@@ -320,7 +344,15 @@ namespace embree - cpu_set_t cset; - CPU_ZERO(&cset); - CPU_SET(mapThreadID(threadID), &cset); -- if (pthread_setaffinity_np(*tid,sizeof(cpu_set_t),&cset)) -+ if (pthread_setaffinity_np(*tid, sizeof(cset), &cset)) -+ WARNING("pthread_setaffinity_np failed"); // on purpose only a warning -+ } -+#elif defined(__FreeBSD__) -+ if (threadID >= 0) { -+ cpuset_t cset; -+ CPU_ZERO(&cset); -+ CPU_SET(threadID, &cset); -+ if (pthread_setaffinity_np(*tid, sizeof(cset), &cset)) - WARNING("pthread_setaffinity_np failed"); // on purpose only a warning - } - #endif diff --git a/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp b/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp deleted file mode 100644 index c6709409e5cc..000000000000 --- a/graphics/embree/files/patch-kernels_xeon_bvh_bvh__rotate.cpp +++ /dev/null @@ -1,15 +0,0 @@ ---- kernels/xeon/bvh/bvh_rotate.cpp.orig 2016-05-20 05:45:13 UTC -+++ kernels/xeon/bvh/bvh_rotate.cpp -@@ -104,7 +104,11 @@ namespace embree - /*! find best other child */ - vfloat4 area0123 = vfloat4(extract<0>(min0),extract<0>(min1),extract<0>(min2),extract<0>(min3)) - vfloat4(childArea[c2]); - int pos[4] = { pos0,pos1,pos2,pos3 }; -- vbool4 valid = vint4(int(depth+1))+cdepth <= vint4(BVH4::maxBuildDepth); // only select swaps that fulfill depth constraints -+ // Ensure that we have a variable to avoid linking problems on i386. -+ // On amd64 sizeof(size_t) == 8, so previously temporary was created -+ // for the vint4(BVH4::maxBuildDepth) call. -+ const size_t mbd = BVH4::maxBuildDepth; -+ vbool4 valid = vint4(int(depth+1))+cdepth <= vint4(mbd); // only select swaps that fulfill depth constraints - valid &= vint4(c2) != vint4(step); - if (none(valid)) continue; - size_t c1 = select_min(valid,area0123); diff --git a/graphics/embree/pkg-plist b/graphics/embree/pkg-plist index b20249c5a469..76cbdb382c17 100644 --- a/graphics/embree/pkg-plist +++ b/graphics/embree/pkg-plist @@ -1,4 +1,3 @@ -bin/embree2/benchmark bin/embree2/bvh_access bin/embree2/bvh_builder bin/embree2/convert @@ -29,7 +28,6 @@ bin/embree2/models/subdiv8.xml bin/embree2/models/subdiv9.xml bin/embree2/motion_blur_geometry bin/embree2/pathtracer -bin/embree2/retrace bin/embree2/subdivision_geometry bin/embree2/triangle_geometry bin/embree2/user_geometry |