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:
authorRay Molenkamp <github@lazydodo.com>2020-06-25 13:44:39 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-06-25 14:00:58 +0300
commitd3283ef1210fe63f75a3b1a60efa3abe5763e6ad (patch)
tree60f7b19076a22ec4af7e019e2b17f3859dc5c702 /build_files/build_environment/patches
parent6431b113815e8faf92e26427f87dc2134c98fdc4 (diff)
Build: upgrade OpenImageDenoise to 1.2.1
This requires ISPC for building OpenImageDenoise, so that is now added as a dependency as well. Blender itself does not need ISPC for building so it is not included as part of the precompiled libraries. Differential Revision: https://developer.blender.org/D7641
Diffstat (limited to 'build_files/build_environment/patches')
-rw-r--r--build_files/build_environment/patches/ispc.diff36
-rw-r--r--build_files/build_environment/patches/openimagedenoise.diff120
2 files changed, 36 insertions, 120 deletions
diff --git a/build_files/build_environment/patches/ispc.diff b/build_files/build_environment/patches/ispc.diff
new file mode 100644
index 00000000000..710bfc7a448
--- /dev/null
+++ b/build_files/build_environment/patches/ispc.diff
@@ -0,0 +1,36 @@
+diff -Naur external_ispc/CMakeLists.txt external_ispc_fixed/CMakeLists.txt
+--- external_ispc/CMakeLists.txt 2020-04-23 17:29:06 -0600
++++ external_ispc_fixed/CMakeLists.txt 2020-05-05 09:01:09 -0600
+@@ -389,7 +389,7 @@
+
+ # Link against Clang libraries
+ foreach(clangLib ${CLANG_LIBRARY_LIST})
+- find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS})
++ find_library(${clangLib}Path NAMES ${clangLib} HINTS ${LLVM_LIBRARY_DIRS} ${CLANG_LIBRARY_DIR})
+ list(APPEND CLANG_LIBRARY_FULL_PATH_LIST ${${clangLib}Path})
+ endforeach()
+ target_link_libraries(${PROJECT_NAME} ${CLANG_LIBRARY_FULL_PATH_LIST})
+diff -Naur orig/CMakeLists.txt external_ispc/CMakeLists.txt
+--- orig/CMakeLists.txt 2020-05-05 09:19:11 -0600
++++ external_ispc/CMakeLists.txt 2020-05-05 09:26:44 -0600
+@@ -333,7 +333,7 @@
+
+ # Include directories
+ target_include_directories(${PROJECT_NAME} PRIVATE
+- ${LLVM_INCLUDE_DIRS}
++ ${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
+ # Compile options
+diff -Naur orig/cmake/GenerateBuiltins.cmake.txt external_ispc/cmake/GenerateBuiltins.cmake.txt
++++ orig/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200
++++ external_ispc/cmake/GenerateBuiltins.cmake 2020-05-25 13:32:40.830803821 +0200
+@@ -97,6 +97,8 @@
+
+ if ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "x86")
+ set(target_arch "i386")
++ # Blender: disable 32bit due to build issues on Linux and being unnecessary.
++ set(SKIP ON)
+ elseif ("${bit}" STREQUAL "64" AND ${arch} STREQUAL "x86")
+ set(target_arch "x86_64")
+ elseif ("${bit}" STREQUAL "32" AND ${arch} STREQUAL "arm")
diff --git a/build_files/build_environment/patches/openimagedenoise.diff b/build_files/build_environment/patches/openimagedenoise.diff
deleted file mode 100644
index 7bfc3aa2eba..00000000000
--- a/build_files/build_environment/patches/openimagedenoise.diff
+++ /dev/null
@@ -1,120 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 70ec895..e616b63 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -178,7 +178,9 @@ set_property(TARGET ${PROJECT_NAME} PROPERTY SOVERSION "0")
- ## Open Image Denoise examples
- ## ----------------------------------------------------------------------------
-
--add_subdirectory(examples)
-+if(WITH_EXAMPLE)
-+ add_subdirectory(examples)
-+endif()
-
- ## ----------------------------------------------------------------------------
- ## Open Image Denoise install and packaging
-Submodule mkl-dnn contains modified content
-diff --git a/mkl-dnn/cmake/TBB.cmake b/mkl-dnn/cmake/TBB.cmake
-index 0711e699..c14210b6 100644
---- a/mkl-dnn/cmake/TBB.cmake
-+++ b/mkl-dnn/cmake/TBB.cmake
-@@ -138,13 +138,13 @@ else()
- set(TBB_LIBRARY_MALLOC TBB_LIBRARY_MALLOC-NOTFOUND)
- if(APPLE)
- find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
-- find_library(TBB_LIBRARY tbb PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
-+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_ROOT}/lib NO_DEFAULT_PATH)
- else()
- find_path(TBB_INCLUDE_DIR tbb/task_scheduler_init.h PATHS ${TBB_ROOT}/include NO_DEFAULT_PATH)
- set(TBB_HINTS HINTS ${TBB_ROOT}/lib/intel64/gcc4.4 ${TBB_ROOT}/lib ${TBB_ROOT}/lib64 PATHS /usr/libx86_64-linux-gnu/)
-- find_library(TBB_LIBRARY tbb ${TBB_HINTS})
-- find_library(TBB_LIBRARY_MALLOC tbbmalloc ${TBB_HINTS})
-+ find_library(TBB_LIBRARY tbb_static ${TBB_HINTS})
-+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static ${TBB_HINTS})
- endif()
- endif()
-
-diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
---- a/cmake/install.cmake 2019-08-12 18:02:20.794402575 +0200
-+++ b/cmake/install.cmake 2019-08-12 18:06:07.470045703 +0200
-@@ -18,6 +18,13 @@
- ## Install library
- ## ----------------------------------------------------------------------------
-
-+if(UNIX)
-+install(FILES
-+ ${CMAKE_BINARY_DIR}/libOpenImageDenoise.a
-+ ${CMAKE_BINARY_DIR}/libmkldnn.a
-+ ${CMAKE_BINARY_DIR}/libcommon.a
-+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
-+else()
- install(TARGETS ${PROJECT_NAME}
- EXPORT
- ${PROJECT_NAME}_Export
-@@ -38,6 +45,7 @@
- DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel
- )
- endif()
-+endif()
-
- ## ----------------------------------------------------------------------------
- ## Install headers
-@@ -78,6 +86,7 @@
- ## Install CMake configuration files
- ## ----------------------------------------------------------------------------
-
-+if(NOT UNIX)
- install(EXPORT ${PROJECT_NAME}_Export
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
- #NAMESPACE ${PROJECT_NAME}::
-@@ -92,3 +101,4 @@
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
- COMPONENT devel
- )
-+endif()
-diff '--ignore-matching-lines=:' -ur '--exclude=*.svn*' -u -r
---- a/CMakeLists.txt 2019-08-12 14:22:00.974078598 +0200
-+++ b/CMakeLists.txt 2019-08-12 18:05:05.949057375 +0200
-@@ -14,7 +14,11 @@
- ## limitations under the License. ##
- ## ======================================================================== ##
-
--cmake_minimum_required(VERSION 3.1)
-+if(UNIX)
-+ cmake_minimum_required(VERSION 3.1)
-+else()
-+ cmake_minimum_required(VERSION 3.13)
-+endif()
-
- set(OIDN_VERSION_MAJOR 1)
- set(OIDN_VERSION_MINOR 0)
-@@ -32,13 +36,8 @@
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
-
- # Build as shared or static library
--if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0")
-- option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
-- mark_as_advanced(CLEAR OIDN_STATIC_LIB)
--else()
-- set(OIDN_STATIC_LIB OFF CACHE BOOL "Build Open Image Denoise as a static library." FORCE)
-- mark_as_advanced(OIDN_STATIC_LIB)
--endif()
-+option(OIDN_STATIC_LIB "Build Open Image Denoise as a static library.")
-+mark_as_advanced(CLEAR OIDN_STATIC_LIB)
- if(OIDN_STATIC_LIB)
- set(OIDN_LIB_TYPE STATIC)
- else()
-diff -Naur orig/core/api.cpp external_openimagedenoise/core/api.cpp
---- orig/core/api.cpp 2019-07-19 08:37:04 -0600
-+++ external_openimagedenoise/core/api.cpp 2020-01-21 15:10:56 -0700
-@@ -15,7 +15,7 @@
- // ======================================================================== //
-
- #ifdef _WIN32
--# define OIDN_API extern "C" __declspec(dllexport)
-+# define OIDN_API extern "C"
- #else
- # define OIDN_API extern "C" __attribute__ ((visibility ("default")))
- #endif