diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-06 15:45:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-06 15:45:21 +0300 |
commit | ebcea3029d8ffa893431620947caf7e16e6fb8e9 (patch) | |
tree | 1a9b1441fd8c0fefa5ea479eff6e2db7c97b5fe7 /intern | |
parent | c80415627e9c8e1d4eb74a34a0916126a0e9fc1a (diff) | |
parent | f08191a4596a23dd6372b5b82ed3d5623899b139 (diff) |
Merge branch 'blender2.7'
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/device/device_cpu.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/util/util_simd.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index 1f39a412083..2eb0a40ada0 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -761,8 +761,8 @@ public: int start_sample = tile.start_sample; int end_sample = tile.start_sample + tile.num_samples; - _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); - _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); + /* Needed for Embree. */ + SIMD_SET_FLUSH_TO_ZERO; for(int sample = start_sample; sample < end_sample; sample++) { if(task.get_cancel() || task_pool.canceled()) { diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h index 565ea768089..c92fc1ae391 100644 --- a/intern/cycles/util/util_simd.h +++ b/intern/cycles/util/util_simd.h @@ -45,6 +45,14 @@ #endif +#if defined(__x86_64__) || defined(__i386__) || defined(_M_X64) || defined(_M_IX86) + #define SIMD_SET_FLUSH_TO_ZERO \ + _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); \ + _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); +#else + #define SIMD_SET_FLUSH_TO_ZERO +#endif + CCL_NAMESPACE_BEGIN #ifdef __KERNEL_SSE2__ |