Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
176bfdb946 | ||
|
|
11aca996e1 | ||
|
|
31731871a9 | ||
|
|
168ffa73dd | ||
|
|
32fa64e9a2 | ||
|
|
f78f2cd120 | ||
|
|
377ce1a73a | ||
|
|
e83382298f | ||
|
|
94f60977af | ||
|
|
babf39b7aa | ||
|
|
57bd59dc28 | ||
|
|
3fca1c8b0e | ||
|
|
0a33cd4efd | ||
|
|
934a788904 | ||
|
|
fcbdf722f1 | ||
|
|
61f149c36b | ||
|
|
0f3856f1a6 |
@@ -16,7 +16,7 @@
|
||||
|
||||
FIND_PATH(COI_INCLUDE_PATH source/COIProcess_source.h /opt/intel/mic/coi/include /usr/include/intel-coi)
|
||||
FIND_PATH(COI_HOST_LIBRARY_DIR libcoi_host.so /opt/intel/mic/coi/host-linux-release/lib/)
|
||||
FIND_PATH(COI_DEV_LIBRARY_DIR libcoi_device.so /opt/intel/mic/coi/device-linux-release/lib/ /opt/mpss/3.1/sysroots/k1om-mpss-linux/usr/lib64/ /opt/mpss/3.1.2/sysroots/k1om-mpss-linux/usr/lib64/ )
|
||||
FIND_PATH(COI_DEV_LIBRARY_DIR libcoi_device.so /opt/intel/mic/coi/device-linux-release/lib/ /opt/mpss/3.1/sysroots/k1om-mpss-linux/usr/lib64/ /opt/mpss/3.1.4/sysroots/k1om-mpss-linux/usr/lib64/ /opt/mpss/3.2/sysroots/k1om-mpss-linux/usr/lib64/ /opt/mpss/3.2.1/sysroots/k1om-mpss-linux/usr/lib64/)
|
||||
|
||||
IF (COI_INCLUDE_PATH AND COI_HOST_LIBRARY_DIR AND COI_DEV_LIBRARY_DIR)
|
||||
SET(COI_FOUND TRUE)
|
||||
|
||||
+4
-2
@@ -166,8 +166,9 @@ namespace embree
|
||||
|
||||
/*! bit reverse operation */
|
||||
template<class T>
|
||||
__forceinline T bitReverse(T v)
|
||||
__forceinline T bitReverse(const T& vin)
|
||||
{
|
||||
T v = vin;
|
||||
v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1);
|
||||
v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2);
|
||||
v = ((v >> 4) & 0x0F0F0F0F) | ((v & 0x0F0F0F0F) << 4);
|
||||
@@ -178,8 +179,9 @@ namespace embree
|
||||
|
||||
/*! bit interleave operation */
|
||||
template<class T>
|
||||
__forceinline T bitInterleave(T x, T y, T z)
|
||||
__forceinline T bitInterleave(const T& xin, const T& yin, const T& zin)
|
||||
{
|
||||
T x = xin, y = yin, z = zin;
|
||||
x = (x | (x << 16)) & 0x030000FF;
|
||||
x = (x | (x << 8)) & 0x0300F00F;
|
||||
x = (x | (x << 4)) & 0x030C30C3;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace embree
|
||||
/// SSE Vec3ba Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __align(16) Vec3ba
|
||||
struct __aligned(16) Vec3ba
|
||||
{
|
||||
union {
|
||||
__m128 m128;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace embree
|
||||
/// SSE Vec3fa Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __align(16) Vec3fa
|
||||
struct __aligned(16) Vec3fa
|
||||
{
|
||||
typedef float Scalar;
|
||||
enum { N = 3 };
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace embree
|
||||
struct Vec3fa_t;
|
||||
|
||||
/* 3 aligned floats as memory representation */
|
||||
struct __align(16) Vec3fa
|
||||
struct __aligned(16) Vec3fa
|
||||
{
|
||||
typedef float Scalar;
|
||||
enum { N = 3 };
|
||||
@@ -65,7 +65,7 @@ namespace embree
|
||||
};
|
||||
|
||||
/*! 3-wide vectors emulated with 16-wide vectors. */
|
||||
struct __align(64) Vec3fa_t
|
||||
struct __aligned(64) Vec3fa_t
|
||||
{
|
||||
__m512 m512;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace embree
|
||||
/// SSE Vec3ia Type
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct __align(16) Vec3ia
|
||||
struct __aligned(16) Vec3ia
|
||||
{
|
||||
union {
|
||||
__m128i m128;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace embree
|
||||
struct Vec3fa_t;
|
||||
|
||||
/* 3 aligned ints as memory representation */
|
||||
struct __align(16) Vec3ia
|
||||
struct __aligned(16) Vec3ia
|
||||
{
|
||||
typedef int Scalar;
|
||||
enum { N = 3 };
|
||||
@@ -65,7 +65,7 @@ namespace embree
|
||||
};
|
||||
|
||||
/*! 3-wide vectors emulated with 16-wide vectors. */
|
||||
struct __align(64) Vec3ia_t
|
||||
struct __aligned(64) Vec3ia_t
|
||||
{
|
||||
__m512i m512;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
namespace embree
|
||||
{
|
||||
|
||||
__align(64) unsigned int mic_m::shift1[32] = {
|
||||
__aligned(64) unsigned int mic_m::shift1[32] = {
|
||||
((unsigned int)1 << 0),
|
||||
((unsigned int)1 << 1),
|
||||
((unsigned int)1 << 2),
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
namespace embree
|
||||
{
|
||||
/* memory representation as bit vector */
|
||||
struct __align(16) sseb_m
|
||||
struct __aligned(16) sseb_m
|
||||
{
|
||||
enum { size = 4 }; // number of SIMD elements
|
||||
int32 v[4];
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
namespace embree
|
||||
{
|
||||
/* memory representation as 4 aligned floats */
|
||||
struct __align(16) ssef_m
|
||||
struct __aligned(16) ssef_m
|
||||
{
|
||||
typedef sseb_m Mask;
|
||||
typedef ssei_m Int;
|
||||
@@ -62,7 +62,7 @@ namespace embree
|
||||
};
|
||||
|
||||
/*! 4-wide SSE float type emulated with 16-wide vectors. */
|
||||
struct __align(64) ssef_t
|
||||
struct __aligned(64) ssef_t
|
||||
{
|
||||
union {
|
||||
__m512 m512;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
namespace embree
|
||||
{
|
||||
/* memory representation as 4 aligned ints */
|
||||
struct __align(16) ssei_m
|
||||
struct __aligned(16) ssei_m
|
||||
{
|
||||
typedef sseb_m Mask;
|
||||
typedef ssei_m Int;
|
||||
@@ -58,7 +58,7 @@ namespace embree
|
||||
};
|
||||
|
||||
/*! 4-wide SSE integer type emulated with 16-wide vectors. */
|
||||
struct __align(64) ssei_t
|
||||
struct __aligned(64) ssei_t
|
||||
{
|
||||
union {
|
||||
__m512i m512;
|
||||
|
||||
+55
-56
@@ -124,32 +124,6 @@ __forceinline int __btr(int v, int i) {
|
||||
long r = v; _bittestandreset(&r,i); return r;
|
||||
}
|
||||
|
||||
#if defined(__X86_64__)
|
||||
|
||||
__forceinline size_t __bsf(size_t v) {
|
||||
#if defined(__AVX2__)
|
||||
return _tzcnt_u64(v);
|
||||
#else
|
||||
unsigned long r = 0; _BitScanForward64(&r,v); return r;
|
||||
#endif
|
||||
}
|
||||
|
||||
__forceinline size_t __bsr(size_t v) {
|
||||
unsigned long r = 0; _BitScanReverse64(&r,v); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t __btc(size_t v, size_t i) {
|
||||
size_t r = v; _bittestandcomplement64((__int64*)&r,i); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t __bts(size_t v, size_t i) {
|
||||
__int64 r = v; _bittestandset64(&r,i); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t __btr(size_t v, size_t i) {
|
||||
__int64 r = v; _bittestandreset64(&r,i); return r;
|
||||
}
|
||||
|
||||
__forceinline int bitscan(int v) {
|
||||
#if defined(__AVX2__)
|
||||
return _tzcnt_u32(v);
|
||||
@@ -158,18 +132,6 @@ __forceinline int bitscan(int v) {
|
||||
#endif
|
||||
}
|
||||
|
||||
__forceinline size_t bitscan(size_t v) {
|
||||
#if defined(__AVX2__)
|
||||
#if defined(__X86_64__)
|
||||
return _tzcnt_u64(v);
|
||||
#else
|
||||
return _tzcnt_u32(v);
|
||||
#endif
|
||||
#else
|
||||
return __bsf(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
__forceinline int clz(const int x)
|
||||
{
|
||||
#if defined(__AVX2__)
|
||||
@@ -194,6 +156,44 @@ __forceinline unsigned int __bscf(unsigned int& v)
|
||||
return i;
|
||||
}
|
||||
|
||||
#if defined(__X86_64__)
|
||||
|
||||
__forceinline size_t __bsf(size_t v) {
|
||||
#if defined(__AVX2__)
|
||||
return _tzcnt_u64(v);
|
||||
#else
|
||||
unsigned long r = 0; _BitScanForward64(&r,v); return r;
|
||||
#endif
|
||||
}
|
||||
|
||||
__forceinline size_t __bsr(size_t v) {
|
||||
unsigned long r = 0; _BitScanReverse64(&r,v); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t __btc(size_t v, size_t i) {
|
||||
size_t r = v; _bittestandcomplement64((__int64*)&r,i); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t __bts(size_t v, size_t i) {
|
||||
__int64 r = v; _bittestandset64(&r,i); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t __btr(size_t v, size_t i) {
|
||||
__int64 r = v; _bittestandreset64(&r,i); return r;
|
||||
}
|
||||
|
||||
__forceinline size_t bitscan(size_t v) {
|
||||
#if defined(__AVX2__)
|
||||
#if defined(__X86_64__)
|
||||
return _tzcnt_u64(v);
|
||||
#else
|
||||
return _tzcnt_u32(v);
|
||||
#endif
|
||||
#else
|
||||
return __bsf(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
__forceinline size_t __bscf(size_t& v)
|
||||
{
|
||||
size_t i = __bsf(v);
|
||||
@@ -203,24 +203,6 @@ __forceinline size_t __bscf(size_t& v)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__X86_64__)
|
||||
|
||||
typedef int64 atomic64_t;
|
||||
|
||||
__forceinline int64 atomic_add(volatile int64* m, const int64 v) {
|
||||
return _InterlockedExchangeAdd64(m,v);
|
||||
}
|
||||
|
||||
__forceinline int64 atomic_xchg(volatile int64 *p, int64 v) {
|
||||
return _InterlockedExchange64((volatile long long *)p, v);
|
||||
}
|
||||
|
||||
__forceinline int64 atomic_cmpxchg(volatile int64* m, const int64 c, const int64 v) {
|
||||
return _InterlockedCompareExchange64(m,v,c);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
typedef int32 atomic32_t;
|
||||
|
||||
__forceinline int32 atomic_add(volatile int32* p, const int32 v) {
|
||||
@@ -235,6 +217,23 @@ __forceinline int32 atomic_cmpxchg(volatile int32* p, const int32 c, const int32
|
||||
return _InterlockedCompareExchange((volatile long*)p,v,c);
|
||||
}
|
||||
|
||||
#if defined(__X86_64__)
|
||||
|
||||
typedef int64 atomic64_t;
|
||||
|
||||
__forceinline int64 atomic_add(volatile int64* m, const int64 v) {
|
||||
return _InterlockedExchangeAdd64(m,v);
|
||||
}
|
||||
|
||||
__forceinline int64 atomic_xchg(volatile int64 *p, int64 v) {
|
||||
return _InterlockedExchange64((volatile long long *)p, v);
|
||||
}
|
||||
|
||||
__forceinline int64 atomic_cmpxchg(volatile int64* m, const int64 c, const int64 v) {
|
||||
return _InterlockedCompareExchange64(m,v,c);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Unix Platform
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
//#define __forceinline __forceinline
|
||||
//#define __restrict __restrict
|
||||
#define __thread __declspec(thread)
|
||||
#define __align(...) __declspec(align(__VA_ARGS__))
|
||||
#define __aligned(...) __declspec(align(__VA_ARGS__))
|
||||
//#define __FUNCTION__ __FUNCTION__
|
||||
#define debugbreak() __debugbreak()
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
#define __forceinline inline __attribute__((always_inline))
|
||||
//#define __restrict __restrict
|
||||
//#define __thread __thread
|
||||
#define __align(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
#define __aligned(...) __attribute__((aligned(__VA_ARGS__)))
|
||||
#define __FUNCTION__ __PRETTY_FUNCTION__
|
||||
#define debugbreak() asm ("int $3")
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace embree
|
||||
volatile atomic_t data;
|
||||
};
|
||||
|
||||
class __align(64) AlignedAtomicCounter32
|
||||
class __aligned(64) AlignedAtomicCounter32
|
||||
{
|
||||
public:
|
||||
__forceinline AlignedAtomicCounter32 () : data(0) {}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace embree
|
||||
// === fast memory barrier ===
|
||||
// =================================================
|
||||
|
||||
struct __align(64) BarrierActive
|
||||
struct __aligned(64) BarrierActive
|
||||
{
|
||||
public:
|
||||
BarrierActive () : cntr(0) {}
|
||||
@@ -93,7 +93,7 @@ namespace embree
|
||||
#define MAX_MIC_BARRIER_WAIT_CYCLES 256
|
||||
|
||||
|
||||
class __align(64) LinearBarrierActive
|
||||
class __aligned(64) LinearBarrierActive
|
||||
{
|
||||
public:
|
||||
volatile unsigned char count0[MAX_MIC_THREADS];
|
||||
@@ -124,11 +124,11 @@ namespace embree
|
||||
|
||||
|
||||
|
||||
class __align(64) QuadTreeBarrier
|
||||
class __aligned(64) QuadTreeBarrier
|
||||
{
|
||||
public:
|
||||
|
||||
class __align(64) CoreSyncData {
|
||||
class __aligned(64) CoreSyncData {
|
||||
public:
|
||||
volatile unsigned char threadState[2][4];
|
||||
volatile unsigned int mode;
|
||||
@@ -177,7 +177,7 @@ namespace embree
|
||||
|
||||
|
||||
public:
|
||||
__align(64) CoreSyncData data[MAX_MIC_CORES]; // == one cacheline per core ==
|
||||
__aligned(64) CoreSyncData data[MAX_MIC_CORES]; // == one cacheline per core ==
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace embree
|
||||
}
|
||||
|
||||
protected:
|
||||
__align(64) volatile bool event;
|
||||
__aligned(64) volatile bool event;
|
||||
#if !defined(__MIC__)
|
||||
MutexSys mutex;
|
||||
ConditionSys condition;
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace embree
|
||||
volatile int flag;
|
||||
};
|
||||
|
||||
class __align(64) AlignedAtomicMutex : public AtomicMutex
|
||||
class __aligned(64) AlignedAtomicMutex : public AtomicMutex
|
||||
{
|
||||
public:
|
||||
volatile unsigned int index;
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -180,17 +180,17 @@ namespace embree
|
||||
// ================================================================================
|
||||
// ================================================================================
|
||||
|
||||
__align(64) void* volatile LockStepTaskScheduler::data = NULL;
|
||||
__align(64) void (* LockStepTaskScheduler::taskPtr)(void* data, const size_t threadID, const size_t numThreads) = NULL;
|
||||
__aligned(64) void* volatile LockStepTaskScheduler::data = NULL;
|
||||
__aligned(64) void (* LockStepTaskScheduler::taskPtr)(void* data, const size_t threadID, const size_t numThreads) = NULL;
|
||||
|
||||
#if defined(__MIC__)
|
||||
__align(64) QuadTreeBarrier LockStepTaskScheduler::taskBarrier;
|
||||
//__align(64) Barrier LockStepTaskScheduler::taskBarrier;
|
||||
__aligned(64) QuadTreeBarrier LockStepTaskScheduler::taskBarrier;
|
||||
//__aligned(64) Barrier LockStepTaskScheduler::taskBarrier;
|
||||
#else
|
||||
__align(64) Barrier LockStepTaskScheduler::taskBarrier;
|
||||
__aligned(64) Barrier LockStepTaskScheduler::taskBarrier;
|
||||
#endif
|
||||
|
||||
__align(64) AlignedAtomicCounter32 LockStepTaskScheduler::taskCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 LockStepTaskScheduler::taskCounter;
|
||||
|
||||
void LockStepTaskScheduler::init(const size_t numThreads) {
|
||||
taskBarrier.init(numThreads);
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace embree
|
||||
volatile bool terminateThreads;
|
||||
std::vector<thread_t> threads;
|
||||
size_t numThreads;
|
||||
struct __align(64) ThreadEvent {
|
||||
struct __aligned(64) ThreadEvent {
|
||||
Event* event;
|
||||
char align[64-sizeof(Event*)];
|
||||
};
|
||||
@@ -221,9 +221,9 @@ namespace embree
|
||||
|
||||
static const unsigned int CONTROL_THREAD_ID = 0;
|
||||
|
||||
__align(64)static AlignedAtomicCounter32 taskCounter;
|
||||
__align(64) static void (* taskPtr)(void* data, const size_t threadID, const size_t numThreads);
|
||||
__align(64) static void* volatile data;
|
||||
__aligned(64)static AlignedAtomicCounter32 taskCounter;
|
||||
__aligned(64) static void (* taskPtr)(void* data, const size_t threadID, const size_t numThreads);
|
||||
__aligned(64) static void* volatile data;
|
||||
|
||||
#if defined(__MIC__)
|
||||
static QuadTreeBarrier taskBarrier;
|
||||
@@ -261,7 +261,7 @@ namespace embree
|
||||
};
|
||||
|
||||
|
||||
class __align(64) LockStepTaskScheduler4ThreadsLocalCore
|
||||
class __aligned(64) LockStepTaskScheduler4ThreadsLocalCore
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace embree
|
||||
volatile unsigned char threadState[2][4];
|
||||
volatile unsigned int mode;
|
||||
|
||||
__align(64) AtomicMutex mutex;
|
||||
__aligned(64) AtomicMutex mutex;
|
||||
|
||||
|
||||
LockStepTaskScheduler4ThreadsLocalCore();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
__align(64) AtomicMutex mtx;
|
||||
__aligned(64) AtomicMutex mtx;
|
||||
|
||||
//#define DBG(x) { mtx.lock(); x ; mtx.unlock(); }
|
||||
#define DBG(x)
|
||||
|
||||
@@ -53,9 +53,9 @@ namespace embree
|
||||
void terminate();
|
||||
|
||||
private:
|
||||
__align(64) AlignedAtomicCounter32 head_task_list; /*! next index in the task queue where we'll insert a live task */
|
||||
__align(64) Task* volatile tasks[NUM_TASKS]; //!< queue of tasks
|
||||
__align(64) LinearBarrierActive barrier;
|
||||
__aligned(64) AlignedAtomicCounter32 head_task_list; /*! next index in the task queue where we'll insert a live task */
|
||||
__aligned(64) Task* volatile tasks[NUM_TASKS]; //!< queue of tasks
|
||||
__aligned(64) LinearBarrierActive barrier;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace embree
|
||||
private:
|
||||
|
||||
/*! Per thread structure holding the current memory block. */
|
||||
struct __align(4096) ThreadAllocator
|
||||
struct __aligned(4096) ThreadAllocator
|
||||
{
|
||||
ALIGNED_CLASS_(4096);
|
||||
public:
|
||||
@@ -299,13 +299,13 @@ namespace embree
|
||||
ssize_t i = atomic_add(&cur,bytes);
|
||||
if (unlikely(i > end)) throw std::runtime_error("build out of memory");
|
||||
void* p = &ptr[i];
|
||||
if (i+bytes > bytesAllocated)
|
||||
if ((size_t)i+bytes > (size_t)bytesAllocated)
|
||||
os_commit(p,bytes);
|
||||
return p;
|
||||
}
|
||||
|
||||
/*! Per thread structure holding the current memory block. */
|
||||
struct __align(64) ThreadAllocator
|
||||
struct __aligned(64) ThreadAllocator
|
||||
{
|
||||
ALIGNED_CLASS_(64);
|
||||
public:
|
||||
@@ -347,11 +347,11 @@ namespace embree
|
||||
atomic_t bytesAllocated;
|
||||
};
|
||||
|
||||
class __align(64) GlobalAllocator
|
||||
class __aligned(64) GlobalAllocator
|
||||
{
|
||||
public:
|
||||
|
||||
class __align(64) ThreadAllocator
|
||||
class __aligned(64) ThreadAllocator
|
||||
{
|
||||
public:
|
||||
static const size_t blockSize = 2*4096;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace embree
|
||||
}
|
||||
|
||||
/*! Per thread structure holding the current memory block. */
|
||||
struct __align(64) ThreadAllocator
|
||||
struct __aligned(64) ThreadAllocator
|
||||
{
|
||||
ALIGNED_CLASS_(64);
|
||||
public:
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace embree
|
||||
but only when not called intermixed. Thus one can only
|
||||
atomically remove or insert items. */
|
||||
template<typename T>
|
||||
class __align(64) atomic_set
|
||||
class __aligned(64) atomic_set
|
||||
{
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
namespace embree
|
||||
{
|
||||
/*! A primitive reference stores the bounds of the primitive and its ID. */
|
||||
struct __align(32) PrimRef
|
||||
struct __aligned(32) PrimRef
|
||||
{
|
||||
__forceinline PrimRef () {}
|
||||
__forceinline PrimRef (const BBox3f& bounds, unsigned geomID, unsigned primID) {
|
||||
|
||||
@@ -82,7 +82,8 @@ namespace embree
|
||||
|
||||
/* error flag */
|
||||
static tls_t g_error = NULL;
|
||||
std::vector<RTCError*> g_errors;
|
||||
static std::vector<RTCError*> g_errors;
|
||||
static MutexSys g_errors_mutex;
|
||||
|
||||
/* mutex to make API thread safe */
|
||||
static MutexSys g_mutex;
|
||||
@@ -293,9 +294,13 @@ namespace embree
|
||||
return;
|
||||
}
|
||||
TaskScheduler::destroy();
|
||||
for (size_t i=0; i<g_errors.size(); i++)
|
||||
delete g_errors[i];
|
||||
destroyTls(g_error);
|
||||
{
|
||||
Lock<MutexSys> lock(g_errors_mutex);
|
||||
for (size_t i=0; i<g_errors.size(); i++)
|
||||
delete g_errors[i];
|
||||
destroyTls(g_error);
|
||||
g_errors.clear();
|
||||
}
|
||||
Alloc::global.clear();
|
||||
g_initialized = false;
|
||||
CATCH_END;
|
||||
@@ -305,7 +310,7 @@ namespace embree
|
||||
{
|
||||
RTCError* stored_error = (RTCError*) getTls(g_error);
|
||||
if (stored_error == NULL) {
|
||||
Lock<MutexSys> lock(g_mutex);
|
||||
Lock<MutexSys> lock(g_errors_mutex);
|
||||
stored_error = new RTCError(RTC_NO_ERROR);
|
||||
g_errors.push_back(stored_error);
|
||||
setTls(g_error,stored_error);
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace embree
|
||||
};
|
||||
|
||||
|
||||
struct __align(8) StackItemInt64
|
||||
struct __aligned(8) StackItemInt64
|
||||
{
|
||||
|
||||
#if 1
|
||||
@@ -224,7 +224,7 @@ namespace embree
|
||||
#if defined(__MIC__)
|
||||
|
||||
/*! An item on the stack holds the node and distance. */
|
||||
struct __align(16) StackItem
|
||||
struct __aligned(16) StackItem
|
||||
{
|
||||
/*! pointer to the node */
|
||||
void* ptr;
|
||||
@@ -259,7 +259,7 @@ namespace embree
|
||||
|
||||
#else
|
||||
|
||||
struct __align(16) StackItem
|
||||
struct __aligned(16) StackItem
|
||||
{
|
||||
/*! Copy operator */
|
||||
StackItem& operator=(const StackItem& other) { all = other.all; return *this; }
|
||||
|
||||
@@ -48,6 +48,8 @@ namespace embree
|
||||
cout << " #hit_boxes = ";
|
||||
for (size_t i=0;i<=16;i++) cout << "[" << i << "] " << 100.0f * cntrs.code.normal.trav_hit_boxes[i] / normal_box_hits << " ";
|
||||
cout << std::endl;
|
||||
cout << " #normal_travs_active = " << float(cntrs.active.normal.travs )*1E-6 << "M" << std::endl;
|
||||
|
||||
#endif
|
||||
if (cntrs.code.shadow.travs) {
|
||||
cout << " #shadow_travs = " << float(cntrs.code.shadow.travs )*1E-6 << "M" << std::endl;
|
||||
@@ -62,6 +64,10 @@ namespace embree
|
||||
cout << " #hit_boxes = ";
|
||||
for (size_t i=0;i<=16;i++) cout << "[" << i << "] " << 100.0f * cntrs.code.shadow.trav_hit_boxes[i] / shadow_box_hits << " ";
|
||||
cout << std::endl;
|
||||
cout << " #shadow_travs_active = " << float(cntrs.active.shadow.travs )*1E-6 << "M" << std::endl;
|
||||
cout << std::endl;
|
||||
cout << "total #rays = " << float(cntrs.active.normal.travs+cntrs.active.shadow.travs )*1E-6 << "M" << std::endl;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace embree
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
|
||||
struct __align(4096) ThreadPrimBlockAllocator
|
||||
struct __aligned(4096) ThreadPrimBlockAllocator
|
||||
{
|
||||
ALIGNED_CLASS_(4096);
|
||||
public:
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace embree
|
||||
* it's 4 children as well as 4 child pointers. */
|
||||
class BVH4 : public Bounded
|
||||
{
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
|
||||
/*! forward declaration of node type */
|
||||
|
||||
@@ -186,10 +186,10 @@ namespace embree
|
||||
Split2 split;
|
||||
const BuildRef* src;
|
||||
BuildRef* dst;
|
||||
__align(64) AlignedAtomicCounter32 lCounter;
|
||||
__align(64) AlignedAtomicCounter32 rCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 lCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 rCounter;
|
||||
Binner2<BINS> bin16;
|
||||
__align(64) Binner2<BINS> global_bin16[MAX_MIC_THREADS]; // FIXME: hardcoded number of threads
|
||||
__aligned(64) Binner2<BINS> global_bin16[MAX_MIC_THREADS]; // FIXME: hardcoded number of threads
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ namespace embree
|
||||
|
||||
void BVH4BuilderFast::recurseSAH(BuildRecord& current, Allocator& nodeAlloc, Allocator& leafAlloc, const size_t mode, const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
__align(64) BuildRecord children[BVH4::N];
|
||||
__aligned(64) BuildRecord children[BVH4::N];
|
||||
|
||||
/* create leaf node */
|
||||
if (current.depth >= BVH4::maxBuildDepth || current.isLeaf()) {
|
||||
@@ -618,7 +618,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) BuildRecord left, right;
|
||||
__aligned(64) BuildRecord left, right;
|
||||
if (!split(children[bestChild],left,right,mode,threadID,numThreads))
|
||||
continue;
|
||||
|
||||
@@ -658,8 +658,8 @@ namespace embree
|
||||
|
||||
void BVH4BuilderFast::buildSubTrees(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
__align(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__align(64) Allocator leafAlloc(primAllocator);
|
||||
__aligned(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__aligned(64) Allocator leafAlloc(primAllocator);
|
||||
|
||||
while (true)
|
||||
{
|
||||
@@ -695,8 +695,8 @@ namespace embree
|
||||
/* initialize node and leaf allocator */
|
||||
nodeAllocator.reset();
|
||||
primAllocator.reset();
|
||||
__align(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__align(64) Allocator leafAlloc(primAllocator);
|
||||
__aligned(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__aligned(64) Allocator leafAlloc(primAllocator);
|
||||
|
||||
/* create prim refs */
|
||||
global_bounds.reset();
|
||||
@@ -739,8 +739,8 @@ namespace embree
|
||||
/* initialize node and leaf allocator */
|
||||
nodeAllocator.reset();
|
||||
primAllocator.reset();
|
||||
__align(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__align(64) Allocator leafAlloc(primAllocator);
|
||||
__aligned(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__aligned(64) Allocator leafAlloc(primAllocator);
|
||||
|
||||
/* create initial build record */
|
||||
BuildRecord br;
|
||||
|
||||
@@ -49,8 +49,8 @@ namespace embree
|
||||
}
|
||||
|
||||
public:
|
||||
__align(64) WorkStack<BuildRecord,SIZE_WORK_STACK> workStack;
|
||||
__align(64) WorkStack<BuildRecord,SIZE_WORK_STACK>* threadStack;
|
||||
__aligned(64) WorkStack<BuildRecord,SIZE_WORK_STACK> workStack;
|
||||
__aligned(64) WorkStack<BuildRecord,SIZE_WORK_STACK>* threadStack;
|
||||
ParallelBinner<16> parallelBinner;
|
||||
LockStepTaskScheduler scheduler;
|
||||
LinearBarrierActive barrier;
|
||||
@@ -131,8 +131,8 @@ namespace embree
|
||||
Centroid_Scene_AABB global_bounds;
|
||||
|
||||
protected:
|
||||
__align(64) GlobalAllocator nodeAllocator;
|
||||
__align(64) GlobalAllocator primAllocator;
|
||||
__aligned(64) GlobalAllocator nodeAllocator;
|
||||
__aligned(64) GlobalAllocator primAllocator;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ namespace embree
|
||||
scheduler.syncThreads(threadID,numThreads);
|
||||
|
||||
/* calculate total number of items for each bucket */
|
||||
__align(64) size_t total[RADIX_BUCKETS];
|
||||
__aligned(64) size_t total[RADIX_BUCKETS];
|
||||
for (size_t i=0; i<RADIX_BUCKETS; i++)
|
||||
total[i] = 0;
|
||||
|
||||
@@ -495,7 +495,7 @@ namespace embree
|
||||
total[j] += radixCount[i][j];
|
||||
|
||||
/* calculate start offset of each bucket */
|
||||
__align(64) size_t offset[RADIX_BUCKETS];
|
||||
__aligned(64) size_t offset[RADIX_BUCKETS];
|
||||
offset[0] = 0;
|
||||
for (size_t i=1; i<RADIX_BUCKETS; i++)
|
||||
offset[i] = offset[i-1] + total[i-1];
|
||||
@@ -518,8 +518,8 @@ namespace embree
|
||||
|
||||
void BVH4BuilderMorton::recurseSubMortonTrees(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
__align(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__align(64) Allocator leafAlloc(primAllocator);
|
||||
__aligned(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__aligned(64) Allocator leafAlloc(primAllocator);
|
||||
while (true)
|
||||
{
|
||||
const unsigned int taskID = scheduler.taskCounter.inc();
|
||||
@@ -797,7 +797,7 @@ namespace embree
|
||||
return empty;
|
||||
}
|
||||
|
||||
__align(64) SmallBuildRecord children[BVH4::N];
|
||||
__aligned(64) SmallBuildRecord children[BVH4::N];
|
||||
|
||||
/* create leaf node */
|
||||
if (unlikely(current.depth >= BVH4::maxBuildDepth || current.size() <= BVH4BuilderMorton::MORTON_LEAF_THRESHOLD)) {
|
||||
@@ -828,7 +828,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) SmallBuildRecord left, right;
|
||||
__aligned(64) SmallBuildRecord left, right;
|
||||
split(children[bestChild],left,right);
|
||||
|
||||
/* add new children left and right */
|
||||
@@ -991,8 +991,8 @@ namespace embree
|
||||
/* perform first splits in single threaded mode */
|
||||
nodeAllocator.reset();
|
||||
primAllocator.reset();
|
||||
__align(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__align(64) Allocator leafAlloc(primAllocator);
|
||||
__aligned(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__aligned(64) Allocator leafAlloc(primAllocator);
|
||||
recurse(br,nodeAlloc,leafAlloc,RECURSE,threadIndex);
|
||||
|
||||
/* stop measurement */
|
||||
@@ -1052,8 +1052,8 @@ namespace embree
|
||||
/* perform first splits in single threaded mode */
|
||||
nodeAllocator.reset();
|
||||
primAllocator.reset();
|
||||
__align(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__align(64) Allocator leafAlloc(primAllocator);
|
||||
__aligned(64) Allocator nodeAlloc(nodeAllocator);
|
||||
__aligned(64) Allocator leafAlloc(primAllocator);
|
||||
recurse(br,nodeAlloc,leafAlloc,CREATE_TOP_LEVEL,threadIndex);
|
||||
|
||||
/* sort all subtasks by size */
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace embree
|
||||
|
||||
public:
|
||||
|
||||
class __align(16) SmallBuildRecord
|
||||
class __aligned(16) SmallBuildRecord
|
||||
{
|
||||
public:
|
||||
unsigned int begin;
|
||||
@@ -72,7 +72,7 @@ namespace embree
|
||||
__forceinline bool operator>(const SmallBuildRecord& br) const { return size() > br.size(); }
|
||||
};
|
||||
|
||||
struct __align(8) MortonID32Bit
|
||||
struct __aligned(8) MortonID32Bit
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
@@ -129,8 +129,8 @@ namespace embree
|
||||
ThreadRadixCountTy* radixCount;
|
||||
|
||||
size_t numBuildRecords;
|
||||
__align(64) SmallBuildRecord buildRecords[NUM_TOP_LEVEL_BINS];
|
||||
__align(64) WorkStack<SmallBuildRecord,NUM_TOP_LEVEL_BINS> workStack;
|
||||
__aligned(64) SmallBuildRecord buildRecords[NUM_TOP_LEVEL_BINS];
|
||||
__aligned(64) WorkStack<SmallBuildRecord,NUM_TOP_LEVEL_BINS> workStack;
|
||||
LinearBarrierActive barrier;
|
||||
};
|
||||
|
||||
@@ -241,8 +241,8 @@ namespace embree
|
||||
LockStepTaskScheduler scheduler;
|
||||
|
||||
protected:
|
||||
__align(64) GlobalAllocator nodeAllocator;
|
||||
__align(64) GlobalAllocator primAllocator;
|
||||
__aligned(64) GlobalAllocator nodeAllocator;
|
||||
__aligned(64) GlobalAllocator primAllocator;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) BuildRecord left, right;
|
||||
__aligned(64) BuildRecord left, right;
|
||||
split(childTasks[bestChild],left,right,mode,threadID,numThreads);
|
||||
|
||||
/* add new children left and right */
|
||||
|
||||
@@ -56,8 +56,8 @@ namespace embree
|
||||
}
|
||||
|
||||
public:
|
||||
__align(64) WorkStack<BuildRecord,SIZE_WORK_STACK> global_workStack;
|
||||
__align(64) WorkStack<BuildRecord,SIZE_WORK_STACK>* thread_workStack;
|
||||
__aligned(64) WorkStack<BuildRecord,SIZE_WORK_STACK> global_workStack;
|
||||
__aligned(64) WorkStack<BuildRecord,SIZE_WORK_STACK>* thread_workStack;
|
||||
LinearBarrierActive global_barrier;
|
||||
ParallelBinner2<16> parallelBinner;
|
||||
Centroid_Scene_AABB* thread_bounds;
|
||||
|
||||
@@ -27,8 +27,6 @@ namespace embree
|
||||
{
|
||||
namespace isa
|
||||
{
|
||||
|
||||
|
||||
template<typename PrimitiveIntersector8>
|
||||
void BVH4Intersector8Hybrid<PrimitiveIntersector8>::intersect(avxb* valid_i, BVH4* bvh, Ray8& ray)
|
||||
{
|
||||
@@ -90,7 +88,7 @@ namespace embree
|
||||
size_t bits = movemask(active);
|
||||
if (unlikely(__popcnt(bits) <= SWITCH_THRESHOLD)) {
|
||||
for (size_t i=__bsf(bits); bits!=0; bits=__btc(bits,i), i=__bsf(bits)) {
|
||||
intersect1<PrimitiveIntersector8>(bvh, curNode, i, ray, ray_org, ray_dir, rdir, ray_tnear, ray_tfar, nearXYZ);
|
||||
intersect1(bvh, curNode, i, ray, ray_org, ray_dir, rdir, ray_tnear, ray_tfar, nearXYZ);
|
||||
}
|
||||
ray_tfar = ray.tfar;
|
||||
continue;
|
||||
@@ -149,6 +147,11 @@ namespace embree
|
||||
const avxf childDist = select(lhit,lnearP,inf);
|
||||
const NodeRef child = node->children[i];
|
||||
assert(child != BVH4::emptyNode);
|
||||
|
||||
#if defined(__AVX2__) && defined(ENABLE_PREFETCHING)
|
||||
prefetchL1(((char*)child.node()) + 0);
|
||||
prefetchL1(((char*)child.node()) + 64);
|
||||
#endif
|
||||
|
||||
/* push cur node onto stack and continue with hit child */
|
||||
if (any(childDist < curDist))
|
||||
@@ -250,7 +253,7 @@ namespace embree
|
||||
size_t bits = movemask(active);
|
||||
if (unlikely(__popcnt(bits) <= SWITCH_THRESHOLD)) {
|
||||
for (size_t i=__bsf(bits); bits!=0; bits=__btc(bits,i), i=__bsf(bits)) {
|
||||
if (occluded1<PrimitiveIntersector8>(bvh,curNode,i,ray,ray_org,ray_dir,rdir,ray_tnear,ray_tfar,nearXYZ))
|
||||
if (occluded1(bvh,curNode,i,ray,ray_org,ray_dir,rdir,ray_tnear,ray_tfar,nearXYZ))
|
||||
terminated[i] = -1;
|
||||
}
|
||||
if (all(terminated)) break;
|
||||
@@ -310,6 +313,11 @@ namespace embree
|
||||
assert(sptr_node < stackEnd);
|
||||
assert(child != BVH4::emptyNode);
|
||||
const avxf childDist = select(lhit,lnearP,inf);
|
||||
|
||||
#if defined(__AVX2__) && defined(ENABLE_PREFETCHING)
|
||||
prefetchL1(((char*)child.node()) + 0);
|
||||
prefetchL1(((char*)child.node()) + 64);
|
||||
#endif
|
||||
|
||||
/* push cur node onto stack and continue with hit child */
|
||||
if (any(childDist < curDist))
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace embree
|
||||
static const size_t stackSizeChunk = 4*BVH4::maxDepth+1;
|
||||
|
||||
public:
|
||||
template<typename PrimitiveIntersector8>
|
||||
static __forceinline void intersect1(const BVH4* bvh, NodeRef root, const size_t k, Ray8& ray, const avx3f &ray_org, const avx3f &ray_dir, const avx3f &ray_rdir, const avxf &ray_tnear, const avxf &ray_tfar, const avx3i& nearXYZ)
|
||||
{
|
||||
/*! stack state */
|
||||
@@ -180,7 +179,6 @@ namespace embree
|
||||
}
|
||||
}
|
||||
|
||||
template<typename PrimitiveIntersector8>
|
||||
static __forceinline bool occluded1(const BVH4* bvh, NodeRef root, const size_t k, Ray8& ray,const avx3f &ray_org, const avx3f &ray_dir, const avx3f &ray_rdir, const avxf &ray_tnear, const avxf &ray_tfar, const avx3i& nearXYZ)
|
||||
{
|
||||
/*! stack state */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
__align(64) Vec3fa initQBVHNode[2] = {
|
||||
__aligned(64) Vec3fa initQBVHNode[2] = {
|
||||
Vec3fa(pos_inf,pos_inf,pos_inf,(int)(1 << 31)),
|
||||
Vec3fa(neg_inf,neg_inf,neg_inf,(int)(1 << 31))
|
||||
};
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace embree
|
||||
* it's 4 children as well as a 4 child indices. */
|
||||
class BVH4i : public Bounded
|
||||
{
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
|
||||
/*! forward declaration of node type */
|
||||
@@ -355,7 +356,7 @@ namespace embree
|
||||
return (children & BVH_LEAF_MASK);
|
||||
};
|
||||
|
||||
class __align(32) BVHNode : public BBox3f
|
||||
class __aligned(32) BVHNode : public BBox3f
|
||||
{
|
||||
public:
|
||||
__forceinline unsigned int isLeaf() const {
|
||||
@@ -431,7 +432,7 @@ namespace embree
|
||||
#define QBVH_OFFSET_MASK (~(QBVH_ITEMS_MASK | QBVH_LEAF_MASK))
|
||||
#define QBVH_TERMINAL_TOKEN QBVH_LEAF_MASK
|
||||
|
||||
class __align(64) QBVHNode
|
||||
class __aligned(64) QBVHNode
|
||||
{
|
||||
public:
|
||||
float min_x[4];
|
||||
|
||||
@@ -159,10 +159,10 @@ namespace embree
|
||||
Split split;
|
||||
const PrimRef* src;
|
||||
PrimRef* dst;
|
||||
__align(64) AlignedAtomicCounter32 lCounter;
|
||||
__align(64) AlignedAtomicCounter32 rCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 lCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 rCounter;
|
||||
Binner<BINS> bin16;
|
||||
__align(64) Binner<BINS> global_bin16[MAX_MIC_THREADS];
|
||||
__aligned(64) Binner<BINS> global_bin16[MAX_MIC_THREADS];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace embree
|
||||
|
||||
void BVH4iBuilderFast::recurseSAH(BuildRecord& current, const size_t mode, const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
__align(64) BuildRecord children[BVH4i::N];
|
||||
__aligned(64) BuildRecord children[BVH4i::N];
|
||||
|
||||
/* create leaf node */
|
||||
if (current.depth >= BVH4i::maxBuildDepth || current.isLeaf()) {
|
||||
@@ -482,7 +482,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) BuildRecord left, right;
|
||||
__aligned(64) BuildRecord left, right;
|
||||
if (!split(children[bestChild],left,right,mode,threadID,numThreads))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ namespace embree
|
||||
|
||||
|
||||
#if 0
|
||||
__align(64) unsigned int total[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int total[RADIX_BUCKETS];
|
||||
for (size_t i=0; i<RADIX_BUCKETS; i++)
|
||||
total[i] = 0;
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace embree
|
||||
for (size_t j=0; j<RADIX_BUCKETS; j++)
|
||||
total[j] += radixCount[i][j];
|
||||
#else
|
||||
__align(64) unsigned int inner_offset[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int inner_offset[RADIX_BUCKETS];
|
||||
|
||||
#define CHUNK 64
|
||||
|
||||
@@ -373,7 +373,7 @@ namespace embree
|
||||
for (size_t k=0;k<CHUNK;k++)
|
||||
inner_offset[j+k] += radixCount[i][j+k];
|
||||
|
||||
__align(64) unsigned int total[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int total[RADIX_BUCKETS];
|
||||
|
||||
#pragma unroll(CHUNK)
|
||||
for (size_t i=0; i<RADIX_BUCKETS; i++)
|
||||
@@ -388,7 +388,7 @@ namespace embree
|
||||
#endif
|
||||
|
||||
/* calculate start offset of each bucket */
|
||||
__align(64) unsigned int offset[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int offset[RADIX_BUCKETS];
|
||||
offset[0] = 0;
|
||||
for (size_t i=1; i<RADIX_BUCKETS; i++)
|
||||
offset[i] = offset[i-1] + total[i-1];
|
||||
@@ -625,7 +625,7 @@ namespace embree
|
||||
return empty;
|
||||
}
|
||||
|
||||
__align(64) SmallBuildRecord children[BVH4i::N];
|
||||
__aligned(64) SmallBuildRecord children[BVH4i::N];
|
||||
|
||||
/* create leaf node */
|
||||
if (unlikely(current.size() <= BVH4iBuilderMorton::MORTON_LEAF_THRESHOLD)) {
|
||||
@@ -659,7 +659,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) SmallBuildRecord left, right;
|
||||
__aligned(64) SmallBuildRecord left, right;
|
||||
if (!split(children[bestChild],left,right))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace embree
|
||||
|
||||
public:
|
||||
|
||||
class __align(16) SmallBuildRecord
|
||||
class __aligned(16) SmallBuildRecord
|
||||
{
|
||||
public:
|
||||
unsigned int begin;
|
||||
@@ -63,7 +63,7 @@ namespace embree
|
||||
__forceinline bool operator>(const SmallBuildRecord& br) const { return size() > br.size(); }
|
||||
};
|
||||
|
||||
struct __align(8) MortonID32Bit
|
||||
struct __aligned(8) MortonID32Bit
|
||||
{
|
||||
unsigned int code;
|
||||
unsigned int index;
|
||||
@@ -156,17 +156,17 @@ namespace embree
|
||||
size_t encodeMask;
|
||||
size_t numBuildRecords;
|
||||
|
||||
__align(64) LinearBarrierActive barrier;
|
||||
__align(64) SmallBuildRecord buildRecords[MAX_TOP_LEVEL_BINS];
|
||||
__align(64) unsigned int thread_startGroup[MAX_MIC_THREADS];
|
||||
__align(64) unsigned int thread_startGroupOffset[MAX_MIC_THREADS];
|
||||
__aligned(64) LinearBarrierActive barrier;
|
||||
__aligned(64) SmallBuildRecord buildRecords[MAX_TOP_LEVEL_BINS];
|
||||
__aligned(64) unsigned int thread_startGroup[MAX_MIC_THREADS];
|
||||
__aligned(64) unsigned int thread_startGroupOffset[MAX_MIC_THREADS];
|
||||
|
||||
/*! state for radix sort */
|
||||
public:
|
||||
static const size_t RADIX_BITS = 11;
|
||||
static const size_t RADIX_BUCKETS = (1 << RADIX_BITS);
|
||||
static const size_t RADIX_BUCKETS_MASK = (RADIX_BUCKETS-1);
|
||||
__align(64) unsigned int radixCount[MAX_MIC_THREADS][RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int radixCount[MAX_MIC_THREADS][RADIX_BUCKETS];
|
||||
|
||||
protected:
|
||||
MortonID32Bit* __restrict__ morton;
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace embree
|
||||
|
||||
const Vec3fa rootDiag = this->node[0].upper - this->node[0].lower;
|
||||
|
||||
__align(64) BVHNode local_node[MAX_REBUILD_NODES];
|
||||
__aligned(64) BVHNode local_node[MAX_REBUILD_NODES];
|
||||
size_t nodes = 0;
|
||||
extractTopLevelTree(0,rootDiag,local_node,nodes);
|
||||
BuildRecord topLevelBuildRecord;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace embree
|
||||
/* --------------------- Centroid_Scene_AABB --------------------- */
|
||||
/* --------------------------------------------------------------- */
|
||||
|
||||
class __align(64) Centroid_Scene_AABB
|
||||
class __aligned(64) Centroid_Scene_AABB
|
||||
{
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
@@ -98,7 +98,7 @@ namespace embree
|
||||
/* ------------------------- BuildRecord ------------------------- */
|
||||
/* --------------------------------------------------------------- */
|
||||
|
||||
class __align(64) BuildRecord
|
||||
class __aligned(64) BuildRecord
|
||||
{
|
||||
public:
|
||||
Centroid_Scene_AABB bounds; //!< geometry and centroid bounds
|
||||
@@ -168,8 +168,8 @@ namespace embree
|
||||
{
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
AlignedAtomicMutex __align(64) mutex;
|
||||
__align(64) T t[SIZE];
|
||||
AlignedAtomicMutex __aligned(64) mutex;
|
||||
__aligned(64) T t[SIZE];
|
||||
|
||||
__forceinline void init() {
|
||||
mutex.reset();
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace embree
|
||||
|
||||
};
|
||||
|
||||
__align(64) StackEntry stack[QBVH_MAX_STACK_DEPTH];
|
||||
__aligned(64) StackEntry stack[QBVH_MAX_STACK_DEPTH];
|
||||
|
||||
avxb m_active = *valid_i;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace embree
|
||||
#if defined (__AVX__)
|
||||
|
||||
/*! BVH8 Node */
|
||||
struct __align(64) Node
|
||||
struct __aligned(64) Node
|
||||
{
|
||||
avxf lower_x;
|
||||
avxf upper_x;
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
LinkLibraryDependencies="false"
|
||||
AdditionalOptions="/ignore:4217 /ignore:4049"
|
||||
AdditionalDependencies="$(OutDir)\sys.lib"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
ModuleDefinitionFile="embree.def"
|
||||
ForceSymbolReferences=""
|
||||
GenerateDebugInformation="true"
|
||||
@@ -166,6 +167,7 @@
|
||||
LinkLibraryDependencies="false"
|
||||
AdditionalOptions="/ignore:4217 /ignore:4049"
|
||||
AdditionalDependencies="$(OutDir)\sys.lib"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
ModuleDefinitionFile="embree.def"
|
||||
ForceSymbolReferences=""
|
||||
GenerateDebugInformation="true"
|
||||
@@ -1275,10 +1277,6 @@
|
||||
RelativePath="..\..\common\math\vec4.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\common\math\vector3f.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="simd"
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -183,6 +191,7 @@
|
||||
<ModuleDefinitionFile>embree.def</ModuleDefinitionFile>
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -220,6 +229,7 @@
|
||||
<ModuleDefinitionFile>embree.def</ModuleDefinitionFile>
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -252,7 +262,8 @@
|
||||
<Link>
|
||||
<AdditionalOptions>/ignore:4217 /ignore:4049 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>$(OutDir)sys.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>embree.def</ModuleDefinitionFile>
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
@@ -290,7 +301,8 @@
|
||||
<Link>
|
||||
<AdditionalOptions>/ignore:4217 /ignore:4049 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>$(OutDir)sys.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
<ModuleDefinitionFile>embree.def</ModuleDefinitionFile>
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
@@ -329,6 +341,8 @@
|
||||
<ModuleDefinitionFile>embree.def</ModuleDefinitionFile>
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -367,6 +381,8 @@
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -402,6 +418,8 @@
|
||||
<ModuleDefinitionFile>embree.def</ModuleDefinitionFile>
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -440,6 +458,8 @@
|
||||
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@@ -516,7 +536,6 @@
|
||||
<ClInclude Include="..\..\common\math\vec3fa.h" />
|
||||
<ClInclude Include="..\..\common\math\vec3ia.h" />
|
||||
<ClInclude Include="..\..\common\math\vec4.h" />
|
||||
<ClInclude Include="..\..\common\math\vector3f.h" />
|
||||
<ClInclude Include="..\..\common\simd\avx.h" />
|
||||
<ClInclude Include="..\..\common\simd\avxb.h" />
|
||||
<ClInclude Include="..\..\common\simd\avxf.h" />
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace embree
|
||||
|
||||
/*! BVH16i Node */
|
||||
|
||||
struct __align(64) Node
|
||||
struct __aligned(64) Node
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
@@ -54,13 +54,13 @@ namespace embree
|
||||
|
||||
static unsigned int TMP_BVH16I_LEAF_MASK = BVH16I_LEAF_MASK; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
void BVH16iIntersector16Single::intersect(mic_i* valid_i, BVH16i* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -533,7 +533,7 @@ namespace embree
|
||||
void BVH16iIntersector16Single::occluded(mic_i* valid_i, BVH16i* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
|
||||
namespace embree
|
||||
{
|
||||
// __align(64) BVH4i::Helper BVH4i::initQBVHNode[4] = {
|
||||
// __aligned(64) BVH4i::Helper BVH4i::initQBVHNode[4] = {
|
||||
// { FLT_MAX_EXP, FLT_MAX_EXP, FLT_MAX_EXP,(int)(1 << 31)},
|
||||
// { FLT_MAX_EXP, FLT_MAX_EXP, FLT_MAX_EXP,(int)(1 << 31)},
|
||||
// { FLT_MAX_EXP, FLT_MAX_EXP, FLT_MAX_EXP,(int)(1 << 31)},
|
||||
// { FLT_MAX_EXP, FLT_MAX_EXP, FLT_MAX_EXP,(int)(1 << 31)}
|
||||
// };
|
||||
|
||||
__align(64) BVH4i::Helper BVH4i::initQBVHNode[4] = {
|
||||
__aligned(64) BVH4i::Helper BVH4i::initQBVHNode[4] = {
|
||||
{1E14f,1E14f,1E14f,(int)(1 << 31)},
|
||||
{1E14f,1E14f,1E14f,(int)(1 << 31)},
|
||||
{1E14f,1E14f,1E14f,(int)(1 << 31)},
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace embree
|
||||
return (children & BVH_LEAF_MASK);
|
||||
};
|
||||
|
||||
class __align(32) BVHNode : public BBox3f
|
||||
class __aligned(32) BVHNode : public BBox3f
|
||||
{
|
||||
public:
|
||||
__forceinline unsigned int isLeaf() const {
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
//#define PROFILE
|
||||
#define PROFILE_ITERATIONS 100
|
||||
|
||||
#define MEASURE_MEMORY_ALLOCATION_TIME 0
|
||||
|
||||
// TODO: CHECK const float voxelArea = current.cs_AABB.sceneArea();
|
||||
// const float centroidArea = current.cs_AABB.centroidArea();
|
||||
|
||||
@@ -123,6 +125,11 @@ namespace embree
|
||||
const size_t sizeNodeInBytes,
|
||||
const size_t sizeAccelInBytes)
|
||||
{
|
||||
#if MEASURE_MEMORY_ALLOCATION_TIME == 1
|
||||
double msec = 0.0;
|
||||
msec = getSeconds();
|
||||
#endif
|
||||
|
||||
const size_t additional_size = 16 * CACHELINE_SIZE;
|
||||
|
||||
/* free previously allocated memory */
|
||||
@@ -160,9 +167,11 @@ namespace embree
|
||||
assert(node != 0);
|
||||
assert(accel != 0);
|
||||
|
||||
#if 0
|
||||
memset(prims,0,size_primrefs);
|
||||
memset(node,0,size_node);
|
||||
memset(accel,0,size_accel);
|
||||
#endif
|
||||
|
||||
bvh->accel = accel;
|
||||
bvh->qbvh = (BVH4i::Node*)node;
|
||||
@@ -170,6 +179,11 @@ namespace embree
|
||||
bvh->size_accel = size_accel;
|
||||
|
||||
size_prims = size_primrefs;
|
||||
|
||||
#if MEASURE_MEMORY_ALLOCATION_TIME == 1
|
||||
msec = getSeconds()-msec;
|
||||
std::cout << "allocation time " << 1000. * msec << " ms" << std::endl << std::flush;
|
||||
#endif
|
||||
}
|
||||
|
||||
void BVH4iBuilder::allocateData(const size_t threadCount, const size_t totalNumPrimitives)
|
||||
@@ -313,7 +327,7 @@ namespace embree
|
||||
unsigned int currentID = startID;
|
||||
unsigned int offset = startID - numSkipped;
|
||||
|
||||
__align(64) PrimRef local_prims[2];
|
||||
__aligned(64) PrimRef local_prims[2];
|
||||
size_t numLocalPrims = 0;
|
||||
PrimRef *__restrict__ dest = &prims[currentID];
|
||||
|
||||
@@ -487,7 +501,7 @@ namespace embree
|
||||
|
||||
void BVH4iBuilder::fillLocalWorkQueues(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
__align(64) BuildRecord br;
|
||||
__aligned(64) BuildRecord br;
|
||||
const size_t numCores = (numThreads+3)/4;
|
||||
const size_t coreID = threadID/4;
|
||||
|
||||
@@ -511,7 +525,7 @@ namespace embree
|
||||
void BVH4iBuilder::buildSubTrees(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
NodeAllocator alloc(atomicID,numAllocatedNodes);
|
||||
__align(64) BuildRecord br;
|
||||
__aligned(64) BuildRecord br;
|
||||
const size_t numCores = (numThreads+3)/4;
|
||||
const size_t globalCoreID = threadID/4;
|
||||
|
||||
@@ -699,8 +713,8 @@ namespace embree
|
||||
mic_f rightCentroidBoundsMax((float)neg_inf);
|
||||
|
||||
/* local queues for NGO stores */
|
||||
__align(64) PrimRef local_left_queue[2];
|
||||
__align(64) PrimRef local_right_queue[2];
|
||||
__aligned(64) PrimRef local_left_queue[2];
|
||||
__aligned(64) PrimRef local_right_queue[2];
|
||||
size_t num_local_left = 0;
|
||||
size_t num_local_right = 0;
|
||||
|
||||
@@ -827,8 +841,8 @@ namespace embree
|
||||
PrimRef * __restrict__ l_dest = prims + current.begin + thread_start_left;
|
||||
PrimRef * __restrict__ r_dest = prims + current.begin + thread_start_right + bestSplitNumLeft;
|
||||
|
||||
__align(64) Centroid_Scene_AABB local_left;
|
||||
__align(64) Centroid_Scene_AABB local_right; // just one local
|
||||
__aligned(64) Centroid_Scene_AABB local_left;
|
||||
__aligned(64) Centroid_Scene_AABB local_right; // just one local
|
||||
|
||||
parallelPartitioning(current,l_source,r_source,l_dest,r_dest,global_sharedData.split,local_left,local_right);
|
||||
|
||||
@@ -1193,7 +1207,7 @@ namespace embree
|
||||
|
||||
void BVH4iBuilder::recurseSAH(BuildRecord& current, NodeAllocator& alloc,const size_t mode, const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
__align(64) BuildRecord children[BVH4i::N];
|
||||
__aligned(64) BuildRecord children[BVH4i::N];
|
||||
|
||||
/* create leaf node */
|
||||
if (current.depth >= BVH4i::maxBuildDepth || current.isLeaf()) {
|
||||
@@ -1225,7 +1239,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) BuildRecord left, right;
|
||||
__aligned(64) BuildRecord left, right;
|
||||
if (!split(children[bestChild],left,right,mode,threadID,numThreads))
|
||||
continue;
|
||||
|
||||
@@ -1440,8 +1454,8 @@ namespace embree
|
||||
PrimRef * __restrict__ l_dest = prims + current.begin + thread_start_left;
|
||||
PrimRef * __restrict__ r_dest = prims + current.begin + thread_start_right + bestSplitNumLeft;
|
||||
|
||||
__align(64) Centroid_Scene_AABB local_left;
|
||||
__align(64) Centroid_Scene_AABB local_right;
|
||||
__aligned(64) Centroid_Scene_AABB local_left;
|
||||
__aligned(64) Centroid_Scene_AABB local_right;
|
||||
|
||||
parallelPartitioning(current,l_source,r_source,l_dest,r_dest,sd.split,local_left,local_right);
|
||||
|
||||
|
||||
@@ -126,30 +126,30 @@ namespace embree
|
||||
static const size_t SIZE_GLOBAL_WORK_STACK = 512;
|
||||
static const size_t SIZE_LOCAL_WORK_STACK = 16;
|
||||
|
||||
__align(64) WorkStack<BuildRecord,SIZE_GLOBAL_WORK_STACK> global_workStack;
|
||||
__align(64) WorkStack<BuildRecord,SIZE_LOCAL_WORK_STACK> local_workStack[MAX_MIC_CORES];
|
||||
__aligned(64) WorkStack<BuildRecord,SIZE_GLOBAL_WORK_STACK> global_workStack;
|
||||
__aligned(64) WorkStack<BuildRecord,SIZE_LOCAL_WORK_STACK> local_workStack[MAX_MIC_CORES];
|
||||
|
||||
public:
|
||||
|
||||
/* shared structure for multi-threaded binning and partitioning */
|
||||
struct __align(64) SharedBinningPartitionData
|
||||
struct __aligned(64) SharedBinningPartitionData
|
||||
{
|
||||
__align(64) BuildRecord rec;
|
||||
__align(64) Centroid_Scene_AABB left;
|
||||
__align(64) Centroid_Scene_AABB right;
|
||||
__align(64) Split split;
|
||||
__align(64) AlignedAtomicCounter32 lCounter;
|
||||
__align(64) AlignedAtomicCounter32 rCounter;
|
||||
__aligned(64) BuildRecord rec;
|
||||
__aligned(64) Centroid_Scene_AABB left;
|
||||
__aligned(64) Centroid_Scene_AABB right;
|
||||
__aligned(64) Split split;
|
||||
__aligned(64) AlignedAtomicCounter32 lCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 rCounter;
|
||||
};
|
||||
|
||||
/* single structure for all worker threads */
|
||||
__align(64) SharedBinningPartitionData global_sharedData;
|
||||
__aligned(64) SharedBinningPartitionData global_sharedData;
|
||||
|
||||
/* one 16-bins structure per thread */
|
||||
__align(64) Bin16 global_bin16[MAX_MIC_THREADS];
|
||||
__aligned(64) Bin16 global_bin16[MAX_MIC_THREADS];
|
||||
|
||||
/* one shared binning/partitoning structure per core */
|
||||
__align(64) SharedBinningPartitionData local_sharedData[MAX_MIC_CORES];
|
||||
__aligned(64) SharedBinningPartitionData local_sharedData[MAX_MIC_CORES];
|
||||
|
||||
protected:
|
||||
PrimRef* prims;
|
||||
@@ -169,7 +169,7 @@ namespace embree
|
||||
AlignedAtomicCounter32 atomicID;
|
||||
|
||||
/*! per core lock-step task scheduler */
|
||||
__align(64) LockStepTaskScheduler4ThreadsLocalCore localTaskScheduler[MAX_MIC_CORES];
|
||||
__aligned(64) LockStepTaskScheduler4ThreadsLocalCore localTaskScheduler[MAX_MIC_CORES];
|
||||
|
||||
/*! node allocation */
|
||||
__forceinline unsigned int allocNode(int size)
|
||||
@@ -200,10 +200,17 @@ namespace embree
|
||||
size_t numMaxPrimitives;
|
||||
size_t numMaxPreSplits;
|
||||
|
||||
__align(64) AlignedAtomicCounter32 dest0;
|
||||
__align(64) AlignedAtomicCounter32 dest1;
|
||||
__aligned(64) AlignedAtomicCounter32 dest0;
|
||||
__aligned(64) AlignedAtomicCounter32 dest1;
|
||||
|
||||
TASK_FUNCTION(BVH4iBuilderPreSplits,computePrimRefsPreSplits);
|
||||
static const size_t RADIX_BITS = 8;
|
||||
static const size_t RADIX_BUCKETS = (1 << RADIX_BITS);
|
||||
static const size_t RADIX_BUCKETS_MASK = (RADIX_BUCKETS-1);
|
||||
__aligned(64) unsigned int radixCount[MAX_MIC_THREADS][RADIX_BUCKETS];
|
||||
|
||||
TASK_FUNCTION(BVH4iBuilderPreSplits,countAndComputePrimRefsPreSplits);
|
||||
TASK_FUNCTION(BVH4iBuilderPreSplits,radixSortPreSplitIDs);
|
||||
TASK_FUNCTION(BVH4iBuilderPreSplits,computePrimRefsFromPreSplitIDs);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -17,13 +17,15 @@
|
||||
#include "bvh4i/bvh4i.h"
|
||||
#include "bvh4i/bvh4i_builder.h"
|
||||
|
||||
#define PRESPLIT_SPACE_FACTOR 0.45f
|
||||
#define PRESPLIT_SPACE_FACTOR 0.30f
|
||||
#define PRESPLIT_AREA_THRESHOLD 20.0f
|
||||
#define PRESPLIT_MIN_AREA 0.01f
|
||||
#define NUM_PRESPLITS_PER_TRIANGLE 16
|
||||
#define PRESPLITS_TREE_DEPTH 4
|
||||
#define NUM_PRESPLIT_IDS_PER_BLOCK 8
|
||||
|
||||
#define DBG(x)
|
||||
#define TIMER(x)
|
||||
|
||||
#define L1_PREFETCH_ITEMS 2
|
||||
#define L2_PREFETCH_ITEMS 16
|
||||
@@ -35,6 +37,31 @@ namespace embree
|
||||
/* =================================================================================== */
|
||||
/* =================================================================================== */
|
||||
|
||||
struct __aligned(16) PreSplitID
|
||||
{
|
||||
unsigned int code;
|
||||
float sah;
|
||||
unsigned int groupID;
|
||||
unsigned int primID;
|
||||
|
||||
__forceinline unsigned int get(const unsigned int shift, const unsigned and_mask) const {
|
||||
return (code >> shift) & and_mask;
|
||||
}
|
||||
|
||||
__forceinline unsigned int getByte(const size_t b) const {
|
||||
assert(b < 4);
|
||||
const unsigned char *__restrict const ptr = (const unsigned char*)&code;
|
||||
return ptr[b];
|
||||
}
|
||||
|
||||
__forceinline friend std::ostream &operator<<(std::ostream &o, const PreSplitID& pid) {
|
||||
o << "code " << pid.code << " boxSAH = " << pid.sah << " groupID " << pid.groupID << " primID " << pid.primID;
|
||||
return o;
|
||||
}
|
||||
__forceinline bool operator<(const PreSplitID &pid) const { return code < pid.code; }
|
||||
__forceinline bool operator>(const PreSplitID &pid) const { return code > pid.code; }
|
||||
};
|
||||
|
||||
void BVH4iBuilderPreSplits::printBuilderName()
|
||||
{
|
||||
std::cout << "building BVH4i with presplits-based SAH builder (MIC) ... " << std::endl;
|
||||
@@ -131,34 +158,6 @@ namespace embree
|
||||
return sqrt(ldot3_xyz(n,n)) * 0.5f;
|
||||
}
|
||||
|
||||
void quicksort_ascending_primrefs(PrimRef *__restrict__ t,
|
||||
const ssize_t begin,
|
||||
const ssize_t end)
|
||||
{
|
||||
if (likely(begin < end))
|
||||
{
|
||||
const PrimRef pivotvalue = t[begin];
|
||||
ssize_t left = begin - 1;
|
||||
ssize_t right = end + 1;
|
||||
|
||||
while(1)
|
||||
{
|
||||
while (box_sah(t[--right]) > box_sah(pivotvalue));
|
||||
while (box_sah(t[++left]) < box_sah(pivotvalue));
|
||||
|
||||
if (left >= right) break;
|
||||
|
||||
const PrimRef temp = t[right];
|
||||
t[right] = t[left];
|
||||
t[left] = temp;
|
||||
}
|
||||
|
||||
const int pivot = right;
|
||||
quicksort_ascending_primrefs(t, begin, pivot);
|
||||
quicksort_ascending_primrefs(t, pivot + 1, end);
|
||||
}
|
||||
}
|
||||
|
||||
__forceinline size_t getMaxDim(const PrimRef &p)
|
||||
{
|
||||
Vec3fa diag = p.upper - p.lower;
|
||||
@@ -206,96 +205,87 @@ namespace embree
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BVH4iBuilderPreSplits::computePrimRefs(const size_t threadIndex, const size_t threadCount)
|
||||
{
|
||||
DBG(PING);
|
||||
TIMER(double msec = 0.0);
|
||||
TIMER(msec = getSeconds());
|
||||
|
||||
dest0.reset(0);
|
||||
dest1.reset(numPrimitives-1);
|
||||
|
||||
LockStepTaskScheduler::dispatchTask( task_computePrimRefsPreSplits, this, threadIndex, threadCount );
|
||||
|
||||
const size_t startFactor = dest0;
|
||||
const size_t numFactorTris = numPrimitives - startFactor;
|
||||
|
||||
DBG(
|
||||
DBG_PRINT( startFactor );
|
||||
DBG_PRINT( numFactorTris );
|
||||
);
|
||||
|
||||
quicksort_ascending_primrefs(prims,startFactor, numPrimitives-1);
|
||||
|
||||
PrimRef *presplits = (PrimRef*)accel;
|
||||
|
||||
const size_t step = (numMaxPreSplits+NUM_PRESPLITS_PER_TRIANGLE-1) / NUM_PRESPLITS_PER_TRIANGLE;
|
||||
|
||||
|
||||
const size_t startPreSplits = numPrimitives - step;
|
||||
dest0 = startPreSplits;
|
||||
|
||||
DBG(
|
||||
DBG_PRINT(step);
|
||||
DBG_PRINT(dest0);
|
||||
DBG_PRINT(numPrimitives);
|
||||
);
|
||||
|
||||
dest1.reset(0);
|
||||
|
||||
LockStepTaskScheduler::dispatchTask( task_countAndComputePrimRefsPreSplits, this, threadIndex, threadCount );
|
||||
|
||||
for (size_t i=dest0;i<numPrimitives;i++)
|
||||
{
|
||||
const size_t geomID = prims[i].geomID();
|
||||
const size_t primID = prims[i].primID();
|
||||
/* === padding to 8-wide blocks === */
|
||||
const unsigned int preSplits = dest1;
|
||||
const unsigned int preSplits_padded = ((preSplits+NUM_PRESPLIT_IDS_PER_BLOCK-1)&(-NUM_PRESPLIT_IDS_PER_BLOCK));
|
||||
PreSplitID* __restrict__ const dest = (PreSplitID*)accel;
|
||||
|
||||
for (size_t i=preSplits; i<preSplits_padded; i++) {
|
||||
dest[i].code = 0xffffffff;
|
||||
dest[i].sah = 0;
|
||||
dest[i].groupID = 0;
|
||||
dest[i].primID = 0;
|
||||
}
|
||||
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(geomID);
|
||||
const TriangleMeshScene::TriangleMesh::Triangle & tri = mesh->triangle(primID);
|
||||
TIMER(msec = getSeconds()-msec);
|
||||
TIMER(std::cout << "task_countAndComputePrimRefsPreSplits " << 1000. * msec << " ms" << std::endl << std::flush);
|
||||
|
||||
const float *__restrict__ const vptr0 = (float*)&mesh->vertex(tri.v[0]);
|
||||
const float *__restrict__ const vptr1 = (float*)&mesh->vertex(tri.v[1]);
|
||||
const float *__restrict__ const vptr2 = (float*)&mesh->vertex(tri.v[2]);
|
||||
|
||||
Vec3fa vtxA = *(Vec3fa*)vptr0;
|
||||
Vec3fa vtxB = *(Vec3fa*)vptr1;
|
||||
Vec3fa vtxC = *(Vec3fa*)vptr2;
|
||||
const size_t step = (numMaxPreSplits+NUM_PRESPLITS_PER_TRIANGLE-1) / NUM_PRESPLITS_PER_TRIANGLE;
|
||||
const size_t startPreSplits = (step <= preSplits) ? preSplits - step : preSplits;
|
||||
|
||||
BBox3f bounds = empty;
|
||||
bounds.extend(vtxA);
|
||||
bounds.extend(vtxB);
|
||||
bounds.extend(vtxC);
|
||||
PrimRef primBounds = PrimRef(bounds,geomID,primID);
|
||||
|
||||
subdivideTriangle(primBounds,vtxA,vtxB,vtxC,PRESPLITS_TREE_DEPTH,dest1,presplits);
|
||||
|
||||
}
|
||||
DBG(
|
||||
DBG_PRINT(numPrimitives);
|
||||
DBG_PRINT(preSplits);
|
||||
DBG_PRINT(preSplits_padded);
|
||||
DBG_PRINT(dest0);
|
||||
DBG_PRINT(dest1);
|
||||
DBG_PRINT(step);
|
||||
DBG_PRINT(startPreSplits);
|
||||
);
|
||||
|
||||
assert( startPreSplits + dest1 < numMaxPrimitives);
|
||||
TIMER(msec = getSeconds());
|
||||
|
||||
for (size_t i=0;i<dest1;i++)
|
||||
prims[startPreSplits + i] = presplits[i];
|
||||
LockStepTaskScheduler::dispatchTask( task_radixSortPreSplitIDs, this, threadIndex, threadCount );
|
||||
|
||||
numPrimitives = dest1 + startPreSplits;
|
||||
//numPrimitives = startPreSplits;
|
||||
TIMER(msec = getSeconds()-msec);
|
||||
TIMER(std::cout << "task_radixSortPreSplitIDs " << 1000. * msec << " ms" << std::endl << std::flush);
|
||||
|
||||
|
||||
TIMER(msec = getSeconds());
|
||||
|
||||
LockStepTaskScheduler::dispatchTask( task_computePrimRefsFromPreSplitIDs, this, threadIndex, threadCount );
|
||||
|
||||
TIMER(msec = getSeconds()-msec);
|
||||
TIMER(std::cout << "task_computePrimRefsFromPreSplitIDs " << 1000. * msec << " ms" << std::endl << std::flush);
|
||||
|
||||
|
||||
numPrimitives = dest0;
|
||||
|
||||
DBG(
|
||||
DBG_PRINT(numPrimitives);
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BVH4iBuilderPreSplits::computePrimRefsPreSplits(const size_t threadID, const size_t numThreads)
|
||||
void BVH4iBuilderPreSplits::countAndComputePrimRefsPreSplits(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
DBG(PING);
|
||||
const size_t numGroups = scene->size();
|
||||
const size_t startID = (threadID+0)*numPrimitives/numThreads;
|
||||
const size_t endID = (threadID+1)*numPrimitives/numThreads;
|
||||
|
||||
PrimRef *__restrict__ const prims = this->prims;
|
||||
|
||||
// === find first group containing startID ===
|
||||
unsigned int g=0, numSkipped = 0;
|
||||
for (; g<numGroups; g++) {
|
||||
if (unlikely(scene->get(g) == NULL)) continue;
|
||||
if (unlikely(scene->get(g)->type != TRIANGLE_MESH)) continue;
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(g);
|
||||
unsigned int startGroup=0, numSkipped = 0;
|
||||
for (; startGroup<numGroups; startGroup++) {
|
||||
if (unlikely(scene->get(startGroup) == NULL)) continue;
|
||||
if (unlikely(scene->get(startGroup)->type != TRIANGLE_MESH)) continue;
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(startGroup);
|
||||
if (unlikely(!mesh->isEnabled())) continue;
|
||||
if (unlikely(mesh->numTimeSteps != 1)) continue;
|
||||
|
||||
@@ -310,75 +300,66 @@ namespace embree
|
||||
mic_f bounds_centroid_min((float)pos_inf);
|
||||
mic_f bounds_centroid_max((float)neg_inf);
|
||||
|
||||
unsigned int num = 0;
|
||||
unsigned int currentID = startID;
|
||||
unsigned int offset = startID - numSkipped;
|
||||
unsigned int numTrisNoPreSplit = 0;
|
||||
unsigned int numTrisPreSplit = 0;
|
||||
|
||||
for (; g<numGroups; g++)
|
||||
// === determine presplit candidates ===
|
||||
{
|
||||
if (unlikely(scene->get(g) == NULL)) continue;
|
||||
if (unlikely(scene->get(g)->type != TRIANGLE_MESH)) continue;
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(g);
|
||||
if (unlikely(!mesh->isEnabled())) continue;
|
||||
if (unlikely(mesh->numTimeSteps != 1)) continue;
|
||||
unsigned int currentID = startID;
|
||||
unsigned int offset = startID - numSkipped;
|
||||
for (unsigned int g=startGroup; g<numGroups; g++)
|
||||
{
|
||||
if (unlikely(scene->get(g) == NULL)) continue;
|
||||
if (unlikely(scene->get(g)->type != TRIANGLE_MESH)) continue;
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(g);
|
||||
if (unlikely(!mesh->isEnabled())) continue;
|
||||
if (unlikely(mesh->numTimeSteps != 1)) continue;
|
||||
|
||||
for (unsigned int i=offset; i<mesh->numTriangles && currentID < endID; i++, currentID++)
|
||||
{
|
||||
const TriangleMeshScene::TriangleMesh::Triangle& tri = mesh->triangle(i);
|
||||
prefetch<PFHINT_L2>(&tri + L2_PREFETCH_ITEMS);
|
||||
prefetch<PFHINT_L1>(&tri + L1_PREFETCH_ITEMS);
|
||||
for (unsigned int i=offset; i<mesh->numTriangles && currentID < endID; i++, currentID++)
|
||||
{
|
||||
const TriangleMeshScene::TriangleMesh::Triangle& tri = mesh->triangle(i);
|
||||
prefetch<PFHINT_L2>(&tri + L2_PREFETCH_ITEMS);
|
||||
prefetch<PFHINT_L1>(&tri + L1_PREFETCH_ITEMS);
|
||||
|
||||
const float *__restrict__ const vptr0 = (float*)&mesh->vertex(tri.v[0]);
|
||||
const float *__restrict__ const vptr1 = (float*)&mesh->vertex(tri.v[1]);
|
||||
const float *__restrict__ const vptr2 = (float*)&mesh->vertex(tri.v[2]);
|
||||
const float *__restrict__ const vptr0 = (float*)&mesh->vertex(tri.v[0]);
|
||||
const float *__restrict__ const vptr1 = (float*)&mesh->vertex(tri.v[1]);
|
||||
const float *__restrict__ const vptr2 = (float*)&mesh->vertex(tri.v[2]);
|
||||
|
||||
const mic_f v0 = broadcast4to16f(vptr0);
|
||||
const mic_f v1 = broadcast4to16f(vptr1);
|
||||
const mic_f v2 = broadcast4to16f(vptr2);
|
||||
const mic_f v0 = broadcast4to16f(vptr0);
|
||||
const mic_f v1 = broadcast4to16f(vptr1);
|
||||
const mic_f v2 = broadcast4to16f(vptr2);
|
||||
|
||||
mic_f bmin = min(min(v0,v1),v2);
|
||||
mic_f bmax = max(max(v0,v1),v2);
|
||||
mic_f bmin = min(min(v0,v1),v2);
|
||||
mic_f bmax = max(max(v0,v1),v2);
|
||||
|
||||
|
||||
const mic_f area_tri = tri_sah(v0,v1,v2);
|
||||
const mic_f area_box = box_sah(bmin,bmax);
|
||||
const mic_f factor = area_box * rcp(area_tri);
|
||||
const mic_f area_tri = tri_sah(v0,v1,v2);
|
||||
const mic_f area_box = box_sah(bmin,bmax);
|
||||
const mic_f factor = area_box * rcp(area_tri);
|
||||
|
||||
DBG(
|
||||
DBG_PRINT(area_tri);
|
||||
DBG_PRINT(area_box);
|
||||
DBG_PRINT(factor);
|
||||
);
|
||||
DBG(
|
||||
DBG_PRINT(area_tri);
|
||||
DBG_PRINT(area_box);
|
||||
DBG_PRINT(factor);
|
||||
);
|
||||
|
||||
const mic_m m_factor = factor > PRESPLIT_AREA_THRESHOLD;
|
||||
const mic_m m_sah_zero = area_box > PRESPLIT_MIN_AREA;
|
||||
const mic_m m_factor = factor > PRESPLIT_AREA_THRESHOLD;
|
||||
const mic_m m_sah_zero = area_box > PRESPLIT_MIN_AREA;
|
||||
|
||||
if (any(m_factor & m_sah_zero))
|
||||
{
|
||||
const unsigned int d_index = dest1.dec();
|
||||
store4f(&prims[d_index].lower,bmin);
|
||||
store4f(&prims[d_index].upper,bmax);
|
||||
prims[d_index].lower.a = g;
|
||||
prims[d_index].upper.a = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
const unsigned int d_index = dest0.inc();
|
||||
store4f(&prims[d_index].lower,bmin);
|
||||
store4f(&prims[d_index].upper,bmax);
|
||||
prims[d_index].lower.a = g;
|
||||
prims[d_index].upper.a = i;
|
||||
}
|
||||
if (any(m_factor & m_sah_zero))
|
||||
numTrisPreSplit++;
|
||||
else
|
||||
numTrisNoPreSplit++;
|
||||
|
||||
bounds_scene_min = min(bounds_scene_min,bmin);
|
||||
bounds_scene_max = max(bounds_scene_max,bmax);
|
||||
const mic_f centroid2 = bmin+bmax;
|
||||
bounds_centroid_min = min(bounds_centroid_min,centroid2);
|
||||
bounds_centroid_max = max(bounds_centroid_max,centroid2);
|
||||
|
||||
}
|
||||
if (currentID == endID) break;
|
||||
offset = 0;
|
||||
bounds_scene_min = min(bounds_scene_min,bmin);
|
||||
bounds_scene_max = max(bounds_scene_max,bmax);
|
||||
const mic_f centroid2 = bmin+bmax;
|
||||
bounds_centroid_min = min(bounds_centroid_min,centroid2);
|
||||
bounds_centroid_max = max(bounds_centroid_max,centroid2);
|
||||
}
|
||||
if (currentID == endID) break;
|
||||
offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* update global bounds */
|
||||
@@ -390,8 +371,304 @@ namespace embree
|
||||
store4f(&bounds.geometry.upper,bounds_scene_max);
|
||||
|
||||
global_bounds.extend_atomic(bounds);
|
||||
|
||||
|
||||
const unsigned int no_presplit_index = dest0.add(numTrisNoPreSplit);
|
||||
const unsigned int presplit_index = dest1.add(numTrisPreSplit);
|
||||
|
||||
PrimRef *presplits = (PrimRef*)accel;
|
||||
|
||||
PrimRef *__restrict__ no_presplit_prims = this->prims + no_presplit_index;
|
||||
PreSplitID *__restrict__ presplitIDs = (PreSplitID*)accel + presplit_index;
|
||||
|
||||
|
||||
// === put triangles into prepsplit/no-presplit bucket ===
|
||||
{
|
||||
unsigned int currentID = startID;
|
||||
unsigned int offset = startID - numSkipped;
|
||||
for (unsigned int g=startGroup; g<numGroups; g++)
|
||||
{
|
||||
if (unlikely(scene->get(g) == NULL)) continue;
|
||||
if (unlikely(scene->get(g)->type != TRIANGLE_MESH)) continue;
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(g);
|
||||
if (unlikely(!mesh->isEnabled())) continue;
|
||||
if (unlikely(mesh->numTimeSteps != 1)) continue;
|
||||
|
||||
for (unsigned int i=offset; i<mesh->numTriangles && currentID < endID; i++, currentID++)
|
||||
{
|
||||
const TriangleMeshScene::TriangleMesh::Triangle& tri = mesh->triangle(i);
|
||||
prefetch<PFHINT_L2>(&tri + L2_PREFETCH_ITEMS);
|
||||
prefetch<PFHINT_L1>(&tri + L1_PREFETCH_ITEMS);
|
||||
|
||||
const float *__restrict__ const vptr0 = (float*)&mesh->vertex(tri.v[0]);
|
||||
const float *__restrict__ const vptr1 = (float*)&mesh->vertex(tri.v[1]);
|
||||
const float *__restrict__ const vptr2 = (float*)&mesh->vertex(tri.v[2]);
|
||||
|
||||
const mic_f v0 = broadcast4to16f(vptr0);
|
||||
const mic_f v1 = broadcast4to16f(vptr1);
|
||||
const mic_f v2 = broadcast4to16f(vptr2);
|
||||
|
||||
mic_f bmin = min(min(v0,v1),v2);
|
||||
mic_f bmax = max(max(v0,v1),v2);
|
||||
|
||||
|
||||
const mic_f area_tri = tri_sah(v0,v1,v2);
|
||||
const mic_f area_box = box_sah(bmin,bmax);
|
||||
const mic_f factor = area_box * rcp(area_tri);
|
||||
|
||||
DBG(
|
||||
DBG_PRINT(area_tri);
|
||||
DBG_PRINT(area_box);
|
||||
DBG_PRINT(factor);
|
||||
);
|
||||
|
||||
const mic_m m_factor = factor > PRESPLIT_AREA_THRESHOLD;
|
||||
const mic_m m_sah_zero = area_box > PRESPLIT_MIN_AREA;
|
||||
|
||||
if (any(m_factor & m_sah_zero))
|
||||
{
|
||||
prefetch<PFHINT_L2EX>(presplitIDs + 4*4);
|
||||
|
||||
store1f(&presplitIDs->code,area_box);
|
||||
store1f(&presplitIDs->sah,factor);
|
||||
presplitIDs->groupID = g;
|
||||
presplitIDs->primID = i;
|
||||
presplitIDs++;
|
||||
}
|
||||
else
|
||||
{
|
||||
prefetch<PFHINT_L2EX>(no_presplit_prims + L2_PREFETCH_ITEMS);
|
||||
|
||||
store4f(&no_presplit_prims->lower,bmin);
|
||||
store4f(&no_presplit_prims->upper,bmax);
|
||||
no_presplit_prims->lower.a = g;
|
||||
no_presplit_prims->upper.a = i;
|
||||
no_presplit_prims++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (currentID == endID) break;
|
||||
offset = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BVH4iBuilderPreSplits::radixSortPreSplitIDs(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
const unsigned int preSplits = dest1;
|
||||
const size_t numBlocks = (preSplits+NUM_PRESPLIT_IDS_PER_BLOCK-1) / NUM_PRESPLIT_IDS_PER_BLOCK;
|
||||
const size_t startID = ((threadID+0)*numBlocks/numThreads) * NUM_PRESPLIT_IDS_PER_BLOCK;
|
||||
const size_t endID = ((threadID+1)*numBlocks/numThreads) * NUM_PRESPLIT_IDS_PER_BLOCK;
|
||||
assert(startID % NUM_PRESPLIT_IDS_PER_BLOCK == 0);
|
||||
assert(endID % NUM_PRESPLIT_IDS_PER_BLOCK == 0);
|
||||
|
||||
assert(((numThreads)*numBlocks/numThreads) * NUM_PRESPLIT_IDS_PER_BLOCK == ((preSplits+7)&(-8)));
|
||||
|
||||
|
||||
PreSplitID* __restrict__ presplitID[2];
|
||||
presplitID[0] = (PreSplitID*)accel;
|
||||
presplitID[1] = (PreSplitID*)accel + ((preSplits+NUM_PRESPLIT_IDS_PER_BLOCK-1)&(-NUM_PRESPLIT_IDS_PER_BLOCK));
|
||||
|
||||
|
||||
/* we need 4 iterations to process all 32 bits */
|
||||
for (size_t b=0; b<4; b++)
|
||||
{
|
||||
const PreSplitID* __restrict__ const src = (PreSplitID*)presplitID[((b+0)%2)];
|
||||
PreSplitID* __restrict__ const dst = (PreSplitID*)presplitID[((b+1)%2)];
|
||||
|
||||
__assume_aligned(&radixCount[threadID][0],64);
|
||||
|
||||
/* count how many items go into the buckets */
|
||||
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
store16i(&radixCount[threadID][i*16],mic_i::zero());
|
||||
|
||||
|
||||
for (size_t i=startID; i<endID; i+=NUM_PRESPLIT_IDS_PER_BLOCK) {
|
||||
prefetch<PFHINT_NT>(&src[i+L1_PREFETCH_ITEMS]);
|
||||
prefetch<PFHINT_L2>(&src[i+L2_PREFETCH_ITEMS]);
|
||||
|
||||
#pragma unroll(NUM_PRESPLIT_IDS_PER_BLOCK)
|
||||
for (unsigned long j=0;j<NUM_PRESPLIT_IDS_PER_BLOCK;j++)
|
||||
{
|
||||
const unsigned int index = src[i+j].getByte(b);
|
||||
radixCount[threadID][index]++;
|
||||
}
|
||||
}
|
||||
|
||||
LockStepTaskScheduler::syncThreads(threadID,numThreads);
|
||||
|
||||
|
||||
/* calculate total number of items for each bucket */
|
||||
|
||||
|
||||
mic_i count[16];
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
count[i] = mic_i::zero();
|
||||
|
||||
|
||||
for (size_t i=0; i<threadID; i++)
|
||||
#pragma unroll(16)
|
||||
for (size_t j=0; j<16; j++)
|
||||
count[j] += load16i((int*)&radixCount[i][j*16]);
|
||||
|
||||
__aligned(64) unsigned int inner_offset[RADIX_BUCKETS];
|
||||
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
store16i(&inner_offset[i*16],count[i]);
|
||||
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
count[i] = load16i((int*)&inner_offset[i*16]);
|
||||
|
||||
for (size_t i=threadID; i<numThreads; i++)
|
||||
#pragma unroll(16)
|
||||
for (size_t j=0; j<16; j++)
|
||||
count[j] += load16i((int*)&radixCount[i][j*16]);
|
||||
|
||||
__aligned(64) unsigned int total[RADIX_BUCKETS];
|
||||
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
store16i(&total[i*16],count[i]);
|
||||
|
||||
__aligned(64) unsigned int offset[RADIX_BUCKETS];
|
||||
|
||||
/* calculate start offset of each bucket */
|
||||
offset[0] = 0;
|
||||
for (size_t i=1; i<RADIX_BUCKETS; i++)
|
||||
offset[i] = offset[i-1] + total[i-1];
|
||||
|
||||
/* calculate start offset of each bucket for this thread */
|
||||
|
||||
#pragma unroll(RADIX_BUCKETS)
|
||||
for (size_t j=0; j<RADIX_BUCKETS; j++)
|
||||
offset[j] += inner_offset[j];
|
||||
|
||||
/* copy items into their buckets */
|
||||
for (size_t i=startID; i<endID; i+=NUM_PRESPLIT_IDS_PER_BLOCK) {
|
||||
prefetch<PFHINT_NT>(&src[i+L1_PREFETCH_ITEMS]);
|
||||
prefetch<PFHINT_L2>(&src[i+L2_PREFETCH_ITEMS]);
|
||||
|
||||
#pragma nounroll
|
||||
for (unsigned long j=0;j<NUM_PRESPLIT_IDS_PER_BLOCK;j++)
|
||||
{
|
||||
const unsigned int index = src[i+j].getByte(b);
|
||||
assert(index < RADIX_BUCKETS);
|
||||
dst[offset[index]] = src[i+j];
|
||||
prefetch<PFHINT_L2EX>(&dst[offset[index]+L1_PREFETCH_ITEMS]);
|
||||
offset[index]++;
|
||||
}
|
||||
evictL2(&src[i]);
|
||||
}
|
||||
|
||||
if (b<3) LockStepTaskScheduler::syncThreads(threadID,numThreads);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void BVH4iBuilderPreSplits::computePrimRefsFromPreSplitIDs(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
const size_t preSplitIDs = dest1;
|
||||
const size_t step = (numMaxPreSplits+NUM_PRESPLITS_PER_TRIANGLE-1) / NUM_PRESPLITS_PER_TRIANGLE;
|
||||
const size_t startPreSplits = (step <= preSplitIDs) ? preSplitIDs - step : preSplitIDs;
|
||||
|
||||
// === no pre-splits ==
|
||||
{
|
||||
const size_t startID = (threadID+0)*startPreSplits/numThreads;
|
||||
const size_t endID = (threadID+1)*startPreSplits/numThreads;
|
||||
const size_t items = endID - startID;
|
||||
const unsigned int d_index = dest0.add(items);
|
||||
|
||||
PrimRef *__restrict__ prims = this->prims + d_index;
|
||||
PreSplitID *__restrict__ presplitIDs = (PreSplitID*)accel;
|
||||
|
||||
for (size_t i=startID;i<endID;i++)
|
||||
{
|
||||
prefetch<PFHINT_L2>(&presplitIDs[i] + L2_PREFETCH_ITEMS);
|
||||
prefetch<PFHINT_L1>(&presplitIDs[i] + L1_PREFETCH_ITEMS);
|
||||
|
||||
const size_t geomID = presplitIDs[i].groupID;
|
||||
const size_t primID = presplitIDs[i].primID;
|
||||
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(geomID);
|
||||
const TriangleMeshScene::TriangleMesh::Triangle & tri = mesh->triangle(primID);
|
||||
|
||||
const float *__restrict__ const vptr0 = (float*)&mesh->vertex(tri.v[0]);
|
||||
const float *__restrict__ const vptr1 = (float*)&mesh->vertex(tri.v[1]);
|
||||
const float *__restrict__ const vptr2 = (float*)&mesh->vertex(tri.v[2]);
|
||||
|
||||
const mic_f v0 = broadcast4to16f(vptr0);
|
||||
const mic_f v1 = broadcast4to16f(vptr1);
|
||||
const mic_f v2 = broadcast4to16f(vptr2);
|
||||
|
||||
prefetch<PFHINT_L1EX>(prims);
|
||||
|
||||
mic_f bmin = min(min(v0,v1),v2);
|
||||
mic_f bmax = max(max(v0,v1),v2);
|
||||
|
||||
prefetch<PFHINT_L2EX>(prims + L2_PREFETCH_ITEMS);
|
||||
|
||||
store4f(&prims->lower,bmin);
|
||||
store4f(&prims->upper,bmax);
|
||||
prims->lower.a = geomID;
|
||||
prims->upper.a = primID;
|
||||
prims++;
|
||||
}
|
||||
}
|
||||
|
||||
// === performing pre-splitting ==
|
||||
{
|
||||
AlignedAtomicCounter32 counter;
|
||||
counter.reset(0);
|
||||
|
||||
const unsigned int numPreSplits = preSplitIDs - startPreSplits;
|
||||
const size_t startID = (threadID+0)*numPreSplits/numThreads;
|
||||
const size_t endID = (threadID+1)*numPreSplits/numThreads;
|
||||
const size_t items = (endID - startID)*NUM_PRESPLITS_PER_TRIANGLE;
|
||||
const unsigned int d_index = dest0.add(items);
|
||||
|
||||
PrimRef *__restrict__ prims = this->prims + d_index;
|
||||
PreSplitID *__restrict__ presplitIDs = (PreSplitID*)accel + startPreSplits;
|
||||
|
||||
for (size_t i=startID;i<endID;i++)
|
||||
{
|
||||
prefetch<PFHINT_L2>(&presplitIDs[i] + L2_PREFETCH_ITEMS);
|
||||
prefetch<PFHINT_L1>(&presplitIDs[i] + L1_PREFETCH_ITEMS);
|
||||
|
||||
const size_t geomID = presplitIDs[i].groupID;
|
||||
const size_t primID = presplitIDs[i].primID;
|
||||
|
||||
const TriangleMeshScene::TriangleMesh* __restrict__ const mesh = scene->getTriangleMesh(geomID);
|
||||
const TriangleMeshScene::TriangleMesh::Triangle & tri = mesh->triangle(primID);
|
||||
|
||||
const float *__restrict__ const vptr0 = (float*)&mesh->vertex(tri.v[0]);
|
||||
const float *__restrict__ const vptr1 = (float*)&mesh->vertex(tri.v[1]);
|
||||
const float *__restrict__ const vptr2 = (float*)&mesh->vertex(tri.v[2]);
|
||||
|
||||
Vec3fa vtxA = *(Vec3fa*)vptr0;
|
||||
Vec3fa vtxB = *(Vec3fa*)vptr1;
|
||||
Vec3fa vtxC = *(Vec3fa*)vptr2;
|
||||
|
||||
BBox3f bounds = empty;
|
||||
bounds.extend(vtxA);
|
||||
bounds.extend(vtxB);
|
||||
bounds.extend(vtxC);
|
||||
PrimRef primBounds = PrimRef(bounds,geomID,primID);
|
||||
|
||||
subdivideTriangle(primBounds,vtxA,vtxB,vtxC,PRESPLITS_TREE_DEPTH,counter,prims);
|
||||
}
|
||||
assert(counter == items);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* =================================================================================== */
|
||||
/* =================================================================================== */
|
||||
/* =================================================================================== */
|
||||
@@ -480,28 +757,28 @@ namespace embree
|
||||
|
||||
size_t N = virtual_geometry->size();
|
||||
for (unsigned int i=offset; i<N && currentID < endID; i++, currentID++)
|
||||
{
|
||||
const BBox3f bounds = virtual_geometry->bounds(i);
|
||||
const mic_f bmin = broadcast4to16f(&bounds.lower);
|
||||
const mic_f bmax = broadcast4to16f(&bounds.upper);
|
||||
{
|
||||
const BBox3f bounds = virtual_geometry->bounds(i);
|
||||
const mic_f bmin = broadcast4to16f(&bounds.lower);
|
||||
const mic_f bmax = broadcast4to16f(&bounds.upper);
|
||||
|
||||
DBG(
|
||||
DBG_PRINT(currentID);
|
||||
DBG_PRINT(bmin);
|
||||
DBG_PRINT(bmax);
|
||||
);
|
||||
DBG(
|
||||
DBG_PRINT(currentID);
|
||||
DBG_PRINT(bmin);
|
||||
DBG_PRINT(bmax);
|
||||
);
|
||||
|
||||
bounds_scene_min = min(bounds_scene_min,bmin);
|
||||
bounds_scene_max = max(bounds_scene_max,bmax);
|
||||
const mic_f centroid2 = bmin+bmax;
|
||||
bounds_centroid_min = min(bounds_centroid_min,centroid2);
|
||||
bounds_centroid_max = max(bounds_centroid_max,centroid2);
|
||||
bounds_scene_min = min(bounds_scene_min,bmin);
|
||||
bounds_scene_max = max(bounds_scene_max,bmax);
|
||||
const mic_f centroid2 = bmin+bmax;
|
||||
bounds_centroid_min = min(bounds_centroid_min,centroid2);
|
||||
bounds_centroid_max = max(bounds_centroid_max,centroid2);
|
||||
|
||||
store4f(&prims[currentID].lower,bmin);
|
||||
store4f(&prims[currentID].upper,bmax);
|
||||
prims[currentID].lower.a = g;
|
||||
prims[currentID].upper.a = i;
|
||||
}
|
||||
store4f(&prims[currentID].lower,bmin);
|
||||
store4f(&prims[currentID].upper,bmax);
|
||||
prims[currentID].lower.a = g;
|
||||
prims[currentID].upper.a = i;
|
||||
}
|
||||
if (currentID == endID) break;
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace embree
|
||||
// =======================================================================================================
|
||||
// =======================================================================================================
|
||||
|
||||
__align(64) static double dt = 0.0f;
|
||||
__aligned(64) static double dt = 0.0f;
|
||||
|
||||
BVH4iBuilderMorton::BVH4iBuilderMorton (BVH4i* bvh, BuildSource* source, void* geometry)
|
||||
: bvh(bvh), source(source), scene((Scene*)geometry), topLevelItemThreshold(0), encodeShift(0), encodeMask(0), numBuildRecords(0),
|
||||
@@ -140,9 +140,11 @@ namespace embree
|
||||
assert(node != 0);
|
||||
assert(accel != 0);
|
||||
|
||||
#if 0
|
||||
memset(morton,0,size_morton_tmp);
|
||||
memset(node ,0,size_node);
|
||||
memset(accel ,0,size_accel);
|
||||
#endif
|
||||
|
||||
bvh->accel = accel;
|
||||
bvh->qbvh = (BVH4i::Node*)node;
|
||||
@@ -267,7 +269,7 @@ namespace embree
|
||||
const size_t endID = min( ((threadID+1)*numBlocks/numThreads) * NUM_MORTON_IDS_PER_BLOCK ,numPrimitives) ;
|
||||
assert(startID % NUM_MORTON_IDS_PER_BLOCK == 0);
|
||||
|
||||
__align(64) Centroid_Scene_AABB bounds;
|
||||
__aligned(64) Centroid_Scene_AABB bounds;
|
||||
bounds.reset();
|
||||
|
||||
size_t currentID = startID;
|
||||
@@ -622,7 +624,7 @@ namespace embree
|
||||
for (size_t j=0; j<16; j++)
|
||||
count[j] += load16i((int*)&radixCount[i][j*16]);
|
||||
|
||||
__align(64) unsigned int inner_offset[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int inner_offset[RADIX_BUCKETS];
|
||||
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
@@ -637,13 +639,13 @@ namespace embree
|
||||
for (size_t j=0; j<16; j++)
|
||||
count[j] += load16i((int*)&radixCount[i][j*16]);
|
||||
|
||||
__align(64) unsigned int total[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int total[RADIX_BUCKETS];
|
||||
|
||||
#pragma unroll(16)
|
||||
for (size_t i=0; i<16; i++)
|
||||
store16i(&total[i*16],count[i]);
|
||||
|
||||
__align(64) unsigned int offset[RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int offset[RADIX_BUCKETS];
|
||||
|
||||
/* calculate start offset of each bucket */
|
||||
offset[0] = 0;
|
||||
@@ -681,7 +683,7 @@ namespace embree
|
||||
void BVH4iBuilderMorton::createTopLevelTree(const size_t threadID, const size_t numThreads)
|
||||
{
|
||||
size_t taskID = threadID;
|
||||
__align(64) SmallBuildRecord children[BVH4i::N];
|
||||
__aligned(64) SmallBuildRecord children[BVH4i::N];
|
||||
|
||||
|
||||
while(taskID < numBuildRecords)
|
||||
@@ -807,7 +809,7 @@ namespace embree
|
||||
store4f(&node[current.parentID].lower,bounds_min);
|
||||
store4f(&node[current.parentID].upper,bounds_max);
|
||||
node[current.parentID].createLeaf(start,items,items);
|
||||
__align(64) BBox3f bounds;
|
||||
__aligned(64) BBox3f bounds;
|
||||
store4f(&bounds.lower,bounds_min);
|
||||
store4f(&bounds.upper,bounds_max);
|
||||
return bounds;
|
||||
@@ -951,7 +953,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) SmallBuildRecord left, right;
|
||||
__aligned(64) SmallBuildRecord left, right;
|
||||
if (!split(children[bestChild],left,right))
|
||||
continue;
|
||||
|
||||
@@ -1004,7 +1006,7 @@ namespace embree
|
||||
}
|
||||
}
|
||||
|
||||
__align(64) SmallBuildRecord children[BVH4i::N];
|
||||
__aligned(64) SmallBuildRecord children[BVH4i::N];
|
||||
|
||||
/* create leaf node */
|
||||
if (unlikely(current.size() <= BVH4iBuilderMorton::MORTON_LEAF_THRESHOLD)) {
|
||||
@@ -1038,7 +1040,7 @@ namespace embree
|
||||
if (bestChild == -1) break;
|
||||
|
||||
/*! split best child into left and right child */
|
||||
__align(64) SmallBuildRecord left, right;
|
||||
__aligned(64) SmallBuildRecord left, right;
|
||||
if (!split(children[bestChild],left,right))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace embree
|
||||
|
||||
public:
|
||||
|
||||
class __align(16) SmallBuildRecord
|
||||
class __aligned(16) SmallBuildRecord
|
||||
{
|
||||
public:
|
||||
unsigned int begin;
|
||||
@@ -73,7 +73,7 @@ namespace embree
|
||||
|
||||
|
||||
|
||||
struct __align(8) MortonID32Bit
|
||||
struct __aligned(8) MortonID32Bit
|
||||
{
|
||||
unsigned int code;
|
||||
unsigned int index;
|
||||
@@ -187,10 +187,10 @@ namespace embree
|
||||
unsigned int encodeShift;
|
||||
unsigned int encodeMask;
|
||||
|
||||
__align(64) LinearBarrierActive barrier;
|
||||
__align(64) SmallBuildRecord buildRecords[MAX_TOP_LEVEL_BINS];
|
||||
__align(64) unsigned int thread_startGroup[MAX_MIC_THREADS];
|
||||
__align(64) unsigned int thread_startGroupOffset[MAX_MIC_THREADS];
|
||||
__aligned(64) LinearBarrierActive barrier;
|
||||
__aligned(64) SmallBuildRecord buildRecords[MAX_TOP_LEVEL_BINS];
|
||||
__aligned(64) unsigned int thread_startGroup[MAX_MIC_THREADS];
|
||||
__aligned(64) unsigned int thread_startGroupOffset[MAX_MIC_THREADS];
|
||||
|
||||
|
||||
/*! state for radix sort */
|
||||
@@ -198,7 +198,7 @@ namespace embree
|
||||
static const size_t RADIX_BITS = 8;
|
||||
static const size_t RADIX_BUCKETS = (1 << RADIX_BITS);
|
||||
static const size_t RADIX_BUCKETS_MASK = (RADIX_BUCKETS-1);
|
||||
__align(64) unsigned int radixCount[MAX_MIC_THREADS][RADIX_BUCKETS];
|
||||
__aligned(64) unsigned int radixCount[MAX_MIC_THREADS][RADIX_BUCKETS];
|
||||
|
||||
protected:
|
||||
MortonID32Bit* __restrict__ morton;
|
||||
@@ -211,11 +211,11 @@ namespace embree
|
||||
size_t numAllocatedNodes;
|
||||
size_t size_morton;
|
||||
|
||||
__align(64) Centroid_Scene_AABB global_bounds;
|
||||
__aligned(64) Centroid_Scene_AABB global_bounds;
|
||||
|
||||
/*! node allocator */
|
||||
__align(64) AlignedAtomicCounter32 atomicID;
|
||||
__align(64) AlignedAtomicCounter32 numBuildRecordCounter;
|
||||
__aligned(64) AlignedAtomicCounter32 atomicID;
|
||||
__aligned(64) AlignedAtomicCounter32 numBuildRecordCounter;
|
||||
|
||||
__forceinline unsigned int allocNode(int size)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
namespace embree
|
||||
{
|
||||
AtomicMutex mtx;
|
||||
__align(64) static double dt = 0.0f;
|
||||
__aligned(64) static double dt = 0.0f;
|
||||
|
||||
BVH4iBuilderMortonEnhanced::BVH4iBuilderMortonEnhanced (BVH4i* _bvh, BuildSource* _source, void* _geometry)
|
||||
: BVH4iBuilderMorton(_bvh,_source,_geometry){}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace embree
|
||||
/* --------------------- Centroid_Scene_AABB --------------------- */
|
||||
/* --------------------------------------------------------------- */
|
||||
|
||||
class __align(64) Centroid_Scene_AABB
|
||||
class __aligned(64) Centroid_Scene_AABB
|
||||
{
|
||||
public:
|
||||
BBox3f centroid2;
|
||||
@@ -106,7 +106,7 @@ namespace embree
|
||||
/* ------------------------- BuildRecord ------------------------- */
|
||||
/* --------------------------------------------------------------- */
|
||||
|
||||
class __align(64) BuildRecord
|
||||
class __aligned(64) BuildRecord
|
||||
{
|
||||
public:
|
||||
Centroid_Scene_AABB bounds; //!< geometry and centroid bounds
|
||||
@@ -186,8 +186,8 @@ namespace embree
|
||||
{
|
||||
ALIGNED_CLASS;
|
||||
public:
|
||||
AlignedAtomicMutex __align(64) mutex;
|
||||
__align(64) T t[SIZE];
|
||||
AlignedAtomicMutex __aligned(64) mutex;
|
||||
__aligned(64) T t[SIZE];
|
||||
|
||||
__forceinline void init() {
|
||||
mutex.reset();
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
namespace embree
|
||||
{
|
||||
|
||||
__align(64) int identity[16] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
|
||||
__align(64) int reverse_identity[16] = { 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 };
|
||||
__aligned(64) int identity[16] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
|
||||
__aligned(64) int reverse_identity[16] = { 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 };
|
||||
|
||||
__forceinline mic_f reverse(const mic_f &a)
|
||||
{
|
||||
@@ -310,7 +310,7 @@ namespace embree
|
||||
}
|
||||
|
||||
|
||||
class __align(64) Bin16
|
||||
class __aligned(64) Bin16
|
||||
{
|
||||
public:
|
||||
mic_f min_x[3];
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace embree
|
||||
{
|
||||
static unsigned int BVH4I_LEAF_MASK = BVH4i::leaf_mask; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
void BVH4iIntersector1::intersect(BVH4i* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
//const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -373,7 +373,7 @@ namespace embree
|
||||
void BVH4iIntersector1::occluded(BVH4i* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic3f rdir16 = rcp_safe(mic3f(ray.dir.x,ray.dir.y,ray.dir.z));
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace embree
|
||||
void BVH4iIntersector16Chunk::intersect(mic_i* valid_i, BVH4i* bvh, Ray16& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m valid0 = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -239,8 +239,8 @@ namespace embree
|
||||
void BVH4iIntersector16Chunk::occluded(mic_i* valid_i, BVH4i* bvh, Ray16& ray)
|
||||
{
|
||||
/* allocate stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
@@ -24,14 +24,14 @@ namespace embree
|
||||
{
|
||||
static unsigned int BVH4I_LEAF_MASK = BVH4i::leaf_mask; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
void BVH4iIntersector16Hybrid::intersect(mic_i* valid_i, BVH4i* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m valid0 = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -595,9 +595,9 @@ namespace embree
|
||||
void BVH4iIntersector16Hybrid::occluded(mic_i* valid_i, BVH4i* bvh, Ray16& ray16)
|
||||
{
|
||||
/* allocate stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace embree
|
||||
|
||||
static unsigned int BVH4I_LEAF_MASK = BVH4i::leaf_mask; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
void BVH4iIntersector16Single::intersect(mic_i* valid_i, BVH4i* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -389,7 +389,7 @@ namespace embree
|
||||
void BVH4iIntersector16Single::occluded(mic_i* valid_i, BVH4i* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace embree
|
||||
void BVH4iIntersector16Virtual<VirtualGeometryIntersector16>::intersect(mic_i* valid_i, BVH4i* bvh, Ray16& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
if (unlikely(bvh == NULL)) return;
|
||||
|
||||
@@ -160,8 +160,8 @@ namespace embree
|
||||
void BVH4iIntersector16Virtual<VirtualGeometryIntersector16>::occluded(mic_i* valid_i, BVH4i* bvh, Ray16& ray)
|
||||
{
|
||||
/* allocate stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
if (unlikely(bvh == NULL)) return;
|
||||
|
||||
@@ -294,8 +294,8 @@ namespace embree
|
||||
void BVH4iIntersector1Virtual<VirtualGeometryIntersector1>::intersect(BVH4i* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
if (unlikely(bvh == NULL)) return;
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace embree
|
||||
void BVH4iIntersector1Virtual<VirtualGeometryIntersector1>::occluded(BVH4i* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
if (unlikely(bvh == NULL)) return;
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ namespace embree
|
||||
void BVH4iIntersector1Scalar::intersect(BVH4i* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const Vec3fa rdir = rcp_safe(ray.dir);
|
||||
@@ -202,7 +202,7 @@ namespace embree
|
||||
{
|
||||
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const Vec3fa rdir = rcp_safe(ray.dir);
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace embree
|
||||
|
||||
/*! BVH4mb Node */
|
||||
|
||||
struct __align(64) Node
|
||||
struct __aligned(64) Node
|
||||
{
|
||||
public:
|
||||
struct NodeStruct {
|
||||
@@ -69,7 +69,7 @@ namespace embree
|
||||
|
||||
/*! BVH4mb Triangle01 */
|
||||
|
||||
struct __align(64) Triangle01
|
||||
struct __aligned(64) Triangle01
|
||||
{
|
||||
public:
|
||||
Triangle1 t0;
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace embree
|
||||
unsigned int currentID = startID;
|
||||
unsigned int offset = startID - numSkipped;
|
||||
|
||||
__align(64) PrimRef local_prims[2];
|
||||
__aligned(64) PrimRef local_prims[2];
|
||||
size_t numLocalPrims = 0;
|
||||
PrimRef *__restrict__ dest = &prims[currentID];
|
||||
|
||||
@@ -444,7 +444,7 @@ namespace embree
|
||||
const size_t items = entry.items();
|
||||
BBox3f* next = (BBox3f*)&node[childrenID+4];
|
||||
|
||||
__align(64) BBox3f local[4];
|
||||
__aligned(64) BBox3f local[4];
|
||||
|
||||
/* init second node */
|
||||
const mic_f init_node = load16f((float*)BVH4i::initQBVHNode);
|
||||
|
||||
@@ -24,13 +24,13 @@ namespace embree
|
||||
{
|
||||
static unsigned int BVH4I_LEAF_MASK = BVH4i::leaf_mask; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
void BVH4mbIntersector1::intersect(BVH4mb* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic3f rdir16 = rcp_safe(mic3f(mic_f(ray.dir.x),mic_f(ray.dir.y),mic_f(ray.dir.z)));
|
||||
@@ -365,7 +365,7 @@ namespace embree
|
||||
void BVH4mbIntersector1::occluded(BVH4mb* bvh, Ray& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic3f rdir16 = rcp_safe(mic3f(ray.dir.x,ray.dir.y,ray.dir.z));
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace embree
|
||||
void BVH4mbIntersector16Chunk::intersect(mic_i* valid_i, BVH4mb* bvh, Ray16& ray)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m valid0 = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -255,8 +255,8 @@ namespace embree
|
||||
void BVH4mbIntersector16Chunk::occluded(mic_i* valid_i, BVH4mb* bvh, Ray16& ray)
|
||||
{
|
||||
/* allocate stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
@@ -23,14 +23,14 @@ namespace embree
|
||||
{
|
||||
static unsigned int BVH4I_LEAF_MASK = BVH4i::leaf_mask; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
void BVH4mbIntersector16Hybrid::intersect(mic_i* valid_i, BVH4mb* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m valid0 = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -602,9 +602,9 @@ namespace embree
|
||||
void BVH4mbIntersector16Hybrid::occluded(mic_i* valid_i, BVH4mb* bvh, Ray16& ray16)
|
||||
{
|
||||
/* allocate stack */
|
||||
__align(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) mic_f stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node_single[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* load ray */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
@@ -26,16 +26,16 @@ namespace embree
|
||||
|
||||
static unsigned int BVH4I_LEAF_MASK = BVH4i::leaf_mask; // needed due to compiler efficiency bug
|
||||
|
||||
static __align(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
static __aligned(64) int zlc4[4] = {0xffffffff,0xffffffff,0xffffffff,0};
|
||||
|
||||
//static __align(64) float testtime[16] = { 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 };
|
||||
static __align(64) float testtime[16] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 };
|
||||
//static __aligned(64) float testtime[16] = { 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 };
|
||||
static __aligned(64) float testtime[16] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 };
|
||||
|
||||
void BVH4mbIntersector16Single::intersect(mic_i* valid_i, BVH4mb* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) float stack_dist[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
@@ -379,7 +379,7 @@ namespace embree
|
||||
void BVH4mbIntersector16Single::occluded(mic_i* valid_i, BVH4mb* bvh, Ray16& ray16)
|
||||
{
|
||||
/* near and node stack */
|
||||
__align(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
__aligned(64) NodeRef stack_node[3*BVH4i::maxDepth+1];
|
||||
|
||||
/* setup */
|
||||
const mic_m m_valid = *(mic_i*)valid_i != mic_i(0);
|
||||
|
||||
+6
-6
@@ -416,7 +416,7 @@ namespace embree
|
||||
setRay(ray4,2*dy+dx,makeRay(zero,Vec3f(float(x+dx)*rcpWidth,1,float(y+dy)*rcpHeight)));
|
||||
}
|
||||
}
|
||||
__align(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
}
|
||||
}
|
||||
@@ -441,7 +441,7 @@ namespace embree
|
||||
setRay(ray8,2*dy+dx,makeRay(zero,Vec3f(float(x+dx)*rcpWidth,1,float(y+dy)*rcpHeight)));
|
||||
}
|
||||
}
|
||||
__align(32) int valid8[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(32) int valid8[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
}
|
||||
}
|
||||
@@ -466,7 +466,7 @@ namespace embree
|
||||
setRay(ray16,4*dy+dx,makeRay(zero,Vec3f(float(x+dx)*rcpWidth,1,float(y+dy)*rcpHeight)));
|
||||
}
|
||||
}
|
||||
__align(64) int valid16[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(64) int valid16[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +497,7 @@ namespace embree
|
||||
for (size_t j=0; j<4; j++) {
|
||||
setRay(ray4,j,makeRay(zero,numbers[i+j]));
|
||||
}
|
||||
__align(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
}
|
||||
double t1 = getSeconds();
|
||||
@@ -514,7 +514,7 @@ namespace embree
|
||||
for (size_t j=0; j<8; j++) {
|
||||
setRay(ray8,j,makeRay(zero,numbers[i+j]));
|
||||
}
|
||||
__align(16) int valid8[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(16) int valid8[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
}
|
||||
double t1 = getSeconds();
|
||||
@@ -531,7 +531,7 @@ namespace embree
|
||||
for (size_t j=0; j<16; j++) {
|
||||
setRay(ray16,j,makeRay(zero,numbers[i+j]));
|
||||
}
|
||||
__align(64) int valid16[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(64) int valid16[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
}
|
||||
double t1 = getSeconds();
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
StackReserveSize="4000000"
|
||||
@@ -147,6 +148,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
StackReserveSize="4000000"
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -173,6 +181,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -202,6 +211,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -227,6 +237,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -255,6 +267,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -280,6 +294,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -309,6 +325,8 @@
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -334,6 +352,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -363,6 +383,8 @@
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
+34
-34
@@ -246,7 +246,7 @@ namespace embree
|
||||
case 4: {
|
||||
RTCRay4 ray4;
|
||||
for (size_t i=0; i<4; i++) setRay(ray4,i,ray);
|
||||
__align(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid,scene,ray4);
|
||||
ray = getRay(ray4,0);
|
||||
break;
|
||||
@@ -256,7 +256,7 @@ namespace embree
|
||||
case 8: {
|
||||
RTCRay8 ray8;
|
||||
for (size_t i=0; i<8; i++) setRay(ray8,i,ray);
|
||||
__align(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect8(valid,scene,ray8);
|
||||
ray = getRay(ray8,0);
|
||||
break;
|
||||
@@ -266,7 +266,7 @@ namespace embree
|
||||
case 16: {
|
||||
RTCRay16 ray16;
|
||||
for (size_t i=0; i<16; i++) setRay(ray16,i,ray);
|
||||
__align(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect16(valid,scene,ray16);
|
||||
ray = getRay(ray16,0);
|
||||
break;
|
||||
@@ -287,7 +287,7 @@ namespace embree
|
||||
case 4: {
|
||||
RTCRay4 ray4;
|
||||
for (size_t i=0; i<4; i++) setRay(ray4,i,ray);
|
||||
__align(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
rtcOccluded4(valid,scene,ray4);
|
||||
ray.geomID = ray4.geomID[0];
|
||||
break;
|
||||
@@ -297,7 +297,7 @@ namespace embree
|
||||
case 8: {
|
||||
RTCRay8 ray8;
|
||||
for (size_t i=0; i<8; i++) setRay(ray8,i,ray);
|
||||
__align(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcOccluded8(valid,scene,ray8);
|
||||
ray.geomID = ray8.geomID[0];
|
||||
break;
|
||||
@@ -307,7 +307,7 @@ namespace embree
|
||||
case 16: {
|
||||
RTCRay16 ray16;
|
||||
for (size_t i=0; i<16; i++) setRay(ray16,i,ray);
|
||||
__align(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcOccluded16(valid,scene,ray16);
|
||||
ray.geomID = ray16.geomID[0];
|
||||
break;
|
||||
@@ -922,7 +922,7 @@ namespace embree
|
||||
setRay(ray4,1,ray1);
|
||||
setRay(ray4,2,ray2);
|
||||
setRay(ray4,3,ray3);
|
||||
__align(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
if (ray4.geomID[0] != 0 ||
|
||||
ray4.geomID[1] != 1 ||
|
||||
@@ -938,7 +938,7 @@ namespace embree
|
||||
setRay(ray8,1,ray1);
|
||||
setRay(ray8,2,ray2);
|
||||
setRay(ray8,3,ray3);
|
||||
__align(32) int valid8[8] = { -1,-1,-1,-1, 0, 0, 0, 0 };
|
||||
__aligned(32) int valid8[8] = { -1,-1,-1,-1, 0, 0, 0, 0 };
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
if (ray8.geomID[0] != 0 ||
|
||||
ray8.geomID[1] != 1 ||
|
||||
@@ -953,7 +953,7 @@ namespace embree
|
||||
setRay(ray16,1,ray1);
|
||||
setRay(ray16,2,ray2);
|
||||
setRay(ray16,3,ray3);
|
||||
__align(64) int valid16[16] = { -1,-1,-1,-1,+0,+0,+0,+0,
|
||||
__aligned(64) int valid16[16] = { -1,-1,-1,-1,+0,+0,+0,+0,
|
||||
+0,+0,+0,+0,+0,+0,+0,+0 };
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
if (ray16.geomID[0] != 0 ||
|
||||
@@ -1018,7 +1018,7 @@ namespace embree
|
||||
setRay(ray4,1,ray1);
|
||||
setRay(ray4,2,ray2);
|
||||
setRay(ray4,3,ray3);
|
||||
__align(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
bool ok4a = mask0 & 1 ? ray4.geomID[0] == 0 : ray4.geomID[0] == -1;
|
||||
bool ok4b = mask1 & 2 ? ray4.geomID[1] == 1 : ray4.geomID[1] == -1;
|
||||
@@ -1040,7 +1040,7 @@ namespace embree
|
||||
setRay(ray8,1,ray1);
|
||||
setRay(ray8,2,ray2);
|
||||
setRay(ray8,3,ray3);
|
||||
__align(32) int valid8[8] = { -1,-1,-1,-1,0,0,0,0 };
|
||||
__aligned(32) int valid8[8] = { -1,-1,-1,-1,0,0,0,0 };
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
bool ok8a = mask0 & 1 ? ray8.geomID[0] == 0 : ray8.geomID[0] == -1;
|
||||
bool ok8b = mask1 & 2 ? ray8.geomID[1] == 1 : ray8.geomID[1] == -1;
|
||||
@@ -1064,7 +1064,7 @@ namespace embree
|
||||
setRay(ray16,1,ray1);
|
||||
setRay(ray16,2,ray2);
|
||||
setRay(ray16,3,ray3);
|
||||
__align(64) int valid16[16] = { -1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
__aligned(64) int valid16[16] = { -1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
bool ok16a = mask0 & 1 ? ray16.geomID[0] == 0 : ray16.geomID[0] == -1;
|
||||
bool ok16b = mask1 & 2 ? ray16.geomID[1] == 1 : ray16.geomID[1] == -1;
|
||||
@@ -1130,7 +1130,7 @@ namespace embree
|
||||
setRay(ray4,1,ray1);
|
||||
setRay(ray4,2,ray2);
|
||||
setRay(ray4,3,ray3);
|
||||
__align(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
rtcOccluded4(valid4,scene,ray4);
|
||||
bool ok4a = mask0 & 1 ? ray4.geomID[0] == 0 : ray4.geomID[0] == -1;
|
||||
bool ok4b = mask1 & 2 ? ray4.geomID[1] == 0 : ray4.geomID[1] == -1;
|
||||
@@ -1152,7 +1152,7 @@ namespace embree
|
||||
setRay(ray8,1,ray1);
|
||||
setRay(ray8,2,ray2);
|
||||
setRay(ray8,3,ray3);
|
||||
__align(32) int valid8[8] = { -1,-1,-1,-1,0,0,0,0 };
|
||||
__aligned(32) int valid8[8] = { -1,-1,-1,-1,0,0,0,0 };
|
||||
rtcOccluded8(valid8,scene,ray8);
|
||||
bool ok8a = mask0 & 1 ? ray8.geomID[0] == 0 : ray8.geomID[0] == -1;
|
||||
bool ok8b = mask1 & 2 ? ray8.geomID[1] == 0 : ray8.geomID[1] == -1;
|
||||
@@ -1176,7 +1176,7 @@ namespace embree
|
||||
setRay(ray16,1,ray1);
|
||||
setRay(ray16,2,ray2);
|
||||
setRay(ray16,3,ray3);
|
||||
__align(64) int valid16[16] = { -1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
__aligned(64) int valid16[16] = { -1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
|
||||
rtcOccluded16(valid16,scene,ray16);
|
||||
|
||||
@@ -1288,7 +1288,7 @@ namespace embree
|
||||
|
||||
RTCRay4 ray4;
|
||||
setRay(ray4,0,ray0);
|
||||
__align(16) int valid4[4] = { -1,0,0,0 };
|
||||
__aligned(16) int valid4[4] = { -1,0,0,0 };
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
bool ok0 = (primID & 2) ? (ray4.geomID[0] == -1) : (ray4.geomID[0] == 0);
|
||||
if (!ok0) passed = false;
|
||||
@@ -1301,7 +1301,7 @@ namespace embree
|
||||
|
||||
RTCRay8 ray8;
|
||||
setRay(ray8,0,ray0);
|
||||
__align(32) int valid8[8] = { -1,0,0,0,0,0,0,0 };
|
||||
__aligned(32) int valid8[8] = { -1,0,0,0,0,0,0,0 };
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
bool ok0 = (primID & 2) ? (ray8.geomID[0] == -1) : (ray8.geomID[0] == 0);
|
||||
if (!ok0) passed = false;
|
||||
@@ -1316,7 +1316,7 @@ namespace embree
|
||||
|
||||
RTCRay16 ray16;
|
||||
setRay(ray16,0,ray0);
|
||||
__align(64) int valid16[16] = { -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
__aligned(64) int valid16[16] = { -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
bool ok0 = (primID & 2) ? (ray16.geomID[0] == -1) : (ray16.geomID[0] == 0);
|
||||
if (!ok0) passed = false;
|
||||
@@ -1360,7 +1360,7 @@ namespace embree
|
||||
|
||||
RTCRay4 ray4;
|
||||
setRay(ray4,0,ray0);
|
||||
__align(16) int valid4[4] = { -1,0,0,0 };
|
||||
__aligned(16) int valid4[4] = { -1,0,0,0 };
|
||||
rtcOccluded4(valid4,scene,ray4);
|
||||
bool ok0 = (primID & 2) ? (ray4.geomID[0] == -1) : (ray4.geomID[0] == 0);
|
||||
if (!ok0) passed = false;
|
||||
@@ -1373,7 +1373,7 @@ namespace embree
|
||||
|
||||
RTCRay8 ray8;
|
||||
setRay(ray8,0,ray0);
|
||||
__align(32) int valid8[8] = { -1,0,0,0,0,0,0,0 };
|
||||
__aligned(32) int valid8[8] = { -1,0,0,0,0,0,0,0 };
|
||||
rtcOccluded8(valid8,scene,ray8);
|
||||
bool ok0 = (primID & 2) ? (ray8.geomID[0] == -1) : (ray8.geomID[0] == 0);
|
||||
if (!ok0) passed = false;
|
||||
@@ -1388,7 +1388,7 @@ namespace embree
|
||||
|
||||
RTCRay16 ray16;
|
||||
setRay(ray16,0,ray0);
|
||||
__align(64) int valid16[16] = { -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
__aligned(64) int valid16[16] = { -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
rtcOccluded16(valid16,scene,ray16);
|
||||
bool ok0 = (primID & 2) ? (ray16.geomID[0] == -1) : (ray16.geomID[0] == 0);
|
||||
if (!ok0) passed = false;
|
||||
@@ -1438,7 +1438,7 @@ namespace embree
|
||||
RTCRay4 ray4;
|
||||
memset(&ray4,-1,sizeof(RTCRay4));
|
||||
setRay(ray4,i,ray);
|
||||
__align(16) int valid4[4] = { 0,0,0,0 };
|
||||
__aligned(16) int valid4[4] = { 0,0,0,0 };
|
||||
valid4[i] = -1;
|
||||
rtcOccluded4(valid4,scene,ray4);
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
@@ -1454,7 +1454,7 @@ namespace embree
|
||||
RTCRay8 ray8;
|
||||
memset(&ray8,-1,sizeof(RTCRay8));
|
||||
setRay(ray8,i,ray);
|
||||
__align(32) int valid8[8] = { 0,0,0,0,0,0,0,0 };
|
||||
__aligned(32) int valid8[8] = { 0,0,0,0,0,0,0,0 };
|
||||
valid8[i] = -1;
|
||||
rtcOccluded8(valid8,scene,ray8);
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
@@ -1467,10 +1467,10 @@ namespace embree
|
||||
#endif
|
||||
|
||||
#if defined(__MIC__)
|
||||
__align(64) RTCRay16 ray16;
|
||||
__aligned(64) RTCRay16 ray16;
|
||||
memset(&ray16,-1,sizeof(RTCRay16));
|
||||
setRay(ray16,i,ray);
|
||||
__align(64) int valid16[16] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
__aligned(64) int valid16[16] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
|
||||
valid16[i] = -1;
|
||||
rtcOccluded16(valid16,scene,ray16);
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
@@ -1533,7 +1533,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(Vec3fa(pos,0.0f,0.0f)+org,dir);
|
||||
setRay(ray4,j,ray);
|
||||
}
|
||||
__align(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid,scene,ray4);
|
||||
for (size_t j=0; j<4; j++)
|
||||
numFailures += ray4.primID[j] == -1;
|
||||
@@ -1558,7 +1558,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(Vec3fa(pos,0.0f,0.0f)+org,dir);
|
||||
setRay(ray8,j,ray);
|
||||
}
|
||||
__align(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect8(valid,scene,ray8);
|
||||
for (size_t j=0; j<8; j++)
|
||||
numFailures += ray8.primID[j] == -1;
|
||||
@@ -1583,7 +1583,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(Vec3fa(pos,0.0f,0.0f)+org,dir);
|
||||
setRay(ray16,j,ray);
|
||||
}
|
||||
__align(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect16(valid,scene,ray16);
|
||||
for (size_t j=0; j<16; j++)
|
||||
numFailures += ray16.primID[j] == -1;
|
||||
@@ -1627,7 +1627,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(Vec3fa(pos-3.0f,0.0f,0.0f),dir);
|
||||
setRay(ray4,j,ray);
|
||||
}
|
||||
__align(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid[4] = { -1,-1,-1,-1 };
|
||||
rtcIntersect4(valid,scene,ray4);
|
||||
for (size_t j=0; j<4; j++)
|
||||
numFailures += ray4.primID[j] == -1;
|
||||
@@ -1652,7 +1652,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(Vec3fa(pos-3.0f,0.0f,0.0f),dir);
|
||||
setRay(ray8,j,ray);
|
||||
}
|
||||
__align(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(32) int valid[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect8(valid,scene,ray8);
|
||||
for (size_t j=0; j<8; j++)
|
||||
numFailures += ray8.primID[j] == -1;
|
||||
@@ -1677,7 +1677,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(Vec3fa(pos-3.0f,0.0f,0.0f),dir);
|
||||
setRay(ray16,j,ray);
|
||||
}
|
||||
__align(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(64) int valid[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcIntersect16(valid,scene,ray16);
|
||||
for (size_t j=0; j<16; j++)
|
||||
numFailures += ray16.primID[j] == -1;
|
||||
@@ -1957,7 +1957,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(org,dir);
|
||||
setRay(ray4,j,ray);
|
||||
}
|
||||
__align(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
__aligned(16) int valid4[4] = { -1,-1,-1,-1 };
|
||||
rtcOccluded4(valid4,scene,ray4);
|
||||
rtcIntersect4(valid4,scene,ray4);
|
||||
#endif
|
||||
@@ -1971,7 +1971,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(org,dir);
|
||||
setRay(ray8,j,ray);
|
||||
}
|
||||
__align(32) int valid8[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(32) int valid8[8] = { -1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcOccluded8(valid8,scene,ray8);
|
||||
rtcIntersect8(valid8,scene,ray8);
|
||||
}
|
||||
@@ -1985,7 +1985,7 @@ namespace embree
|
||||
RTCRay ray = makeRay(org,dir);
|
||||
setRay(ray16,j,ray);
|
||||
}
|
||||
__align(16) int valid16[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
__aligned(16) int valid16[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
rtcOccluded16(valid16,scene,ray16);
|
||||
rtcIntersect16(valid16,scene,ray16);
|
||||
#endif
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
StackReserveSize="4000000"
|
||||
@@ -147,6 +148,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
StackReserveSize="4000000"
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -173,6 +181,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -202,6 +211,7 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -228,6 +238,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -257,6 +269,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -283,6 +297,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -313,6 +329,8 @@
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -339,6 +357,8 @@
|
||||
<SubSystem>Console</SubSystem>
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -369,6 +389,8 @@
|
||||
<StackReserveSize>4000000</StackReserveSize>
|
||||
<StackCommitSize>4000000</StackCommitSize>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
@@ -145,6 +146,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -171,6 +179,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -198,6 +207,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -221,6 +231,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -247,6 +259,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -270,6 +284,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -297,6 +313,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -320,6 +338,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -347,6 +367,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
@@ -159,6 +160,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -177,6 +185,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -208,6 +217,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -236,6 +246,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -267,6 +279,8 @@
|
||||
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -295,6 +309,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -327,6 +343,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -355,6 +373,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -387,6 +407,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
@@ -145,6 +146,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -171,6 +179,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -198,6 +207,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -222,6 +232,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -248,6 +260,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -271,6 +285,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -298,6 +314,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -321,6 +339,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -348,6 +368,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
@@ -159,6 +160,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -177,6 +185,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -208,6 +217,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -236,6 +246,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -266,6 +278,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -294,6 +308,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -325,6 +341,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -353,6 +371,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -384,6 +404,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
@@ -145,6 +146,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
|
||||
@@ -44,39 +44,47 @@
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -171,6 +179,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@@ -198,6 +207,7 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>libcpmt.lib</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@@ -221,6 +231,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@@ -247,6 +259,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|Win32'">
|
||||
@@ -270,6 +284,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX|x64'">
|
||||
@@ -297,6 +313,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|Win32'">
|
||||
@@ -320,6 +338,8 @@
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseAVX2|x64'">
|
||||
@@ -347,6 +367,8 @@
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)/tutorials/common/freeglut/$(Platform);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<IgnoreSpecificDefaultLibraries>
|
||||
</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
@@ -159,6 +160,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalLibraryDirectories="$(SolutionDir)/tutorials/common/freeglut/$(PlatformName)"
|
||||
IgnoreDefaultLibraryNames="libcpmt.lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user