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
path: root/intern
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
parentfeb7852e1ba55b4c7f697ec52fee672a8cc2261c (diff)
parentb3004d30f5d5060035c5f8ac4cb6338463872877 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern')
-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
-rw-r--r--intern/openvdb/CMakeLists.txt7
-rw-r--r--intern/openvdb/intern/openvdb_writer.cc2
5 files changed, 55 insertions, 8 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)
{
diff --git a/intern/openvdb/CMakeLists.txt b/intern/openvdb/CMakeLists.txt
index 4b872f25d45..f666dc78e75 100644
--- a/intern/openvdb/CMakeLists.txt
+++ b/intern/openvdb/CMakeLists.txt
@@ -38,9 +38,14 @@ set(SRC
if(WITH_OPENVDB)
add_definitions(
-DWITH_OPENVDB
- -DOPENVDB_3_ABI_COMPATIBLE
)
+ if(WITH_OPENVDB_3_ABI_COMPATIBLE)
+ add_definitions(
+ -DOPENVDB_3_ABI_COMPATIBLE
+ )
+ endif()
+
list(APPEND INC_SYS
${BOOST_INCLUDE_DIR}
${TBB_INCLUDE_DIRS}
diff --git a/intern/openvdb/intern/openvdb_writer.cc b/intern/openvdb/intern/openvdb_writer.cc
index b83691ac7de..bedcfe65552 100644
--- a/intern/openvdb/intern/openvdb_writer.cc
+++ b/intern/openvdb/intern/openvdb_writer.cc
@@ -45,7 +45,7 @@ void OpenVDBWriter::insert(const openvdb::GridBase::Ptr &grid)
void OpenVDBWriter::insert(const openvdb::GridBase &grid)
{
-#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER >= 3)
+#if (OPENVDB_LIBRARY_MAJOR_VERSION_NUMBER <= 3) || defined(OPENVDB_3_ABI_COMPATIBLE)
m_grids->push_back(grid.copyGrid());
#else
m_grids->push_back(grid.copyGridWithNewTree());