Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-04-03 15:19:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-03 15:19:51 +0300
commita2c0a382cd00b9b1a3058ad0017887e451b73465 (patch)
treebe978c24be659a22afb22eb53c52c468e4087c06 /intern/cycles
parentfeb7852e1ba55b4c7f697ec52fee672a8cc2261c (diff)
parentb3004d30f5d5060035c5f8ac4cb6338463872877 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/CMakeLists.txt48
-rw-r--r--intern/cycles/util/util_types_float4.h1
-rw-r--r--intern/cycles/util/util_types_float4_impl.h5
3 files changed, 48 insertions, 6 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 9df1e91e239..c3305ac3dd8 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -104,6 +104,54 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CYCLES_KERNEL_FLAGS}")
+elseif(WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ check_cxx_compiler_flag(/QxSSE2 CXX_HAS_SSE)
+ check_cxx_compiler_flag(/arch:AVX CXX_HAS_AVX)
+ check_cxx_compiler_flag(/QxCORE-AVX2 CXX_HAS_AVX2)
+
+ if(CXX_HAS_SSE)
+ set(CYCLES_SSE2_KERNEL_FLAGS "/QxSSE2")
+ set(CYCLES_SSE3_KERNEL_FLAGS "/QxSSSE3")
+ set(CYCLES_SSE41_KERNEL_FLAGS "/QxSSE4.1")
+
+ if(CXX_HAS_AVX)
+ set(CYCLES_AVX_KERNEL_FLAGS "/arch:AVX")
+ endif()
+
+ if(CXX_HAS_AVX2)
+ set(CYCLES_AVX2_KERNEL_FLAGS "/QxCORE-AVX2")
+ endif()
+ endif()
+elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
+ if(APPLE)
+ # ICC does not support SSE2 flag on MacOSX
+ check_cxx_compiler_flag(-xssse3 CXX_HAS_SSE)
+ else()
+ check_cxx_compiler_flag(-xsse2 CXX_HAS_SSE)
+ endif()
+
+ check_cxx_compiler_flag(-xavx CXX_HAS_AVX)
+ check_cxx_compiler_flag(-xcore-avx2 CXX_HAS_AVX2)
+
+ if(CXX_HAS_SSE)
+ if(APPLE)
+ # ICC does not support SSE2 flag on MacOSX
+ set(CYCLES_SSE2_KERNEL_FLAGS "-xssse3")
+ else()
+ set(CYCLES_SSE2_KERNEL_FLAGS "-xsse2")
+ endif()
+
+ set(CYCLES_SSE3_KERNEL_FLAGS "-xssse3")
+ set(CYCLES_SSE41_KERNEL_FLAGS "-xsse4.1")
+
+ if(CXX_HAS_AVX)
+ set(CYCLES_AVX_KERNEL_FLAGS "-xavx")
+ endif()
+
+ if(CXX_HAS_AVX2)
+ set(CYCLES_AVX2_KERNEL_FLAGS "-xcore-avx2")
+ endif()
+ endif()
endif()
if(CXX_HAS_SSE)
diff --git a/intern/cycles/util/util_types_float4.h b/intern/cycles/util/util_types_float4.h
index a7d9abe1b95..154391f6881 100644
--- a/intern/cycles/util/util_types_float4.h
+++ b/intern/cycles/util/util_types_float4.h
@@ -34,7 +34,6 @@ struct ccl_try_align(16) float4 {
};
__forceinline float4();
- __forceinline float4(const float4& a);
__forceinline explicit float4(const __m128& a);
__forceinline operator const __m128&(void) const;
diff --git a/intern/cycles/util/util_types_float4_impl.h b/intern/cycles/util/util_types_float4_impl.h
index ff3ec4d4ecf..09f45f47d38 100644
--- a/intern/cycles/util/util_types_float4_impl.h
+++ b/intern/cycles/util/util_types_float4_impl.h
@@ -33,11 +33,6 @@ __forceinline float4::float4()
{
}
-__forceinline float4::float4(const float4& a)
- : m128(a.m128)
-{
-}
-
__forceinline float4::float4(const __m128& a)
: m128(a)
{