Date: Sunday, August 7, 2016 @ 16:07:55 Author: stativ Revision: 185893
upgpkg: embree 2.10.0-1 update to 2.10.0 Added: embree/trunk/rtcore_ray_forceinline.diff Modified: embree/trunk/PKGBUILD -----------------------------+ PKGBUILD | 14 +++- rtcore_ray_forceinline.diff | 119 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-08-07 16:07:26 UTC (rev 185892) +++ PKGBUILD 2016-08-07 16:07:55 UTC (rev 185893) @@ -1,7 +1,7 @@ # $Id$ # Maintainer: Lukas Jirkovsky <[email protected]> pkgname=embree -pkgver=2.9.0 +pkgver=2.10.0 pkgrel=1 pkgdesc="A collection of high-performance ray tracing kernels" arch=('x86_64') @@ -9,9 +9,17 @@ license=('Apache') depends=('intel-tbb') makedepends=('cmake' 'ispc' 'openexr') -source=("$pkgname-${pkgver}.tar.gz::http://github.com/embree/embree/archive/v${pkgver}.tar.gz") -md5sums=('1c6128b2d96b263721e514eb8f5ca0fc') +source=("$pkgname-${pkgver}.tar.gz::http://github.com/embree/embree/archive/v${pkgver}.tar.gz" + "rtcore_ray_forceinline.diff") +md5sums=('a130a5a36d0ad2c93f1ecfef7dea208f' + '2ad75c38bdf4b035d01ba4c6cec53ec2') +prepare() { + cd "$srcdir/$pkgname-$pkgver" + # see https://github.com/embree/embree/issues/88 + patch -Np1 < "$srcdir/rtcore_ray_forceinline.diff" +} + build() { cd "$srcdir/$pkgname-$pkgver" Added: rtcore_ray_forceinline.diff =================================================================== --- rtcore_ray_forceinline.diff (rev 0) +++ rtcore_ray_forceinline.diff 2016-08-07 16:07:55 UTC (rev 185893) @@ -0,0 +1,119 @@ +diff --git a/include/embree2/rtcore.h b/include/embree2/rtcore.h +index 77622ec..f8e2088 100644 +--- a/include/embree2/rtcore.h ++++ b/include/embree2/rtcore.h +@@ -50,6 +50,12 @@ typedef int ssize_t; + #define RTCORE_DEPRECATED + #endif + ++#if defined(_WIN32) ++# define RTCORE_FORCEINLINE __forceinline ++#else ++# define RTCORE_FORCEINLINE inline __attribute__((always_inline)) ++#endif ++ + /*! Embree API version */ + #define RTCORE_VERSION_MAJOR @EMBREE_VERSION_MAJOR@ + #define RTCORE_VERSION_MINOR @EMBREE_VERSION_MINOR@ +diff --git a/include/embree2/rtcore_ray.h b/include/embree2/rtcore_ray.h +index e55afdc..6fb60a5 100644 +--- a/include/embree2/rtcore_ray.h ++++ b/include/embree2/rtcore_ray.h +@@ -17,6 +17,8 @@ + #ifndef __RTCORE_RAY_H__ + #define __RTCORE_RAY_H__ + ++#include "rtcore.h" ++ + /*! \ingroup embree_kernel_api */ + /*! \{ */ + +@@ -165,30 +167,30 @@ struct RTCORE_ALIGN(64) RTCRay16 + #ifndef __RTCRayN__ + #define __RTCRayN__ + struct RTCRayN {}; +-__forceinline float& RTCRayN_org_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[0*N+0*N1+i]; } //!< x coordinate of ray origin +-__forceinline float& RTCRayN_org_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[1*N+0*N1+i]; } //!< y coordinate of ray origin +-__forceinline float& RTCRayN_org_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[2*N+0*N1+i]; }; //!< z coordinate of ray origin ++RTCORE_FORCEINLINE float& RTCRayN_org_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[0*N+0*N1+i]; } //!< x coordinate of ray origin ++RTCORE_FORCEINLINE float& RTCRayN_org_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[1*N+0*N1+i]; } //!< y coordinate of ray origin ++RTCORE_FORCEINLINE float& RTCRayN_org_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[2*N+0*N1+i]; }; //!< z coordinate of ray origin + +-__forceinline float& RTCRayN_dir_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[3*N+1*N1+i]; }; //!< x coordinate of ray direction +-__forceinline float& RTCRayN_dir_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[4*N+1*N1+i]; }; //!< y coordinate of ray direction +-__forceinline float& RTCRayN_dir_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[5*N+1*N1+i]; }; //!< z coordinate of ray direction ++RTCORE_FORCEINLINE float& RTCRayN_dir_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[3*N+1*N1+i]; }; //!< x coordinate of ray direction ++RTCORE_FORCEINLINE float& RTCRayN_dir_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[4*N+1*N1+i]; }; //!< y coordinate of ray direction ++RTCORE_FORCEINLINE float& RTCRayN_dir_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[5*N+1*N1+i]; }; //!< z coordinate of ray direction + +-__forceinline float& RTCRayN_tnear(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[6*N+2*N1+i]; }; //!< Start of ray segment +-__forceinline float& RTCRayN_tfar (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[7*N+2*N1+i]; }; //!< End of ray segment (set to hit distance) ++RTCORE_FORCEINLINE float& RTCRayN_tnear(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[6*N+2*N1+i]; }; //!< Start of ray segment ++RTCORE_FORCEINLINE float& RTCRayN_tfar (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[7*N+2*N1+i]; }; //!< End of ray segment (set to hit distance) + +-__forceinline float& RTCRayN_time(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*) ptr)[8*N+2*N1+i]; }; //!< Time of this ray for motion blur +-__forceinline unsigned& RTCRayN_mask(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[9*N+2*N1+i]; }; //!< Used to mask out objects during traversal ++RTCORE_FORCEINLINE float& RTCRayN_time(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*) ptr)[8*N+2*N1+i]; }; //!< Time of this ray for motion blur ++RTCORE_FORCEINLINE unsigned& RTCRayN_mask(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[9*N+2*N1+i]; }; //!< Used to mask out objects during traversal + +-__forceinline float& RTCRayN_Ng_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[10*N+2*N1+i]; }; //!< x coordinate of geometry normal +-__forceinline float& RTCRayN_Ng_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[11*N+2*N1+i]; }; //!< y coordinate of geometry normal +-__forceinline float& RTCRayN_Ng_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[12*N+2*N1+i]; }; //!< z coordinate of geometry normal ++RTCORE_FORCEINLINE float& RTCRayN_Ng_x(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[10*N+2*N1+i]; }; //!< x coordinate of geometry normal ++RTCORE_FORCEINLINE float& RTCRayN_Ng_y(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[11*N+2*N1+i]; }; //!< y coordinate of geometry normal ++RTCORE_FORCEINLINE float& RTCRayN_Ng_z(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[12*N+2*N1+i]; }; //!< z coordinate of geometry normal + +-__forceinline float& RTCRayN_u (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[13*N+3*N1+i]; }; //!< Barycentric u coordinate of hit +-__forceinline float& RTCRayN_v (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[14*N+3*N1+i]; }; //!< Barycentric v coordinate of hit ++RTCORE_FORCEINLINE float& RTCRayN_u (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[13*N+3*N1+i]; }; //!< Barycentric u coordinate of hit ++RTCORE_FORCEINLINE float& RTCRayN_v (RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((float*)ptr)[14*N+3*N1+i]; }; //!< Barycentric v coordinate of hit + +-__forceinline unsigned& RTCRayN_geomID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[15*N+3*N1+i]; }; //!< geometry ID +-__forceinline unsigned& RTCRayN_primID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[16*N+3*N1+i]; }; //!< primitive ID +-__forceinline unsigned& RTCRayN_instID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[17*N+3*N1+i]; }; //!< instance ID ++RTCORE_FORCEINLINE unsigned& RTCRayN_geomID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[15*N+3*N1+i]; }; //!< geometry ID ++RTCORE_FORCEINLINE unsigned& RTCRayN_primID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[16*N+3*N1+i]; }; //!< primitive ID ++RTCORE_FORCEINLINE unsigned& RTCRayN_instID(RTCRayN* ptr, size_t N, size_t i) { const size_t N1 = (size_t)(N == 1); return ((unsigned*)ptr)[17*N+3*N1+i]; }; //!< instance ID + #endif + + /* Helper structure to create a ray packet of compile time size N */ +@@ -270,17 +272,17 @@ struct RTCRayNp + #ifndef __RTCHitN__ + #define __RTCHitN__ + struct RTCHitN {}; +-__forceinline float& RTCHitN_Ng_x(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[0*N+i]; }; //!< x coordinate of geometry normal +-__forceinline float& RTCHitN_Ng_y(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[1*N+i]; }; //!< y coordinate of geometry normal +-__forceinline float& RTCHitN_Ng_z(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[2*N+i]; }; //!< z coordinate of geometry normal ++RTCORE_FORCEINLINE float& RTCHitN_Ng_x(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[0*N+i]; }; //!< x coordinate of geometry normal ++RTCORE_FORCEINLINE float& RTCHitN_Ng_y(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[1*N+i]; }; //!< y coordinate of geometry normal ++RTCORE_FORCEINLINE float& RTCHitN_Ng_z(const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[2*N+i]; }; //!< z coordinate of geometry normal + +-__forceinline unsigned& RTCHitN_instID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[3*N+i]; }; //!< instance ID +-__forceinline unsigned& RTCHitN_geomID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[4*N+i]; }; //!< geometry ID +-__forceinline unsigned& RTCHitN_primID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[5*N+i]; }; //!< primitive ID ++RTCORE_FORCEINLINE unsigned& RTCHitN_instID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[3*N+i]; }; //!< instance ID ++RTCORE_FORCEINLINE unsigned& RTCHitN_geomID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[4*N+i]; }; //!< geometry ID ++RTCORE_FORCEINLINE unsigned& RTCHitN_primID(const RTCHitN* ptr, size_t N, size_t i) { return ((unsigned*)ptr)[5*N+i]; }; //!< primitive ID + +-__forceinline float& RTCHitN_u (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[6*N+i]; }; //!< Barycentric u coordinate of hit +-__forceinline float& RTCHitN_v (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[7*N+i]; }; //!< Barycentric v coordinate of hit +-__forceinline float& RTCHitN_t (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[8*N+i]; }; //!< hit distance ++RTCORE_FORCEINLINE float& RTCHitN_u (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[6*N+i]; }; //!< Barycentric u coordinate of hit ++RTCORE_FORCEINLINE float& RTCHitN_v (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[7*N+i]; }; //!< Barycentric v coordinate of hit ++RTCORE_FORCEINLINE float& RTCHitN_t (const RTCHitN* ptr, size_t N, size_t i) { return ((float*)ptr)[8*N+i]; }; //!< hit distance + #endif + + /* Helper structure to create a hit packet of compile time size N */ +diff --git a/include/embree2/rtcore_ray.isph b/include/embree2/rtcore_ray.isph +index d4303e1..3900e5b 100644 +--- a/include/embree2/rtcore_ray.isph ++++ b/include/embree2/rtcore_ray.isph +@@ -17,6 +17,8 @@ + #ifndef __RTCORE_RAY_ISPH__ + #define __RTCORE_RAY_ISPH__ + ++#include "rtcore.isph" ++ + /*! \ingroup embree_kernel_api_ispc */ + /*! \{ */ +
