Compare commits
30 Commits
sculpt-mod
...
tmp-batch-
Author | SHA1 | Date | |
---|---|---|---|
a7910356b0 | |||
b65b93f5d4 | |||
ef15a45037 | |||
c3002d51f5 | |||
c4b27eb46a | |||
76963a7f64 | |||
a0ec3b7fd7 | |||
c63e45c216 | |||
04a11fa1ba | |||
a58548f6f7 | |||
6e06b4f693 | |||
e27a478a52 | |||
f0207be4df | |||
c54463b9b3 | |||
7d5e1f61bc | |||
baa34974ef | |||
711621cac4 | |||
ac0a8fbe71 | |||
f2842babc3 | |||
93f175f279 | |||
3c95a0c122 | |||
fcd7de8386 | |||
30a68e4d58 | |||
ac0d52ee4f | |||
73ca2f702f | |||
520a7ca2f3 | |||
f9e3d7d7eb | |||
e02e140ef1 | |||
a97e5be2ae | |||
7d515f8c90 |
@@ -241,7 +241,7 @@ ForEachMacros:
|
||||
- SEQ_BEGIN
|
||||
- foreach
|
||||
|
||||
# Use once we bump the minimum version to version 8.
|
||||
# Use once we bump the minimum verison to version 8.
|
||||
# # Without this string literals that in-line 'STRINGIFY' behave strangely (a bug?).
|
||||
# StatementMacros:
|
||||
# - PyObject_VAR_HEAD
|
||||
|
@@ -182,8 +182,6 @@ if(UNIX AND NOT APPLE)
|
||||
set(_init_SDL OFF)
|
||||
set(_init_FFTW3 OFF)
|
||||
set(_init_OPENSUBDIV OFF)
|
||||
set(_init_OPENVDB OFF)
|
||||
set(_init_OPENIMAGEDENOISE OFF)
|
||||
elseif(WIN32)
|
||||
set(_init_JACK OFF)
|
||||
elseif(APPLE)
|
||||
@@ -239,12 +237,11 @@ option(WITH_OPENCOLORIO "Enable OpenColorIO color management" ${_init_OPENCOLO
|
||||
|
||||
# Compositor
|
||||
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
|
||||
option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ${_init_OPENIMAGEDENOISE})
|
||||
|
||||
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ${_init_OPENSUBDIV})
|
||||
|
||||
option(WITH_OPENVDB "Enable features relying on OpenVDB" ${_init_OPENVDB})
|
||||
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ${_init_OPENVDB})
|
||||
option(WITH_OPENVDB "Enable features relying on OpenVDB" OFF)
|
||||
option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
|
||||
option(WITH_OPENVDB_3_ABI_COMPATIBLE "Assume OpenVDB library has been compiled with version 3 ABI compatibility" OFF)
|
||||
mark_as_advanced(WITH_OPENVDB_3_ABI_COMPATIBLE)
|
||||
|
||||
@@ -400,9 +397,6 @@ endif()
|
||||
option(WITH_CPU_SSE "Enable SIMD instruction if they're detected on the host machine" ON)
|
||||
mark_as_advanced(WITH_CPU_SSE)
|
||||
|
||||
option(WITH_QEX "Enable libQEx support" ON)
|
||||
|
||||
|
||||
# Cycles
|
||||
option(WITH_CYCLES "Enable Cycles Render Engine" ON)
|
||||
option(WITH_CYCLES_STANDALONE "Build Cycles standalone application" OFF)
|
||||
@@ -419,8 +413,6 @@ unset(PLATFORM_DEFAULT)
|
||||
option(WITH_CYCLES_LOGGING "Build Cycles with logging support" ON)
|
||||
option(WITH_CYCLES_DEBUG "Build Cycles with extra debug capabilities" OFF)
|
||||
option(WITH_CYCLES_NATIVE_ONLY "Build Cycles with native kernel only (which fits current CPU, use for development only)" OFF)
|
||||
option(WITH_CYCLES_KERNEL_ASAN "Build Cycles kernels with address sanitizer when WITH_COMPILER_ASAN is on, even if it's very slow" OFF)
|
||||
mark_as_advanced(WITH_CYCLES_KERNEL_ASAN)
|
||||
mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
|
||||
mark_as_advanced(WITH_CYCLES_LOGGING)
|
||||
mark_as_advanced(WITH_CYCLES_DEBUG)
|
||||
@@ -479,7 +471,7 @@ endif()
|
||||
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
|
||||
option(WITH_GLEW_ES "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
|
||||
option(WITH_GL_EGL "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)" OFF)
|
||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (through either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||
option(WITH_GL_PROFILE_ES20 "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)" OFF)
|
||||
|
||||
mark_as_advanced(
|
||||
WITH_OPENGL
|
||||
@@ -552,10 +544,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Dependency graph
|
||||
option(WITH_LEGACY_DEPSGRAPH "Build Blender with legacy dependency graph" ON)
|
||||
mark_as_advanced(WITH_LEGACY_DEPSGRAPH)
|
||||
|
||||
if(WIN32)
|
||||
# Use hardcoded paths or find_package to find externals
|
||||
option(WITH_WINDOWS_FIND_MODULES "Use find_package to locate libraries" OFF)
|
||||
@@ -834,6 +822,12 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMPILER_ASAN_CXXFLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMPILER_ASAN_CXXFLAGS}")
|
||||
if(WITH_CYCLES_OSL)
|
||||
# With OSL, Cycles disables rtti in some modules, wich then breaks at linking
|
||||
# when trying to use vptr sanitizer (included into 'undefined' general option).
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=vptr")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(COMPILER_ASAN_LINKER_FLAGS "/FUNCTIONPADMIN:6")
|
||||
endif()
|
||||
@@ -858,8 +852,7 @@ if(WITH_X11)
|
||||
if(X11_Xinput_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "LibXi not found. Disable WITH_X11_XINPUT if you
|
||||
want to build without tablet support")
|
||||
set(WITH_X11_XINPUT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -870,8 +863,7 @@ if(WITH_X11)
|
||||
if(X11_Xxf86vmode_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXxf86vm not found. Disable WITH_X11_XF86VMODE if you
|
||||
want to build without")
|
||||
set(WITH_X11_XF86VMODE OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -879,8 +871,7 @@ if(WITH_X11)
|
||||
if(X11_Xfixes_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXfixes not found. Disable WITH_X11_XFIXES if you
|
||||
want to build without")
|
||||
set(WITH_X11_XFIXES OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -890,8 +881,7 @@ if(WITH_X11)
|
||||
if(X11_Xrender_LIB)
|
||||
list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
|
||||
want to build without")
|
||||
set(WITH_X11_ALPHA OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1770,7 +1760,6 @@ if(FIRST_RUN)
|
||||
info_cfg_option(WITH_CYCLES)
|
||||
info_cfg_option(WITH_FREESTYLE)
|
||||
info_cfg_option(WITH_OPENCOLORIO)
|
||||
info_cfg_option(WITH_OPENIMAGEDENOISE)
|
||||
info_cfg_option(WITH_OPENVDB)
|
||||
info_cfg_option(WITH_ALEMBIC)
|
||||
|
||||
|
29
GNUmakefile
29
GNUmakefile
@@ -37,16 +37,14 @@ Convenience Targets
|
||||
* bpy: Build as a python module which can be loaded from python directly.
|
||||
* deps: Build library dependencies (intended only for platform maintainers).
|
||||
|
||||
* developer: Enable faster builds, error checking and tests, recommended for developers.
|
||||
* config: Run cmake configuration tool to set build options.
|
||||
* ninja: Use ninja build tool for faster builds.
|
||||
|
||||
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
|
||||
Note: passing the argument 'BUILD_CMAKE_ARGS=args' lets you add cmake arguments.
|
||||
|
||||
|
||||
Project Files
|
||||
Generate project files for development environments.
|
||||
Generate poject files for development environments.
|
||||
|
||||
* project_qtcreator: QtCreator Project Files.
|
||||
* project_netbeans: NetBeans Project Files.
|
||||
@@ -223,23 +221,6 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
|
||||
endif
|
||||
|
||||
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake"
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# build tool
|
||||
|
||||
ifneq "$(findstring ninja, $(MAKECMDGOALS))" ""
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -G Ninja
|
||||
BUILD_COMMAND:=ninja
|
||||
else
|
||||
ifneq ("$(wildcard $(BUILD_DIR)/build.ninja)","")
|
||||
BUILD_COMMAND:=ninja
|
||||
else
|
||||
BUILD_COMMAND:=make -s
|
||||
endif
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Blender binary path
|
||||
@@ -301,7 +282,7 @@ all: .FORCE
|
||||
|
||||
@echo
|
||||
@echo Building Blender ...
|
||||
$(BUILD_COMMAND) -C "$(BUILD_DIR)" -j $(NPROCS) install
|
||||
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
|
||||
@echo
|
||||
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
|
||||
@echo Blender successfully built, run from: $(BLENDER_BIN)
|
||||
@@ -313,8 +294,6 @@ lite: all
|
||||
cycles: all
|
||||
headless: all
|
||||
bpy: all
|
||||
developer: all
|
||||
ninja: all
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build dependencies
|
||||
@@ -333,7 +312,7 @@ deps: .FORCE
|
||||
|
||||
@echo
|
||||
@echo Building dependencies ...
|
||||
$(BUILD_COMMAND) -C "$(DEPS_BUILD_DIR)" -j $(NPROCS) $(DEPS_TARGET)
|
||||
$(MAKE) -C "$(DEPS_BUILD_DIR)" -s -j $(NPROCS) $(DEPS_TARGET)
|
||||
@echo
|
||||
@echo Dependencies successfully built and installed to $(DEPS_INSTALL_DIR).
|
||||
@echo
|
||||
@@ -569,7 +548,7 @@ help_features: .FORCE
|
||||
@$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_print_build_options.py" $(BLENDER_DIR)"/CMakeLists.txt"
|
||||
|
||||
clean: .FORCE
|
||||
$(BUILD_COMMAND) -C "$(BUILD_DIR)" clean
|
||||
$(MAKE) -C "$(BUILD_DIR)" clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
|
@@ -90,14 +90,12 @@ include(cmake/tbb.cmake)
|
||||
include(cmake/openvdb.cmake)
|
||||
include(cmake/python.cmake)
|
||||
include(cmake/python_site_packages.cmake)
|
||||
include(cmake/package_python.cmake)
|
||||
include(cmake/numpy.cmake)
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Rely on PugiXML compiled with OpenImageIO
|
||||
else()
|
||||
include(cmake/pugixml.cmake)
|
||||
endif()
|
||||
include(cmake/openimagedenoise.cmake)
|
||||
|
||||
if(WITH_WEBP)
|
||||
include(cmake/webp.cmake)
|
||||
@@ -157,9 +155,4 @@ if(UNIX)
|
||||
include(cmake/sqlite.cmake)
|
||||
endif()
|
||||
|
||||
include(cmake/openmesh.cmake)
|
||||
include(cmake/lapack.cmake)
|
||||
include(cmake/igl.cmake)
|
||||
include(cmake/qex.cmake)
|
||||
|
||||
include(cmake/harvest.cmake)
|
||||
|
@@ -33,9 +33,19 @@ if(WIN32)
|
||||
set(BOOST_TOOLSET toolset=msvc-14.0)
|
||||
set(BOOST_COMPILER_STRING -vc140)
|
||||
endif()
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
|
||||
set(JAM_FILE ${BUILD_DIR}/boost/src/external_boost/user-config.jam)
|
||||
set(semi_path "${PATCH_DIR}/semi.txt")
|
||||
FILE(TO_NATIVE_PATH ${semi_path} semi_path)
|
||||
set(BOOST_CONFIGURE_COMMAND bootstrap.bat &&
|
||||
echo using python : ${PYTHON_OUTPUTDIR}\\python.exe > "${JAM_FILE}" &&
|
||||
echo. : ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/pc >> "${JAM_FILE}" &&
|
||||
echo. : ${BUILD_DIR}/python/src/external_python/pcbuild >> "${JAM_FILE}" &&
|
||||
type ${semi_path} >> "${JAM_FILE}"
|
||||
)
|
||||
set(BOOST_BUILD_COMMAND bjam)
|
||||
#--user-config=user-config.jam
|
||||
set(BOOST_BUILD_OPTIONS runtime-link=static )
|
||||
#set(BOOST_WITH_PYTHON --with-python)
|
||||
set(BOOST_HARVEST_CMD ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/lib/ ${HARVEST_TARGET}/boost/lib/ )
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
set(BOOST_HARVEST_CMD ${BOOST_HARVEST_CMD} && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/boost/include/boost-1_68/ ${HARVEST_TARGET}/boost/include/)
|
||||
@@ -72,6 +82,7 @@ set(BOOST_OPTIONS
|
||||
--with-serialization
|
||||
--with-program_options
|
||||
--with-iostreams
|
||||
${BOOST_WITH_PYTHON}
|
||||
${BOOST_TOOLSET}
|
||||
)
|
||||
|
||||
@@ -89,3 +100,10 @@ ExternalProject_Add(external_boost
|
||||
BUILD_IN_SOURCE 1
|
||||
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_boost
|
||||
Make_Python_Environment
|
||||
)
|
||||
endif()
|
||||
|
@@ -166,8 +166,6 @@ harvest(openimageio/bin openimageio/bin "maketx")
|
||||
harvest(openimageio/bin openimageio/bin "oiiotool")
|
||||
harvest(openimageio/include openimageio/include "*")
|
||||
harvest(openimageio/lib openimageio/lib "*.a")
|
||||
harvest(openimagedenoise/include openimagedenoise/include "*")
|
||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||
harvest(openjpeg/include/openjpeg-2.3 openjpeg/include "*.h")
|
||||
harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||
@@ -202,13 +200,4 @@ harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||
harvest(embree/include embree/include "*.h")
|
||||
harvest(embree/lib embree/lib "*.a")
|
||||
|
||||
harvest(openmesh/include openmesh/include "*")
|
||||
harvest(openmesh/lib openmesh/lib "*.a")
|
||||
harvest(lapack/lib lapack/lib "*.a")
|
||||
harvest(lapack/include lapack/include "*.h")
|
||||
harvest(igl/include igl/include "*")
|
||||
harvest(igl/lib igl/lib "*.a")
|
||||
harvest(qex/include qex/include "*.h")
|
||||
harvest(qex/lib qex/lib "*.a")
|
||||
|
||||
endif()
|
||||
|
@@ -1,70 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(IGL_EXTRA_ARGS
|
||||
-DLIBIGL_BUILD_PYTHON=OFF
|
||||
-DLIBIGL_BUILD_TESTS=OFF
|
||||
-DLIBIGL_BUILD_TUTORIALS=OFF
|
||||
-DLIBIGL_USE_STATIC_LIBRARY=ON
|
||||
-DLIBIGL_WITHOUT_COPYLEFT=OFF
|
||||
-DLIBIGL_WITH_CGAL=OFF
|
||||
-DLIBIGL_WITH_COMISO=ON
|
||||
-DLIBIGL_WITH_CORK=OFF
|
||||
-DLIBIGL_WITH_EMBREE=OFF
|
||||
-DLIBIGL_WITH_MATLAB=OFF
|
||||
-DLIBIGL_WITH_MOSEK=OFF
|
||||
-DLIBIGL_WITH_OPENGL=OFF
|
||||
-DLIBIGL_WITH_OPENGL_GLFW=OFF
|
||||
-DLIBIGL_WITH_OPENGL_GLFW_IMGUI=OFF
|
||||
-DLIBIGL_WITH_PNG=OFF
|
||||
-DLIBIGL_WITH_PYTHON=OFF
|
||||
-DLIBIGL_WITH_TETGEN=OFF
|
||||
-DLIBIGL_WITH_TRIANGLE=OFF
|
||||
-DLIBIGL_WITH_XML=OFF
|
||||
-DBLAS_LIBRARIES=${LIBDIR}/lapack/lib/libblas.a
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_igl
|
||||
URL ${IGL_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${IGL_HASH}
|
||||
PREFIX ${BUILD_DIR}/igl
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/igl -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${IGL_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/igl
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(external_igl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/igl/src/external_igl/include/igl/copyleft/comiso
|
||||
${LIBDIR}/igl/include/igl/copyleft/comiso
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/igl/src/external_igl-build/libigl_comiso.a
|
||||
${LIBDIR}/igl/lib/libigl_comiso.a
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/igl/src/external_igl-build/libCoMISo.a
|
||||
${LIBDIR}/igl/lib/libCoMISo.a
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/igl/src/external_igl/external/eigen/Eigen
|
||||
${LIBDIR}/igl/include/eigen/Eigen
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_igl
|
||||
external_lapack
|
||||
)
|
@@ -1,29 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(LAPACK_EXTRA_ARGS
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_lapack
|
||||
URL ${LAPACK_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${LAPACK_HASH}
|
||||
PREFIX ${BUILD_DIR}/lapack
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/lapack -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${LAPACK_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/lapack
|
||||
)
|
@@ -17,7 +17,6 @@
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(MSVC)
|
||||
message("BIN >${PYTHON_BINARY}<")
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(NUMPY_DIR_POSTFIX -pydebug)
|
||||
set(NUMPY_ARCHIVE_POSTFIX d)
|
||||
@@ -31,6 +30,17 @@ endif()
|
||||
|
||||
set(NUMPY_POSTFIX)
|
||||
|
||||
if(WIN32)
|
||||
set(NUMPY_INSTALL
|
||||
${CMAKE_COMMAND} -E copy_directory "${BUILD_DIR}/python/src/external_python/run/lib/site-packages/numpy/core/include/numpy" "${LIBDIR}/python/include/python${PYTHON_SHORT_VERSION}/numpy" &&
|
||||
${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/numpy/src/external_numpy/build/lib.${PYTHON_ARCH2}-${PYTHON_SHORT_VERSION}${NUMPY_DIR_POSTFIX}"
|
||||
${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz" "."
|
||||
)
|
||||
else()
|
||||
set(NUMPY_INSTALL echo .)
|
||||
set(NUMPY_PATCH echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_numpy
|
||||
URL ${NUMPY_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
@@ -40,10 +50,17 @@ ExternalProject_Add(external_numpy
|
||||
CONFIGURE_COMMAND ""
|
||||
LOG_BUILD 1
|
||||
BUILD_COMMAND ${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py build ${NUMPY_BUILD_OPTION} install --old-and-unmanageable
|
||||
INSTALL_COMMAND ""
|
||||
INSTALL_COMMAND ${NUMPY_INSTALL}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
ExternalProject_Add_Step(external_numpy after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}_numpy_${NUMPY_SHORT_VERSION}${NUMPY_ARCHIVE_POSTFIX}.tar.gz
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_numpy
|
||||
external_python
|
||||
Make_Python_Environment
|
||||
)
|
||||
|
@@ -1,61 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
|
||||
set(OIDN_EXTRA_ARGS
|
||||
-DWITH_EXAMPLE=OFF
|
||||
-DWITH_TEST=OFF
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
-DTBB_STATIC_LIB=ON
|
||||
-DOIDN_STATIC_LIB=ON
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openimagedenoise
|
||||
URL ${OIDN_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${OIDN_HASH}
|
||||
PREFIX ${BUILD_DIR}/openimagedenoise
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimagedenoise ${DEFAULT_CMAKE_FLAGS} ${OIDN_EXTRA_ARGS}
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise < ${PATCH_DIR}/openimagedenoise.diff
|
||||
INSTALL_DIR ${LIBDIR}/openimagedenoise
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_openimagedenoise
|
||||
external_tbb
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_openimagedenoise after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openimagedenoise/include ${HARVEST_TARGET}/openimagedenoise/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_openimagedenoise after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/openimagedenoise.lib ${HARVEST_TARGET}/openimagedenoise/lib/openimagedenoise_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/common.lib ${HARVEST_TARGET}/openimagedenoise/lib/common_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/openimagedenoise/lib/mkldnn.lib ${HARVEST_TARGET}/openimagedenoise/lib/mkldnn_d.lib
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
@@ -1,45 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(OPENMESH_EXTRA_ARGS
|
||||
-DBUILD_APPS=OFF
|
||||
-DDISABLE_QMAKE_BUILD=ON
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openmesh
|
||||
URL ${OPENMESH_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${OPENMESH_HASH}
|
||||
PREFIX ${BUILD_DIR}/openmesh
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/openmesh/src/external_openmesh < ${PATCH_DIR}/openmesh.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openmesh -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${OPENMESH_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openmesh
|
||||
)
|
||||
|
||||
if (BUILD_MODE STREQUAL Debug)
|
||||
ExternalProject_Add_Step(external_openmesh after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/openmesh/lib/OpenMesh/libOpenMeshCored.a
|
||||
${LIBDIR}/openmesh/lib/OpenMesh/libOpenMeshCore.a
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/openmesh/lib/OpenMesh/libOpenMeshToolsd.a
|
||||
${LIBDIR}/openmesh/lib/OpenMesh/libOpenMeshTools.a
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
@@ -87,7 +87,6 @@ elseif(APPLE)
|
||||
set(OSL_EXTRA_ARGS
|
||||
${OSL_EXTRA_ARGS}
|
||||
-DHIDE_SYMBOLS=OFF
|
||||
-DPUGIXML_HOME=${LIBDIR}/pugixml
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@@ -1,58 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if(MSVC)
|
||||
set(PYTARGET ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS})
|
||||
set(PYSRC ${LIBDIR}/python/)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
add_custom_command(
|
||||
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND echo packaging python
|
||||
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python.exe ${PYTARGET}/bin/python.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.pdb
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
|
||||
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
|
||||
)
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${HARVEST_TARGET}/python/${PYTHON_SHORT_VERSION_NO_DOTS}/bin/python${PYTHON_POSTFIX}.exe)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
add_custom_command(
|
||||
OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND echo packaging python
|
||||
COMMAND echo this should ouput at ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${PYTARGET}/libs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_POSTFIX}.exe ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${PYTARGET}/bin/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PYSRC}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${PYTARGET}/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/include/ ${PYTARGET}/include/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/lib/ ${PYTARGET}/lib/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PYSRC}/DLLs/ ${PYTARGET}/DLLs/
|
||||
COMMAND cd ${PYTARGET}/lib/ && for /d /r . %%d in (__pycache__) do @if exist "%%d" echo "%%d" && rd /s/q "%%d"
|
||||
)
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python external_numpy external_python_site_packages OUTPUT ${PYTARGET}/bin/python${PYTHON_POSTFIX}.exe)
|
||||
endif()
|
||||
endif()
|
@@ -19,13 +19,17 @@
|
||||
set(PYTHON_POSTFIX)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(PYTHON_POSTFIX _d)
|
||||
set(PYTHON_EXTRA_INSTLAL_FLAGS -d)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(SSL_POSTFIX -x64)
|
||||
else()
|
||||
set(SSL_POSTFIX)
|
||||
endif()
|
||||
|
||||
set(PYTHON_BINARY ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe)
|
||||
|
||||
macro(cmake_to_dos_path MsysPath ResultingPath)
|
||||
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
|
||||
endmacro()
|
||||
@@ -36,16 +40,31 @@ if(WIN32)
|
||||
cmake_to_dos_path(${PYTHON_EXTERNALS_FOLDER} PYTHON_EXTERNALS_FOLDER_DOS)
|
||||
cmake_to_dos_path(${DOWNLOADS_EXTERNALS_FOLDER} DOWNLOADS_EXTERNALS_FOLDER_DOS)
|
||||
|
||||
message("Python externals = ${PYTHON_EXTERNALS_FOLDER}")
|
||||
message("Python externals_dos = ${PYTHON_EXTERNALS_FOLDER_DOS}")
|
||||
message("Python DOWNLOADS_EXTERNALS_FOLDER = ${DOWNLOADS_EXTERNALS_FOLDER}")
|
||||
message("Python DOWNLOADS_EXTERNALS_FOLDER_DOS = ${DOWNLOADS_EXTERNALS_FOLDER_DOS}")
|
||||
|
||||
ExternalProject_Add(external_python
|
||||
URL ${PYTHON_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${PYTHON_HASH}
|
||||
PREFIX ${BUILD_DIR}/python
|
||||
PATCH_COMMAND
|
||||
echo mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}" &&
|
||||
mklink /D "${PYTHON_EXTERNALS_FOLDER_DOS}" "${DOWNLOADS_EXTERNALS_FOLDER_DOS}"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && call build.bat -e -p ${PYTHON_ARCH} -c ${BUILD_MODE}
|
||||
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py -b ${PYTHON_SRC}/PCbuild/amd64 -s ${PYTHON_SRC} -t ${PYTHON_SRC}/tmp/ --include-underpth --include-stable --include-pip --include-dev --include-launchers --include-symbols ${PYTHON_EXTRA_INSTLAL_FLAGS} --copy ${LIBDIR}/python
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.pdb &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib &&
|
||||
${CMAKE_COMMAND} -E copy ${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp ${LIBDIR}/python/lib/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.exp &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION} &&
|
||||
${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${LIBDIR}/python/include/Python${PYTHON_SHORT_VERSION}/pyconfig.h
|
||||
)
|
||||
|
||||
message("PythinRedist = ${BUILD_DIR}/python/src/external_python/redist")
|
||||
message("POutput = ${PYTHON_OUTPUTDIR}")
|
||||
else()
|
||||
if(APPLE)
|
||||
# disable functions that can be in 10.13 sdk but aren't available on 10.9 target
|
||||
@@ -88,6 +107,65 @@ else()
|
||||
BUILD_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${PYTHON_CONFIGURE_ENV} && cd ${BUILD_DIR}/python/src/external_python/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/python)
|
||||
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS external_python)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
add_custom_command(
|
||||
OUTPUT ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
|
||||
OUTPUT ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/lib ${BUILD_DIR}/python/src/external_python/redist/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_asyncio${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_asyncio${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_bz2${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_bz2${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_contextvars${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_contextvars${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ctypes_test${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ctypes_test${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_decimal${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_decimal${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_distutils_findvs${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_distutils_findvs${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_elementtree${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_elementtree${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_hashlib${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_hashlib${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_lzma${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_lzma${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_msi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_msi${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_multiprocessing${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_multiprocessing${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_overlapped${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_overlapped${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_queue${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_queue${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_socket${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_socket${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_sqlite3${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_sqlite3${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_ssl${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_ssl${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testbuffer${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testbuffer${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testcapi${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testcapi${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testimportmultiple${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testimportmultiple${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/_testmultiphase${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/_testmultiphase${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/pyexpat${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/pyexpat${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/select${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/select${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/unicodedata${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/unicodedata${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/winsound${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/winsound${PYTHON_POSTFIX}.pyd
|
||||
#xxlimited is an example extension module, we don't need to ship it and debug doesn't build it
|
||||
#leaving it commented out, so I won't get confused again with the next update.
|
||||
#COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/xxlimited${PYTHON_POSTFIX}.pyd" ${BUILD_DIR}/python/src/external_python/redist/lib/xxlimited${PYTHON_POSTFIX}.pyd
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libssl-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libssl-1_1${SSL_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/libcrypto-1_1${SSL_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/libcrypto-1_1${SSL_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/sqlite3${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/redist/lib/sqlite3${PYTHON_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E chdir "${BUILD_DIR}/python/src/external_python/redist" ${CMAKE_COMMAND} -E tar "cfvz" "${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz" "."
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/python/ ${HARVEST_TARGET}/python/
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${HARVEST_TARGET}/Release/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz
|
||||
)
|
||||
|
||||
add_custom_target(Package_Python ALL DEPENDS external_python ${LIBDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.tar.gz ${BUILD_DIR}/python/src/external_python/redist/bin/python${PYTHON_POSTFIX}.exe)
|
||||
|
||||
add_custom_command(OUTPUT ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/redist ${BUILD_DIR}/python/src/external_python/run
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/include ${BUILD_DIR}/python/src/external_python/run/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${BUILD_DIR}/python/src/external_python/PC/pyconfig.h" ${BUILD_DIR}/python/src/external_python/run/include/pyconfig.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib #missing postfix on purpose, distutils is not expecting it
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib" ${BUILD_DIR}/python/src/external_python/run/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}${PYTHON_POSTFIX}.lib #other things like numpy still want it though.
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${PYTHON_OUTPUTDIR}/python${PYTHON_POSTFIX}.exe" ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe
|
||||
COMMAND ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe -m ensurepip --upgrade
|
||||
)
|
||||
add_custom_target(Make_Python_Environment ALL DEPENDS ${BUILD_DIR}/python/src/external_python/run/python${PYTHON_POSTFIX}.exe Package_Python)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
|
@@ -15,16 +15,27 @@
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
if(WIN32)
|
||||
set(HARVEST_CMD cmd /C FOR /d /r ${BUILD_DIR}/python/src/external_python/run/lib/site-packages %d IN (__pycache__) DO @IF EXIST "%d" rd /s /q "%d" &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/idna ${HARVEST_TARGET}/Release/site-packages/idna &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/chardet ${HARVEST_TARGET}/Release/site-packages/chardet &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/urllib3 ${HARVEST_TARGET}/Release/site-packages/urllib3 &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/certifi ${HARVEST_TARGET}/Release/site-packages/certifi &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/python/src/external_python/run/lib/site-packages/requests ${HARVEST_TARGET}/Release/site-packages/requests
|
||||
)
|
||||
else()
|
||||
set(HARVEST_CMD echo .)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_python_site_packages
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
PREFIX ${BUILD_DIR}/site_packages
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all:
|
||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install idna==${IDNA_VERSION} chardet==${CHARDET_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} --no-binary :all: && ${HARVEST_CMD}
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_python_site_packages
|
||||
external_python
|
||||
Make_Python_Environment
|
||||
)
|
||||
|
@@ -1,52 +0,0 @@
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
set(QEX_EXTRA_ARGS
|
||||
-DOPENMESH_CORE_LIBRARY=${LIBDIR}/openmesh/lib/OpenMesh/libOpenMeshCore.a
|
||||
-DOPENMESH_INCLUDE_DIR=${LIBDIR}/openmesh/include
|
||||
-DOPENMESH_LIBRARY_DIR=${LIBDIR}/openmesh/lib/OpenMesh
|
||||
-DOPENMESH_TOOLS_LIBRARY=${LIBDIR}/openmesh/lib/OpenMesh/libOpenMeshTools.a
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_qex
|
||||
URL ${QEX_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${QEX_HASH}
|
||||
PREFIX ${BUILD_DIR}/qex
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/qex/src/external_qex < ${PATCH_DIR}/qex.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/qex -Wno-dev ${DEFAULT_CMAKE_FLAGS} ${QEX_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/qex
|
||||
)
|
||||
|
||||
#grr, INSTALL(TARGETS has no exclude pattern, so removing unnecessary empty dirs here
|
||||
ExternalProject_Add_Step(external_qex after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBDIR}/qex/lib/src
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBDIR}/qex/lib/interfaces
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBDIR}/qex/lib/demo
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBDIR}/qex/include/src
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBDIR}/qex/include/interfaces
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory ${LIBDIR}/qex/include/demo
|
||||
DEPENDEES install
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_qex
|
||||
external_igl
|
||||
external_openmesh
|
||||
)
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=Off
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
-DTBB_BUILD_TBBMALLOC=Off
|
||||
-DTBB_BUILD_TBBMALLOC_PROXY=Off
|
||||
-DTBB_BUILD_STATIC=On
|
||||
)
|
||||
|
@@ -16,26 +16,20 @@
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
if (UNIX)
|
||||
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV} && export HAVE_PDFLATEX=no)
|
||||
else()
|
||||
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_theora
|
||||
URL ${THEORA_URI}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH SHA256=${THEORA_HASH}
|
||||
PREFIX ${BUILD_DIR}/theora
|
||||
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
--with-vorbis=${LIBDIR}/vorbis
|
||||
--disable-examples
|
||||
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
|
||||
|
@@ -143,11 +143,11 @@ set(OSL_VERSION 1.9.9)
|
||||
set(OSL_URI https://github.com/imageworks/OpenShadingLanguage/archive/Release-${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 44ad511e424965a10fce051a053b0605)
|
||||
|
||||
set(PYTHON_VERSION 3.7.4)
|
||||
set(PYTHON_VERSION 3.7.0)
|
||||
set(PYTHON_SHORT_VERSION 3.7)
|
||||
set(PYTHON_SHORT_VERSION_NO_DOTS 37)
|
||||
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
|
||||
set(PYTHON_HASH d33e4aae66097051c2eca45ee3604803)
|
||||
set(PYTHON_HASH eb8c2a6b1447d50813c02714af4681f3)
|
||||
|
||||
set(TBB_VERSION 2018_U5)
|
||||
set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz)
|
||||
@@ -157,16 +157,16 @@ set(OPENVDB_VERSION 5.1.0)
|
||||
set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
|
||||
set(OPENVDB_HASH 5310101f874dcfd2165f9cee68c22624)
|
||||
|
||||
set(IDNA_VERSION 2.8)
|
||||
set(IDNA_VERSION 2.7)
|
||||
set(CHARDET_VERSION 3.0.4)
|
||||
set(URLLIB3_VERSION 1.25.3)
|
||||
set(CERTIFI_VERSION 2019.6.16)
|
||||
set(REQUESTS_VERSION 2.22.0)
|
||||
set(URLLIB3_VERSION 1.23)
|
||||
set(CERTIFI_VERSION 2018.8.13)
|
||||
set(REQUESTS_VERSION 2.19.1)
|
||||
|
||||
set(NUMPY_VERSION v1.17.0)
|
||||
set(NUMPY_SHORT_VERSION 1.17)
|
||||
set(NUMPY_URI https://files.pythonhosted.org/packages/da/32/1b8f2bb5fb50e4db68543eb85ce37b9fa6660cd05b58bddfafafa7ed62da/numpy-1.17.0.zip)
|
||||
set(NUMPY_HASH aed49b31bcb44ec73b8155be78566135)
|
||||
set(NUMPY_VERSION v1.15.0)
|
||||
set(NUMPY_SHORT_VERSION 1.15)
|
||||
set(NUMPY_URI https://files.pythonhosted.org/packages/3a/20/c81632328b1a4e1db65f45c0a1350a9c5341fd4bbb8ea66cdd98da56fe2e/numpy-1.15.0.zip)
|
||||
set(NUMPY_HASH 20e13185089011116a98e11c9bf8aa07)
|
||||
|
||||
set(LAME_VERSION 3.100)
|
||||
set(LAME_URI http://downloads.sourceforge.net/project/lame/lame/3.100/lame-${LAME_VERSION}.tar.gz)
|
||||
@@ -302,30 +302,3 @@ set(SQLITE_HASH fb558c49ee21a837713c4f1e7e413309aabdd9c7)
|
||||
set(EMBREE_VERSION 3.2.4)
|
||||
set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip)
|
||||
set(EMBREE_HASH 3d4a1147002ff43939d45140aa9d6fb8)
|
||||
|
||||
<<<<<<< HEAD
|
||||
set(IGL_VERSION 2.0.0)
|
||||
set(IGL_URI https://github.com/libigl/libigl/archive/v${IGL_VERSION}.tar.gz)
|
||||
set(IGL_HASH 42518e6b106c7209c73435fd260ed5d34edeb254852495b4c95dce2d95401328)
|
||||
|
||||
#should match qex, but what about comiso ?
|
||||
set(OPENMESH_VERSION 8.0)
|
||||
set(OPENMESH_URI http://www.openmesh.org/media/Releases/${OPENMESH_VERSION}/OpenMesh-${OPENMESH_VERSION}.tar.gz)
|
||||
#set(OPENMESH_HASH 96c595c1683b1ad950e80464ae5fc1f3c8dc45c31c8a211122a23e16a076ab23) #3.0
|
||||
set(OPENMESH_HASH 8974d44026cacaa37b171945b5c96a284bfd32c9df9d671d62931050d057ec82)
|
||||
|
||||
#latest uid in git as of 2016-10-25
|
||||
set(QEX_GIT_UID 1d33e0d6700dd3d00df984aad776d9537fcf16af)
|
||||
set(QEX_URI https://github.com/hcebke/libQEx/archive/${QEX_GIT_UID}.tar.gz)
|
||||
set(QEX_HASH a29cf440c7b83c9e803d1f55247cd18e9c277b3845edce5d381c4c91daa90452)
|
||||
|
||||
#latest uid in release branch 3.8.0
|
||||
set(LAPACK_GIT_UID ba3779a6813d84d329b73aac86afc4e041170609)
|
||||
set(LAPACK_URI https://github.com/Reference-LAPACK/lapack-release/archive/${LAPACK_GIT_UID}.tar.gz)
|
||||
set(LAPACK_HASH 4bd7a3014ee2b5c7cdcdc8960c9476b689f21796715aa03fd719c92c43faee31)
|
||||
|
||||
=======
|
||||
set(OIDN_VERSION 1.0.0)
|
||||
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.zip)
|
||||
set(OIDN_HASH 19fe67b0164e8f020ac8a4f520defe60)
|
||||
>>>>>>> master
|
||||
|
@@ -26,17 +26,17 @@ ARGS=$( \
|
||||
getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
|
||||
with-all,with-opencollada,with-jack,with-embree,with-oidn,\
|
||||
with-all,with-opencollada,with-jack,with-embree,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
||||
force-all,force-python,force-numpy,force-boost,\
|
||||
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,\
|
||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,\
|
||||
build-all,build-python,build-numpy,build-boost,\
|
||||
build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,\
|
||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,\
|
||||
skip-python,skip-numpy,skip-boost,\
|
||||
skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn \
|
||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree \
|
||||
-- "$@" \
|
||||
)
|
||||
|
||||
@@ -57,7 +57,6 @@ WITH_ALL=false
|
||||
# Do not yet enable opencollada or embree, use --with-opencollada/--with-embree (or --with-all) option to try it.
|
||||
WITH_OPENCOLLADA=false
|
||||
WITH_EMBREE=false
|
||||
WITH_OIDN=false
|
||||
|
||||
THREADS=$(nproc)
|
||||
|
||||
@@ -70,7 +69,6 @@ Number of threads for building: \$THREADS (automatically detected, use --threads
|
||||
Full install: \$WITH_ALL (use --with-all option to enable it).
|
||||
Building OpenCOLLADA: \$WITH_OPENCOLLADA (use --with-opencollada option to enable it).
|
||||
Building Embree: \$WITH_EMBREE (use --with-embree option to enable it).
|
||||
Building OpenImageDenoise: \$WITH_OIDN (use --with-oidn option to enable it).
|
||||
|
||||
Example:
|
||||
Full install without OpenCOLLADA: --with-all --skip-opencollada
|
||||
@@ -120,9 +118,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--with-embree
|
||||
Build and install the Embree libraries.
|
||||
|
||||
--with-oidn
|
||||
Build and install the OpenImageDenoise libraries.
|
||||
|
||||
--with-jack
|
||||
Install the jack libraries.
|
||||
|
||||
@@ -190,9 +185,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--build-embree
|
||||
Force the build of Embree.
|
||||
|
||||
--build-oidn
|
||||
Force the build of OpenImageDenoise.
|
||||
|
||||
--build-ffmpeg
|
||||
Force the build of FFMpeg.
|
||||
|
||||
@@ -248,9 +240,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--force-embree
|
||||
Force the rebuild of Embree.
|
||||
|
||||
--force-oidn
|
||||
Force the rebuild of OpenImageDenoise.
|
||||
|
||||
--force-ffmpeg
|
||||
Force the rebuild of FFMpeg.
|
||||
|
||||
@@ -299,9 +288,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
||||
--skip-Embree
|
||||
Unconditionally skip Embree installation/building.
|
||||
|
||||
--skip-oidn
|
||||
Unconditionally skip OpenImageDenoise installation/building.
|
||||
|
||||
--skip-ffmpeg
|
||||
Unconditionally skip FFMpeg installation/building.\""
|
||||
|
||||
@@ -317,13 +303,13 @@ USE_CXX11=true
|
||||
|
||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||
|
||||
PYTHON_VERSION="3.7.4"
|
||||
PYTHON_VERSION="3.7.0"
|
||||
PYTHON_VERSION_MIN="3.7"
|
||||
PYTHON_FORCE_BUILD=false
|
||||
PYTHON_FORCE_REBUILD=false
|
||||
PYTHON_SKIP=false
|
||||
|
||||
NUMPY_VERSION="1.17.0"
|
||||
NUMPY_VERSION="1.15.0"
|
||||
NUMPY_VERSION_MIN="1.8"
|
||||
NUMPY_FORCE_BUILD=false
|
||||
NUMPY_FORCE_REBUILD=false
|
||||
@@ -404,11 +390,6 @@ EMBREE_FORCE_BUILD=false
|
||||
EMBREE_FORCE_REBUILD=false
|
||||
EMBREE_SKIP=false
|
||||
|
||||
OIDN_VERSION="1.0.0"
|
||||
OIDN_FORCE_BUILD=false
|
||||
OIDN_FORCE_REBUILD=false
|
||||
OIDN_SKIP=false
|
||||
|
||||
FFMPEG_VERSION="4.0.2"
|
||||
FFMPEG_VERSION_MIN="2.8.4"
|
||||
FFMPEG_FORCE_BUILD=false
|
||||
@@ -545,9 +526,6 @@ while true; do
|
||||
--with-embree)
|
||||
WITH_EMBREE=true; shift; continue
|
||||
;;
|
||||
--with-oidn)
|
||||
WITH_OIDN=true; shift; continue
|
||||
;;
|
||||
--with-jack)
|
||||
WITH_JACK=true; shift; continue;
|
||||
;;
|
||||
@@ -594,7 +572,6 @@ while true; do
|
||||
OPENVDB_FORCE_BUILD=true
|
||||
OPENCOLLADA_FORCE_BUILD=true
|
||||
EMBREE_FORCE_BUILD=true
|
||||
OIDN_FORCE_BUILD=true
|
||||
FFMPEG_FORCE_BUILD=true
|
||||
ALEMBIC_FORCE_BUILD=true
|
||||
shift; continue
|
||||
@@ -639,9 +616,6 @@ while true; do
|
||||
--build-embree)
|
||||
EMBREE_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-oidn)
|
||||
OIDN_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
--build-ffmpeg)
|
||||
FFMPEG_FORCE_BUILD=true; shift; continue
|
||||
;;
|
||||
@@ -661,7 +635,6 @@ while true; do
|
||||
OPENVDB_FORCE_REBUILD=true
|
||||
OPENCOLLADA_FORCE_REBUILD=true
|
||||
EMBREE_FORCE_REBUILD=true
|
||||
OIDN_FORCE_REBUILD=true
|
||||
FFMPEG_FORCE_REBUILD=true
|
||||
ALEMBIC_FORCE_REBUILD=true
|
||||
shift; continue
|
||||
@@ -704,9 +677,6 @@ while true; do
|
||||
--force-embree)
|
||||
EMBREE_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-oidn)
|
||||
OIDN_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
--force-ffmpeg)
|
||||
FFMPEG_FORCE_REBUILD=true; shift; continue
|
||||
;;
|
||||
@@ -749,9 +719,6 @@ while true; do
|
||||
--skip-embree)
|
||||
EMBREE_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-oidn)
|
||||
OIDN_SKIP=true; shift; continue
|
||||
;;
|
||||
--skip-ffmpeg)
|
||||
FFMPEG_SKIP=true; shift; continue
|
||||
;;
|
||||
@@ -779,9 +746,6 @@ fi
|
||||
if [ "$WITH_ALL" = true -a "$EMBREE_SKIP" = false ]; then
|
||||
WITH_EMBREE=true
|
||||
fi
|
||||
if [ "$WITH_ALL" = true -a "$OIDN_SKIP" = false ]; then
|
||||
WITH_OIDN=true
|
||||
fi
|
||||
if [ "$WITH_ALL" = true ]; then
|
||||
WITH_JACK=true
|
||||
fi
|
||||
@@ -876,11 +840,6 @@ EMBREE_SOURCE=( "https://github.com/embree/embree/archive/v${EMBREE_VERSION}.tar
|
||||
#~ EMBREE_REPO_UID="4a12bfed63c90e85b6eab98b8cdd8dd2a3ba5809"
|
||||
#~ EMBREE_REPO_BRANCH="master"
|
||||
|
||||
OIDN_USE_REPO=false
|
||||
OIDN_SOURCE=( "https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz" )
|
||||
#~ OIDN_SOURCE_REPO=( "https://github.com/OpenImageDenoise/oidn.git" )
|
||||
#~ OIDN_REPO_UID="dabfd9c80101edae9d25a710160d12d6d963c591"
|
||||
#~ OIDN_REPO_BRANCH="master"
|
||||
|
||||
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
@@ -923,7 +882,6 @@ You may also want to build them yourself (optional ones are [between brackets]):
|
||||
* [OpenVDB $OPENVDB_VERSION_MIN] (from $OPENVDB_SOURCE), [Blosc $OPENVDB_BLOSC_VERSION] (from $OPENVDB_BLOSC_SOURCE).
|
||||
* [OpenCollada $OPENCOLLADA_VERSION] (from $OPENCOLLADA_SOURCE).
|
||||
* [Embree $EMBREE_VERSION] (from $EMBREE_SOURCE).
|
||||
* [OpenImageDenoise $OIDN_VERSION] (from $OIDN_SOURCE).
|
||||
* [Alembic $ALEMBIC_VERSION] (from $ALEMBIC_SOURCE).\""
|
||||
|
||||
if [ "$DO_SHOW_DEPS" = true ]; then
|
||||
@@ -2594,96 +2552,6 @@ compile_Embree() {
|
||||
fi
|
||||
}
|
||||
|
||||
#### Build OpenImageDenoise ####
|
||||
_init_oidn() {
|
||||
_src=$SRC/oidn-$OIDN_VERSION
|
||||
_git=true
|
||||
_inst=$INST/oidn-$OIDN_VERSION
|
||||
_inst_shortcut=$INST/oidn
|
||||
}
|
||||
|
||||
clean_oidn() {
|
||||
_init_oidn
|
||||
_clean
|
||||
}
|
||||
|
||||
compile_OIDN() {
|
||||
if [ "$NO_BUILD" = true ]; then
|
||||
WARNING "--no-build enabled, OpenImageDenoise will not be compiled!"
|
||||
return
|
||||
fi
|
||||
|
||||
# To be changed each time we make edits that would modify the compiled results!
|
||||
oidn_magic=9
|
||||
_init_oidn
|
||||
|
||||
# Clean install if needed!
|
||||
magic_compile_check oidn-$OIDN_VERSION $oidn_magic
|
||||
if [ $? -eq 1 -o "$OIDN_FORCE_REBUILD" = true ]; then
|
||||
clean_oidn
|
||||
fi
|
||||
|
||||
if [ ! -d $_inst ]; then
|
||||
INFO "Building OpenImageDenoise-$OIDN_VERSION"
|
||||
|
||||
prepare_opt
|
||||
|
||||
if [ ! -d $_src ]; then
|
||||
mkdir -p $SRC
|
||||
if [ "OIDN_USE_REPO" = true ]; then
|
||||
git clone $OIDN_SOURCE_REPO $_src
|
||||
else
|
||||
download OIDN_SOURCE[@] "$_src.tar.gz"
|
||||
INFO "Unpacking OpenImageDenoise-$OIDN_VERSION"
|
||||
tar -C $SRC -xf $_src.tar.gz
|
||||
fi
|
||||
fi
|
||||
|
||||
cd $_src
|
||||
|
||||
if [ "$OIDN_USE_REPO" = true ]; then
|
||||
git pull origin $OIDN_REPO_BRANCH
|
||||
|
||||
# Stick to same rev as windows' libs...
|
||||
git checkout $OIDN_REPO_UID
|
||||
git reset --hard
|
||||
fi
|
||||
|
||||
# Always refresh the whole build!
|
||||
if [ -d build ]; then
|
||||
rm -rf build
|
||||
fi
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||
cmake_d="$cmake_d -D WITH_EXAMPLE=OFF"
|
||||
cmake_d="$cmake_d -D WITH_TEST=OFF"
|
||||
cmake_d="$cmake_d -D OIDN_STATIC_LIB=ON"
|
||||
|
||||
cmake $cmake_d ../
|
||||
|
||||
make -j$THREADS && make install
|
||||
make clean
|
||||
|
||||
if [ -d $_inst ]; then
|
||||
_create_inst_shortcut
|
||||
else
|
||||
ERROR "OpenImageDenoise-$OIDN_VERSION failed to compile, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
magic_compile_set oidn-$OIDN_VERSION $oidn_magic
|
||||
|
||||
cd $CWD
|
||||
INFO "Done compiling OpenImageDenoise-$OIDN_VERSION!"
|
||||
else
|
||||
INFO "Own OpenImageDenoise-$OIDN_VERSION is up to date, nothing to do!"
|
||||
INFO "If you want to force rebuild of this lib, use the --force-oidn option."
|
||||
fi
|
||||
}
|
||||
|
||||
#### Build FFMPEG ####
|
||||
_init_ffmpeg() {
|
||||
_src=$SRC/ffmpeg-$FFMPEG_VERSION
|
||||
@@ -3280,24 +3148,6 @@ install_DEB() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -3872,24 +3722,6 @@ install_RPM() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -4354,24 +4186,6 @@ install_ARCH() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -4558,24 +4372,6 @@ install_OTHER() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_do_compile_oidn=false
|
||||
PRINT ""
|
||||
if [ "$OIDN_SKIP" = true ]; then
|
||||
WARNING "Skipping OpenImgeDenoise installation, as requested..."
|
||||
elif [ "$OIDN_FORCE_BUILD" = true ]; then
|
||||
INFO "Forced OpenImageDenoise building, as requested..."
|
||||
_do_compile_oidn=true
|
||||
else
|
||||
# No package currently!
|
||||
_do_compile_oidn=true
|
||||
fi
|
||||
|
||||
if [ "$_do_compile_oidn" = true ]; then
|
||||
compile_OIDN
|
||||
fi
|
||||
fi
|
||||
|
||||
PRINT ""
|
||||
if [ "$FFMPEG_SKIP" = true ]; then
|
||||
WARNING "Skipping FFMpeg installation, as requested..."
|
||||
@@ -4791,17 +4587,6 @@ print_info() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_OIDN" = true ]; then
|
||||
_1="-D WITH_OPENIMAGEDENOISE=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
if [ -d $INST/oidn ]; then
|
||||
_1="-D OPENIMAGEDENOISE_ROOT_DIR=$INST/oidn"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_JACK" = true ]; then
|
||||
_1="-D WITH_JACK=ON"
|
||||
_2="-D WITH_JACK_DYNLOAD=ON"
|
||||
|
@@ -1,119 +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
|
||||
@@ -90,8 +90,8 @@ if(WIN32)
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
set(TBB_LIB_DIR ${TBB_ROOT}/lib/${TBB_ARCH}/${TBB_VCVER})
|
||||
- find_library(TBB_LIBRARY tbb PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
- find_library(TBB_LIBRARY_MALLOC tbbmalloc PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
+ find_library(TBB_LIBRARY tbb_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
+ find_library(TBB_LIBRARY_MALLOC tbbmalloc_static PATHS ${TBB_LIB_DIR} ${TBB_ROOT}/lib NO_DEFAULT_PATH)
|
||||
endif()
|
||||
|
||||
else()
|
||||
@@ -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()
|
@@ -1,12 +0,0 @@
|
||||
--- CMakeLists.txt 2019-04-13 21:03:18.119000842 +0200
|
||||
+++ CMakeLists.txt 2019-04-13 20:59:01.521760285 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
set (OPENMESH_LIBRARY_DIR "${_OPENMESH_LIBRARY_DIR}" CACHE PATH "The directory where the OpenMesh libraries can be found.")
|
||||
endif()
|
||||
|
||||
-add_subdirectory (Doc)
|
||||
+#add_subdirectory (Doc)
|
||||
|
||||
# ========================================================================
|
||||
# Bundle generation (Targets exist, now configure them)
|
||||
|
@@ -1,44 +0,0 @@
|
||||
--- CMakeLists.txt 2019-01-13 19:55:24.920548897 +0100
|
||||
+++ CMakeLists.txt 2019-04-13 23:36:50.517127296 +0200
|
||||
@@ -129,12 +129,20 @@
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
+set_target_properties(QEx PROPERTIES PUBLIC_HEADER "interfaces/c/qex.h")
|
||||
+set_target_properties(QExStatic PROPERTIES PUBLIC_HEADER "interfaces/c/qex.h")
|
||||
|
||||
-find_package(Doxygen)
|
||||
-if (DOXYGEN_FOUND)
|
||||
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
|
||||
- add_custom_target(qex_doc
|
||||
- ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
|
||||
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||
- COMMENT "Generating Doxygen documentation" VERBATIM)
|
||||
-endif()
|
||||
+install(TARGETS QEx QExStatic
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib
|
||||
+ PUBLIC_HEADER DESTINATION include
|
||||
+)
|
||||
+
|
||||
+#find_package(Doxygen)
|
||||
+#if (DOXYGEN_FOUND)
|
||||
+# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile @ONLY)
|
||||
+# add_custom_target(qex_doc
|
||||
+# ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile
|
||||
+# WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
|
||||
+# COMMENT "Generating Doxygen documentation" VERBATIM)
|
||||
+#endif()
|
||||
--- src/predicates.c 2019-04-14 22:27:37.975746000 +0200
|
||||
+++ src/predicates.c 2019-04-14 22:27:50.059746000 +0200
|
||||
@@ -1227,7 +1227,7 @@
|
||||
/* */
|
||||
/*****************************************************************************/
|
||||
|
||||
-int compress(elen, e, h) /* e and h may be the same. */
|
||||
+int compress1(elen, e, h) /* e and h may be the same. */
|
||||
int elen;
|
||||
REAL *e;
|
||||
REAL *h;
|
||||
|
||||
|
@@ -6,7 +6,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
||||
# There we can not use CPU bitness check since it is always 64bit. So instead
|
||||
# we check for a specific libraries.
|
||||
#
|
||||
# Other builders we are running in a bare virtual machine, and the libraries
|
||||
# Other builders we are runnign in a bare virtual machine, and the libraries
|
||||
# are installed to /opt/.
|
||||
# We assume that only 64bit builders exists in such configuration.
|
||||
if(EXISTS "/lib/x86_64-linux-gnu/libc-2.24.so")
|
||||
|
@@ -1,96 +0,0 @@
|
||||
# - Find IGL library
|
||||
# Find the native IGL includes and library
|
||||
# This module defines
|
||||
# IGL_INCLUDE_DIRS, where to find igl.h, Set when
|
||||
# IGL_INCLUDE_DIR is found.
|
||||
# IGL_LIBRARIES, libraries to link against to use IGL.
|
||||
# IGL_ROOT_DIR, The base directory to search for IGL.
|
||||
# This can also be an environment variable.
|
||||
# IGL_FOUND, If false, do not try to use IGL.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# IGL_LIBRARY, where to find the IGL library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If IGL_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT IGL_ROOT_DIR AND NOT $ENV{IGL_ROOT_DIR} STREQUAL "")
|
||||
SET(IGL_ROOT_DIR $ENV{IGL_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_igl_SEARCH_DIRS
|
||||
${IGL_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/igl
|
||||
/opt/lib/igl
|
||||
)
|
||||
|
||||
FIND_PATH(IGL_INCLUDE_DIR
|
||||
NAMES
|
||||
igl/AABB.h #there is no igl.h, but a lot of different headers, just pick the first here
|
||||
HINTS
|
||||
${_igl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(IGL_LIBRARY
|
||||
NAMES
|
||||
igl
|
||||
HINTS
|
||||
${_igl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(IGL_COMISO_LIBRARY
|
||||
NAMES
|
||||
igl_comiso
|
||||
HINTS
|
||||
${_igl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COMISO_LIBRARY
|
||||
NAMES
|
||||
CoMISo
|
||||
HINTS
|
||||
${_igl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set IGL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IGL DEFAULT_MSG
|
||||
IGL_LIBRARY IGL_COMISO_LIBRARY COMISO_LIBRARY IGL_INCLUDE_DIR)
|
||||
|
||||
IF(IGL_FOUND)
|
||||
SET(IGL_LIBRARIES ${IGL_LIBRARY}
|
||||
${IGL_COMISO_LIBRARY}
|
||||
${COMISO_LIBRARY})
|
||||
SET(IGL_INCLUDE_DIRS ${IGL_INCLUDE_DIR})
|
||||
ENDIF(IGL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
IGL_INCLUDE_DIR
|
||||
IGL_LIBRARY
|
||||
IGL_COMISO_LIBRARY
|
||||
COMISO_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_igl_SEARCH_DIRS)
|
||||
|
@@ -1,83 +0,0 @@
|
||||
# - Find LAPACK library
|
||||
# Find the native LAPACK includes and library
|
||||
# This module defines
|
||||
# LAPACK_INCLUDE_DIRS, where to find lapack.h, Set when
|
||||
# LAPACK_INCLUDE_DIR is found.
|
||||
# LAPACK_LIBRARIES, libraries to link against to use LAPACK.
|
||||
# LAPACK_ROOT_DIR, The base directory to search for LAPACK.
|
||||
# This can also be an environment variable.
|
||||
# LAPACK_FOUND, If false, do not try to use LAPACK.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LAPACK_LIBRARY, where to find the LAPACK library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LAPACK_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LAPACK_ROOT_DIR AND NOT $ENV{LAPACK_ROOT_DIR} STREQUAL "")
|
||||
SET(LAPACK_ROOT_DIR $ENV{LAPACK_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_lapack_SEARCH_DIRS
|
||||
${LAPACK_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/lapack
|
||||
/opt/lib/lapack
|
||||
)
|
||||
|
||||
#FIND_PATH(LAPACK_INCLUDE_DIR
|
||||
# NAMES
|
||||
# lapack/AABB.h #there is no lapack.h, but a lot of different headers, just pick the first here
|
||||
# HINTS
|
||||
# ${_lapack_SEARCH_DIRS}
|
||||
# PATH_SUFFIXES
|
||||
# include
|
||||
#)
|
||||
|
||||
FIND_LIBRARY(LAPACK_LIBRARY
|
||||
NAMES
|
||||
lapack
|
||||
HINTS
|
||||
${_lapack_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(BLAS_LIBRARY
|
||||
NAMES
|
||||
blas
|
||||
HINTS
|
||||
${_lapack_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LAPACK_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LAPACK DEFAULT_MSG
|
||||
LAPACK_LIBRARY BLAS_LIBRARY)
|
||||
|
||||
IF(LAPACK_FOUND)
|
||||
SET(LAPACK_LIBRARIES ${LAPACK_LIBRARY} ${BLAS_LIBRARY})
|
||||
#SET(LAPACK_INCLUDE_DIRS ${LAPACK_INCLUDE_DIR})
|
||||
ENDIF(LAPACK_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
#LAPACK_INCLUDE_DIR
|
||||
LAPACK_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_lapack_SEARCH_DIRS)
|
@@ -1,122 +0,0 @@
|
||||
# - Find OpenImageDenoise library
|
||||
# Find the native OpenImageDenoise includes and library
|
||||
# This module defines
|
||||
# OPENIMAGEDENOISE_INCLUDE_DIRS, where to find oidn.h, Set when
|
||||
# OPENIMAGEDENOISE is found.
|
||||
# OPENIMAGEDENOISE_LIBRARIES, libraries to link against to use OpenImageDenoise.
|
||||
# OPENIMAGEDENOISE_ROOT_DIR, The base directory to search for OpenImageDenoise.
|
||||
# This can also be an environment variable.
|
||||
# OPENIMAGEDENOISE_FOUND, If false, do not try to use OpenImageDenoise.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENIMAGEDENOISE_LIBRARY, where to find the OpenImageDenoise library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2019 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENIMAGEDENOISE_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENIMAGEDENOISE_ROOT_DIR AND NOT $ENV{OPENIMAGEDENOISE_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENIMAGEDENOISE_ROOT_DIR $ENV{OPENIMAGEDENOISE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_openimagedenoise_SEARCH_DIRS
|
||||
${OPENIMAGEDENOISE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/lib/openimagedenoise
|
||||
)
|
||||
|
||||
FIND_PATH(OPENIMAGEDENOISE_INCLUDE_DIR
|
||||
NAMES
|
||||
OpenImageDenoise/oidn.h
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_openimagedenoise_FIND_COMPONENTS
|
||||
OpenImageDenoise
|
||||
)
|
||||
|
||||
# These are needed when building statically
|
||||
SET(_openimagedenoise_FIND_STATIC_COMPONENTS
|
||||
common
|
||||
mkldnn
|
||||
)
|
||||
|
||||
SET(_openimagedenoise_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _openimagedenoise_LIBRARIES "${OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
FOREACH(COMPONENT ${_openimagedenoise_FIND_STATIC_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
MARK_AS_ADVANCED(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
IF(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _openimagedenoise_LIBRARIES "${OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
FIND_LIBRARY(OPENIMAGEDENOISE_LIBRARY
|
||||
NAMES
|
||||
OpenImageDenoise
|
||||
HINTS
|
||||
${_openimagedenoise_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEDENOISE_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENIMAGEDENOISE DEFAULT_MSG
|
||||
OPENIMAGEDENOISE_LIBRARY OPENIMAGEDENOISE_INCLUDE_DIR)
|
||||
|
||||
IF(OPENIMAGEDENOISE_FOUND)
|
||||
SET(OPENIMAGEDENOISE_LIBRARIES ${_openimagedenoise_LIBRARIES})
|
||||
SET(OPENIMAGEDENOISE_INCLUDE_DIRS ${OPENIMAGEDENOISE_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(OPENIMAGEDENOISE_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENIMAGEDENOISE_INCLUDE_DIR
|
||||
)
|
||||
|
||||
FOREACH(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(_openimagedenoise_SEARCH_DIRS)
|
||||
UNSET(_openimagedenoise_FIND_COMPONENTS)
|
||||
UNSET(_openimagedenoise_LIBRARIES)
|
@@ -1,87 +0,0 @@
|
||||
# - Find OPENMESH library
|
||||
# Find the native OPENMESH includes and library
|
||||
# This module defines
|
||||
# OPENMESH_INCLUDE_DIRS, where to find openmesh.h, Set when
|
||||
# OPENMESH_INCLUDE_DIR is found.
|
||||
# OPENMESH_LIBRARIES, libraries to link against to use OPENMESH.
|
||||
# OPENMESH_ROOT_DIR, The base directory to search for OPENMESH.
|
||||
# This can also be an environment variable.
|
||||
# OPENMESH_FOUND, If false, do not try to use OPENMESH.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENMESH_LIBRARY, where to find the OPENMESH library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENMESH_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENMESH_ROOT_DIR AND NOT $ENV{OPENMESH_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENMESH_ROOT_DIR $ENV{OPENMESH_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
#SET(OPENMESH_INCLUDE_DIR ${OPENMESH_ROOT_DIR}/include)
|
||||
|
||||
SET(_openmesh_SEARCH_DIRS
|
||||
${OPENMESH_ROOT_DIR}
|
||||
#${OPENMESH_ROOT_DIR}/include/OpenMesh/Core/Geometry
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/openmesh
|
||||
/opt/lib/openmesh
|
||||
)
|
||||
|
||||
FIND_PATH(OPENMESH_INCLUDE_DIR
|
||||
NAMES
|
||||
OpenMesh
|
||||
HINTS
|
||||
${_openmesh_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENMESH_CORE_LIBRARY
|
||||
NAMES
|
||||
OpenMeshCore
|
||||
HINTS
|
||||
${_openmesh_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib/OpenMesh
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENMESH_TOOLS_LIBRARY
|
||||
NAMES
|
||||
OpenMeshTools
|
||||
HINTS
|
||||
${_openmesh_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib/OpenMesh
|
||||
)
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENMESH_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENMESH DEFAULT_MSG
|
||||
OPENMESH_CORE_LIBRARY OPENMESH_TOOLS_LIBRARY OPENMESH_INCLUDE_DIR)
|
||||
|
||||
IF(OPENMESH_FOUND)
|
||||
SET(OPENMESH_LIBRARIES ${OPENMESH_CORE_LIBRARY} ${OPENMESH_TOOLS_LIBRARY})
|
||||
SET(OPENMESH_INCLUDE_DIRS ${OPENMESH_INCLUDE_DIR})
|
||||
ENDIF(OPENMESH_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENMESH_INCLUDE_DIR
|
||||
OPENMESH_CORE_LIBRARY
|
||||
OPENMESH_TOOLS_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_openmesh_SEARCH_DIRS)
|
@@ -1,74 +0,0 @@
|
||||
# - Find QEX library
|
||||
# Find the native QEX includes and library
|
||||
# This module defines
|
||||
# QEX_INCLUDE_DIRS, where to find qex.h, Set when
|
||||
# QEX_INCLUDE_DIR is found.
|
||||
# QEX_LIBRARIES, libraries to link against to use QEX.
|
||||
# QEX_ROOT_DIR, The base directory to search for QEX.
|
||||
# This can also be an environment variable.
|
||||
# QEX_FOUND, If false, do not try to use QEX.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# QEX_LIBRARY, where to find the QEX library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If QEX_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT QEX_ROOT_DIR AND NOT $ENV{QEX_ROOT_DIR} STREQUAL "")
|
||||
SET(QEX_ROOT_DIR $ENV{QEX_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_qex_SEARCH_DIRS
|
||||
${QEX_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/qex
|
||||
/opt/lib/qex
|
||||
)
|
||||
|
||||
FIND_PATH(QEX_INCLUDE_DIR
|
||||
NAMES
|
||||
qex.h
|
||||
HINTS
|
||||
${_qex_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(QEX_LIBRARY
|
||||
NAMES
|
||||
QExStatic
|
||||
HINTS
|
||||
${_qex_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set QEX_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QEX DEFAULT_MSG
|
||||
QEX_LIBRARY QEX_INCLUDE_DIR)
|
||||
|
||||
IF(QEX_FOUND)
|
||||
SET(QEX_LIBRARIES ${QEX_LIBRARY})
|
||||
SET(QEX_INCLUDE_DIRS ${QEX_INCLUDE_DIR})
|
||||
ENDIF(QEX_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
QEX_INCLUDE_DIR
|
||||
QEX_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_qex_SEARCH_DIRS)
|
||||
|
@@ -50,10 +50,6 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
|
||||
INCLUDE_DIRECTORIES "${TEST_INC}")
|
||||
if(${DO_ADD_TEST})
|
||||
add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>)
|
||||
|
||||
# Don't fail tests on leaks since these often happen in external libraries
|
||||
# that we can't fix.
|
||||
set_tests_properties(${NAME}_test PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
@@ -130,7 +130,7 @@ def function_parm_wash_tokens(parm):
|
||||
)
|
||||
|
||||
"""
|
||||
Return tokens without trailing commands and 'const'
|
||||
Return tolens without trailing commands and 'const'
|
||||
"""
|
||||
|
||||
tokens = [t for t in parm.get_tokens()]
|
||||
|
@@ -238,7 +238,7 @@ def create_nb_project_main():
|
||||
|
||||
f.write(' </makeTool>\n')
|
||||
f.write(' </makefileType>\n')
|
||||
# finished makefile info
|
||||
# finishe makefle info
|
||||
|
||||
f.write(' \n')
|
||||
|
||||
|
@@ -1,19 +0,0 @@
|
||||
# Configuration for developers, with faster builds, error checking and tests.
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_developer.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_DEBUG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GTESTS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_SAFETY ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# This may have issues with C++ initialization order, needs to be tested
|
||||
# on all platforms to be sure this is safe to enable.
|
||||
# set(WITH_CXX_GUARDEDALLOC ON CACHE BOOL "" FORCE)
|
@@ -40,7 +40,6 @@ set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEDENOISE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
|
@@ -45,7 +45,6 @@ set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEDENOISE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
|
@@ -41,7 +41,6 @@ set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEDENOISE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENVDB ON CACHE BOOL "" FORCE)
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -80,28 +80,22 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender ${MAJOR_VERSION}.${MINOR_VERSION}")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender ${MAJOR_VERSION}.${MINOR_VERSION}")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico)
|
||||
|
||||
set(BLENDER_NAMESPACE_GUID "507F933F-5898-404A-9A05-18282FD491A6")
|
||||
|
||||
string(UUID CPACK_WIX_UPGRADE_GUID
|
||||
NAMESPACE ${BLENDER_NAMESPACE_GUID}
|
||||
NAME ${CPACK_PACKAGE_INSTALL_DIRECTORY}
|
||||
TYPE SHA1 UPPER
|
||||
)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
set(CPACK_WIX_TEMPLATE ${LIBDIR}/package/installer_wix/WIX.template)
|
||||
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
|
||||
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
|
||||
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:medium)
|
||||
#force lzma instead of deflate
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
|
||||
|
@@ -382,19 +382,6 @@ if(WITH_CYCLES_EMBREE)
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -Xlinker -stack_size -Xlinker 0x100000")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
find_package(OpenImageDenoise)
|
||||
find_package(TBB)
|
||||
|
||||
if(NOT OPENIMAGEDENOISE_FOUND)
|
||||
set(WITH_OPENIMAGEDENOISE OFF)
|
||||
message(STATUS "OpenImageDenoise not found")
|
||||
elseif(NOT TBB_FOUND)
|
||||
set(WITH_OPENIMAGEDENOISE OFF)
|
||||
message(STATUS "TBB not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
|
||||
if(WITH_OPENMP)
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
|
||||
|
@@ -368,15 +368,6 @@ if(WITH_CYCLES_EMBREE)
|
||||
find_package(Embree 3.2.4 REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
find_package_wrapper(OpenImageDenoise)
|
||||
|
||||
if(NOT OPENIMAGEDENOISE_FOUND)
|
||||
set(WITH_OPENIMAGEDENOISE OFF)
|
||||
message(STATUS "OpenImageDenoise not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_LLVM)
|
||||
if(EXISTS ${LIBDIR})
|
||||
set(LLVM_STATIC ON)
|
||||
@@ -416,32 +407,6 @@ if(WITH_OPENSUBDIV)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_QEX)
|
||||
find_package_wrapper(LAPACK)
|
||||
if(NOT LAPACK_FOUND)
|
||||
set(WITH_IGL OFF)
|
||||
message(STATUS "LAPACK/BLAS not found, disabling WITH_QEX")
|
||||
endif()
|
||||
|
||||
find_package_wrapper(OpenMesh)
|
||||
if(NOT OPENMESH_FOUND)
|
||||
set(WITH_IGL OFF)
|
||||
message(STATUS "OpenMesh not found, disabling WITH_QEX")
|
||||
endif()
|
||||
|
||||
find_package_wrapper(Igl)
|
||||
if(NOT IGL_FOUND)
|
||||
set(WITH_IGL OFF)
|
||||
message(STATUS "IGL not found, disabling WITH_QEX")
|
||||
endif()
|
||||
find_package_wrapper(Qex)
|
||||
|
||||
if(NOT QEX_FOUND)
|
||||
set(WITH_QEX OFF)
|
||||
message(STATUS "QEx not found, disabling WITH_QEX")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
|
||||
if(HAIKU)
|
||||
list(APPEND PLATFORM_LINKLIBS -lnetwork)
|
||||
|
@@ -131,8 +131,8 @@ if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc /bigobj")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
@@ -144,11 +144,6 @@ set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /MT")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MT")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MT")
|
||||
|
||||
#JMC is available on msvc 15.8 (1915) and up
|
||||
if(MSVC_VERSION GREATER 1914 AND NOT MSVC_CLANG)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /JMC")
|
||||
endif()
|
||||
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO ")
|
||||
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib ")
|
||||
|
||||
@@ -171,7 +166,8 @@ if(NOT DEFINED LIBDIR)
|
||||
message(STATUS "64 bit compiler detected.")
|
||||
set(LIBDIR_BASE "win64")
|
||||
else()
|
||||
message(FATAL_ERROR "32 bit compiler detected, blender no longer provides pre-build libraries for 32 bit windows, please set the LIBDIR cmake variable to your own library folder")
|
||||
message(STATUS "32 bit compiler detected.")
|
||||
set(LIBDIR_BASE "windows")
|
||||
endif()
|
||||
# Can be 1910..1912
|
||||
if(MSVC_VERSION GREATER 1919)
|
||||
@@ -347,16 +343,18 @@ if(WITH_PYTHON)
|
||||
set(PYTHON_VERSION 3.7) # CACHE STRING)
|
||||
|
||||
string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
set(PYTHON_LIBRARY_DEBUG ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}_d.lib)
|
||||
# Use shared libs for vc2008 and vc2010 until we actually have vc2010 libs
|
||||
set(PYTHON_LIBRARY ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}.lib)
|
||||
set(PYTHON_LIBRARY_DEBUG ${LIBDIR}/python/lib/python${_PYTHON_VERSION_NO_DOTS}_d.lib)
|
||||
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/include)
|
||||
set(PYTHON_NUMPY_INCLUDE_DIRS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/lib/site-packages/numpy/core/include)
|
||||
set(NUMPY_FOUND On)
|
||||
unset(_PYTHON_VERSION_NO_DOTS)
|
||||
|
||||
# Shared includes for both vc2008 and vc2010
|
||||
set(PYTHON_INCLUDE_DIR ${LIBDIR}/python/include/python${PYTHON_VERSION})
|
||||
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
|
||||
set(PYTHON_LIBRARIES debug "${PYTHON_LIBRARY_DEBUG}" optimized "${PYTHON_LIBRARY}" )
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
@@ -383,6 +381,9 @@ if(WITH_BOOST)
|
||||
if(CMAKE_CL_64)
|
||||
set(BOOST_POSTFIX "vc140-mt-s-x64-1_68.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-x64-1_68.lib")
|
||||
else()
|
||||
set(BOOST_POSTFIX "vc140-mt-s-x32-1_68.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc140-mt-sgd-x32-1_68.lib")
|
||||
endif()
|
||||
set(BOOST_LIBRARIES
|
||||
optimized ${BOOST_LIBPATH}/libboost_date_time-${BOOST_POSTFIX}
|
||||
@@ -418,7 +419,7 @@ endif()
|
||||
|
||||
if(WITH_OPENIMAGEIO)
|
||||
windows_find_package(OpenImageIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/OpenImageIO)
|
||||
set(OPENIMAGEIO ${LIBDIR}/openimageio)
|
||||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
|
||||
set(OIIO_OPTIMIZED optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib)
|
||||
@@ -459,14 +460,14 @@ if(WITH_LLVM)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCOLORIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/OpenColorIO)
|
||||
set(OPENCOLORIO ${LIBDIR}/opencolorio)
|
||||
set(OPENCOLORIO_INCLUDE_DIRS ${OPENCOLORIO}/include)
|
||||
set(OPENCOLORIO_LIBPATH ${OPENCOLORIO}/lib)
|
||||
set(OPENCOLORIO_LIBPATH ${LIBDIR}/opencolorio/lib)
|
||||
set(OPENCOLORIO_LIBRARIES
|
||||
optimized ${OPENCOLORIO_LIBPATH}/OpenColorIO.lib
|
||||
optimized ${OPENCOLORIO_LIBPATH}/tinyxml.lib
|
||||
optimized ${OPENCOLORIO_LIBPATH}/libyaml-cpp.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/OpencolorIO_d.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/OpenColorIO_d.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/tinyxml_d.lib
|
||||
debug ${OPENCOLORIO_LIBPATH}/libyaml-cpp_d.lib
|
||||
)
|
||||
@@ -477,32 +478,19 @@ if(WITH_OPENVDB)
|
||||
set(BLOSC_LIBRARIES optimized ${LIBDIR}/blosc/lib/libblosc.lib debug ${LIBDIR}/blosc/lib/libblosc_d.lib)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(OPENVDB ${LIBDIR}/openVDB)
|
||||
set(OPENVDB_LIBPATH ${OPENVDB}/lib)
|
||||
set(OPENVDB ${LIBDIR}/openvdb)
|
||||
set(OPENVDB_LIBPATH ${LIBDIR}/openvdb/lib)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include ${TBB_INCLUDE_DIR})
|
||||
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib ${TBB_LIBRARIES} ${BLOSC_LIBRARIES})
|
||||
set(OPENVDB_DEFINITIONS -DNOMINMAX)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(OPENIMAGEDENOISE ${LIBDIR}/OpenImageDenoise)
|
||||
set(OPENIMAGEDENOISE_LIBPATH ${LIBDIR}/OpenImageDenoise/lib)
|
||||
set(OPENIMAGEDENOISE_INCLUDE_DIRS ${OPENIMAGEDENOISE}/include ${TBB_INCLUDE_DIR})
|
||||
set(OPENIMAGEDENOISE_LIBRARIES
|
||||
optimized ${OPENIMAGEDENOISE_LIBPATH}/OpenImageDenoise.lib ${OPENIMAGEDENOISE_LIBPATH}/common.lib ${OPENIMAGEDENOISE_LIBPATH}/mkldnn.lib
|
||||
debug ${OPENIMAGEDENOISE_LIBPATH}/OpenImageDenoise_d.lib ${OPENIMAGEDENOISE_LIBPATH}/common_d.lib ${OPENIMAGEDENOISE_LIBPATH}/mkldnn_d.lib
|
||||
${TBB_LIBRARIES})
|
||||
set(OPENIMAGEDENOISE_DEFINITIONS)
|
||||
endif()
|
||||
|
||||
if(WITH_ALEMBIC)
|
||||
set(ALEMBIC ${LIBDIR}/alembic)
|
||||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES optimized ${ALEMBIC}/lib/Alembic.lib debug ${ALEMBIC}/lib/Alembic_d.lib)
|
||||
set(ALEMBIC_LIBRARIES optimized ${ALEMBIC}/lib/alembic.lib debug ${ALEMBIC}/lib/alembic_d.lib)
|
||||
set(ALEMBIC_FOUND 1)
|
||||
endif()
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Builds a debian package from SVN source.
|
||||
#
|
||||
# For parallel builds use:
|
||||
# For paralelle builds use:
|
||||
# DEB_BUILD_OPTIONS="parallel=5" sh build_files/package_spec/build_debian.sh
|
||||
|
||||
# this needs to run in the root dir.
|
||||
|
@@ -2,7 +2,11 @@ if "%BUILD_VS_YEAR%"=="2015" set BUILD_VS_LIBDIRPOST=vc14
|
||||
if "%BUILD_VS_YEAR%"=="2017" set BUILD_VS_LIBDIRPOST=vc14
|
||||
if "%BUILD_VS_YEAR%"=="2019" set BUILD_VS_LIBDIRPOST=vc14
|
||||
|
||||
set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
|
||||
if "%BUILD_ARCH%"=="x64" (
|
||||
set BUILD_VS_SVNDIR=win64_%BUILD_VS_LIBDIRPOST%
|
||||
) else if "%BUILD_ARCH%"=="x86" (
|
||||
set BUILD_VS_SVNDIR=windows_%BUILD_VS_LIBDIRPOST%
|
||||
)
|
||||
set BUILD_VS_LIBDIR="%BLENDER_DIR%..\lib\%BUILD_VS_SVNDIR%"
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
|
@@ -1,6 +1,14 @@
|
||||
set BUILD_GENERATOR_POST=
|
||||
set BUILD_PLATFORM_SELECT=
|
||||
set MSBUILD_PLATFORM=x64
|
||||
if "%BUILD_ARCH%"=="x64" (
|
||||
set MSBUILD_PLATFORM=x64
|
||||
) else if "%BUILD_ARCH%"=="x86" (
|
||||
set MSBUILD_PLATFORM=win32
|
||||
if "%WITH_CLANG%"=="1" (
|
||||
echo Clang not supported for X86
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
if "%WITH_CLANG%"=="1" (
|
||||
set CLANG_CMAKE_ARGS=-T"llvm"
|
||||
|
@@ -6,13 +6,11 @@ if "%BUILD_ARCH%"=="" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
set BUILD_ARCH=x64
|
||||
) else (
|
||||
echo Error: 32 bit builds of blender are no longer supported.
|
||||
goto ERR
|
||||
set WINDOWS_ARCH=
|
||||
set BUILD_ARCH=x86
|
||||
)
|
||||
) else if "%BUILD_ARCH%"=="x64" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
) else if "%BUILD_ARCH%"=="x86" (
|
||||
set WINDOWS_ARCH=
|
||||
)
|
||||
:EOF
|
||||
exit /b 0
|
||||
:ERR
|
||||
exit /b 1
|
@@ -2,6 +2,10 @@ if EXIST %BLENDER_DIR%\..\lib\win64_vc14\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=..\lib\win64_vc14\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
if EXIST %BLENDER_DIR%\..\lib\windows_vc14\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=..\lib\windows_vc14\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
|
||||
echo clang-format not found
|
||||
exit /b 1
|
||||
@@ -9,17 +13,8 @@ exit /b 1
|
||||
:detect_done
|
||||
echo found clang-format in %CF_PATH%
|
||||
|
||||
if EXIST %BLENDER_DIR%\..\lib\win64_vc14\python\37\bin\python.exe (
|
||||
set PYTHON=%BLENDER_DIR%\..\lib\win64_vc14\python\37\bin\python.exe
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
echo python not found in lib folder
|
||||
exit /b 1
|
||||
|
||||
:detect_python_done
|
||||
echo found python (%PYTHON%)
|
||||
|
||||
REM TODO(sergey): Switch to Python from libraries when available.
|
||||
set PYTHON="python.exe"
|
||||
set FORMAT_PATHS=%BLENDER_DIR%\source\tools\utils_maintenance\clang_format_paths.py
|
||||
|
||||
REM The formatting script expects clang-format to be in the current PATH.
|
||||
|
@@ -41,13 +41,10 @@ if NOT "%1" == "" (
|
||||
) else if "%1" == "release" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
|
||||
set TARGET=Release
|
||||
) else if "%1" == "developer" (
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_developer.cmake"
|
||||
) else if "%1" == "asan" (
|
||||
set WITH_ASAN=1
|
||||
) else if "%1" == "x86" (
|
||||
echo Error: 32 bit builds of blender are no longer supported.
|
||||
goto ERR
|
||||
) else if "%1" == "x86" (
|
||||
set BUILD_ARCH=x86
|
||||
) else if "%1" == "x64" (
|
||||
set BUILD_ARCH=x64
|
||||
) else if "%1" == "2017" (
|
||||
@@ -100,12 +97,10 @@ if NOT "%1" == "" (
|
||||
goto EOF
|
||||
) else (
|
||||
echo Command "%1" unknown, aborting!
|
||||
goto ERR
|
||||
exit /b 1
|
||||
)
|
||||
shift /1
|
||||
goto argv_loop
|
||||
)
|
||||
:EOF
|
||||
exit /b 0
|
||||
:ERR
|
||||
exit /b 1
|
||||
exit /b 0
|
@@ -7,6 +7,7 @@ set BUILD_VS_YEAR=
|
||||
set BUILD_VS_LIBDIRPOST=
|
||||
set BUILD_VS_LIBDIR=
|
||||
set BUILD_VS_SVNDIR=
|
||||
set BUILD_NGE=
|
||||
set KEY_NAME=
|
||||
set MSBUILD_PLATFORM=
|
||||
set MUST_CLEAN=
|
||||
|
@@ -1,9 +1,4 @@
|
||||
if NOT "%TARGET%" == "" (
|
||||
set BUILD_DIR=%BUILD_DIR%_%TARGET%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
||||
) else (
|
||||
set BUILD_DIR=%BUILD_DIR%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
||||
)
|
||||
|
||||
set BUILD_DIR=%BUILD_DIR%_%TARGET%%BUILD_NGE%_%BUILD_ARCH%_vc%BUILD_VS_VER%_%BUILD_TYPE%
|
||||
if NOT "%BUILD_DIR_OVERRRIDE%"=="" (
|
||||
set BUILD_DIR=%BUILD_DIR_OVERRRIDE%
|
||||
)
|
@@ -17,12 +17,13 @@ echo - format [path] ^(Format the source using clang-format, path is optional, r
|
||||
echo.
|
||||
echo Configuration options
|
||||
echo - verbose ^(enable diagnostic output during configuration^)
|
||||
echo - developer ^(enable faster builds, error checking and tests, recommended for developers^)
|
||||
echo - with_tests ^(enable building unit tests^)
|
||||
echo - nobuildinfo ^(disable buildinfo^)
|
||||
echo - debug ^(Build an unoptimized debuggable build^)
|
||||
echo - packagename [newname] ^(override default cpack package name^)
|
||||
echo - buildir [newdir] ^(override default build folder^)
|
||||
echo - x86 ^(override host auto-detect and build 32 bit code^)
|
||||
echo - x64 ^(override host auto-detect and build 64 bit code^)
|
||||
echo - 2017 ^(build with visual studio 2017^)
|
||||
echo - 2017pre ^(build with visual studio 2017 pre-release^)
|
||||
echo - 2017b ^(build with visual studio 2017 Build Tools^)
|
||||
|
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = "V2.81"
|
||||
PROJECT_NUMBER = "V2.79"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@@ -177,7 +177,7 @@ font:
|
||||
With the new truetype option in Blender, this is used for all font families
|
||||
|
||||
When a uiBlock is created, each uiButton that is defined gets the uiBlock properties.
|
||||
Changing Block properties in between will effect uiButtons defined thereafter.
|
||||
Changing Block properties in between will affact uiButtons defined thereafter.
|
||||
|
||||
|
||||
|
||||
|
@@ -40,7 +40,7 @@ In most cases you can figure out what context an operator needs
|
||||
simply be seeing how it's used in Blender and thinking about what it does.
|
||||
|
||||
Unfortunately if you're still stuck - the only way to **really** know
|
||||
what's going on is to read the source code for the poll function and see what its checking.
|
||||
whats going on is to read the source code for the poll function and see what its checking.
|
||||
|
||||
For Python operators it's not so hard to find the source
|
||||
since it's included with Blender and the source file/line is included in the operator reference docs.
|
||||
@@ -125,7 +125,7 @@ While a script executes Blender waits for it to finish and is effectively locked
|
||||
while in this state Blender won't redraw or respond to user input.
|
||||
Normally this is not such a problem because scripts distributed with Blender
|
||||
tend not to run for an extended period of time,
|
||||
nevertheless scripts *can* take ages to execute and its nice to see what's going on in the view port.
|
||||
nevertheless scripts *can* take ages to execute and its nice to see whats going on in the view port.
|
||||
|
||||
Tools that lock Blender in a loop and redraw are highly discouraged
|
||||
since they conflict with Blenders ability to run multiple operators
|
||||
|
@@ -317,9 +317,7 @@ To run the script:
|
||||
#. Click the button labeled ``New`` and the confirmation pop up in order to create a new text block.
|
||||
#. Press :kbd:`Ctrl-V` to paste the code into the text panel (the upper left frame).
|
||||
#. Click on the button **Run Script**.
|
||||
#. Move your cursor into the 3D Viewport,
|
||||
open the :ref:`operator search menu <blender_manual:bpy.ops.wm.search_menu>`,
|
||||
and type "Simple".
|
||||
#. Move your cursor into the 3D view, press spacebar for the operator search menu, and type "Simple".
|
||||
#. Click on the "Simple Operator" item found in search.
|
||||
|
||||
|
||||
|
@@ -239,7 +239,7 @@ Drop Into a Python Interpreter in Your Script
|
||||
=============================================
|
||||
|
||||
In the middle of a script you may want to inspect some variables,
|
||||
run some function and generally dig about to see what's going on.
|
||||
run some function and generally dig about to see whats going on.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
|
13
extern/bullet2/patches/blender.patch
vendored
13
extern/bullet2/patches/blender.patch
vendored
@@ -1,16 +1,3 @@
|
||||
diff --git a/extern/bullet2/src/LinearMath/btVector3.h b/extern/bullet2/src/LinearMath/btVector3.h
|
||||
index 839b19c..3058195 100644
|
||||
--- a/extern/bullet2/src/LinearMath/btVector3.h
|
||||
+++ b/extern/bullet2/src/LinearMath/btVector3.h
|
||||
@@ -39,7 +39,7 @@ subject to the following restrictions:
|
||||
#endif
|
||||
|
||||
|
||||
-#define BT_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x))
|
||||
+#define BT_SHUFFLE(x,y,z,w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
|
||||
//#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )
|
||||
#define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) )
|
||||
#define bt_splat3_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i, 3) )
|
||||
diff --git a/extern/bullet2/src/LinearMath/btScalar.h b/extern/bullet2/src/LinearMath/btScalar.h
|
||||
--- a/extern/bullet2/src/LinearMath/btScalar.h
|
||||
+++ b/extern/bullet2/src/LinearMath/btScalar.h
|
||||
|
2
extern/bullet2/src/LinearMath/btVector3.h
vendored
2
extern/bullet2/src/LinearMath/btVector3.h
vendored
@@ -39,7 +39,7 @@ subject to the following restrictions:
|
||||
#endif
|
||||
|
||||
|
||||
#define BT_SHUFFLE(x,y,z,w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
|
||||
#define BT_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x))
|
||||
//#define bt_pshufd_ps( _a, _mask ) (__m128) _mm_shuffle_epi32((__m128i)(_a), (_mask) )
|
||||
#define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) )
|
||||
#define bt_splat3_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i, 3) )
|
||||
|
@@ -76,8 +76,3 @@ endif()
|
||||
if(WITH_OPENVDB)
|
||||
add_subdirectory(openvdb)
|
||||
endif()
|
||||
|
||||
if(WITH_QEX)
|
||||
add_definitions(-DWITH_QEX)
|
||||
add_subdirectory(qex)
|
||||
endif()
|
||||
|
@@ -178,13 +178,11 @@ if(CXX_HAS_AVX2)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_OSL)
|
||||
# LLVM and OSL need to build without RTTI
|
||||
if(WIN32 AND MSVC)
|
||||
set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
|
||||
set(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}")
|
||||
endif()
|
||||
|
||||
# Definitions and Includes
|
||||
|
@@ -1002,9 +1002,6 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph &b_depsgraph,
|
||||
oldcurve_keys.steal_data(mesh->curve_keys);
|
||||
oldcurve_radius.steal_data(mesh->curve_radius);
|
||||
|
||||
/* ensure bvh rebuild (instead of refit) if has_voxel_attributes() changed */
|
||||
bool oldhas_voxel_attributes = mesh->has_voxel_attributes();
|
||||
|
||||
mesh->clear();
|
||||
mesh->used_shaders = used_shaders;
|
||||
mesh->name = ustring(b_ob_data.name().c_str());
|
||||
@@ -1053,8 +1050,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph &b_depsgraph,
|
||||
/* tag update */
|
||||
bool rebuild = (oldtriangles != mesh->triangles) || (oldsubd_faces != mesh->subd_faces) ||
|
||||
(oldsubd_face_corners != mesh->subd_face_corners) ||
|
||||
(oldcurve_keys != mesh->curve_keys) || (oldcurve_radius != mesh->curve_radius) ||
|
||||
(oldhas_voxel_attributes != mesh->has_voxel_attributes());
|
||||
(oldcurve_keys != mesh->curve_keys) || (oldcurve_radius != mesh->curve_radius);
|
||||
|
||||
mesh->tag_update(scene, rebuild);
|
||||
|
||||
|
@@ -527,7 +527,7 @@ void BlenderSession::render(BL::Depsgraph &b_depsgraph_)
|
||||
builtin_images_load();
|
||||
|
||||
/* Attempt to free all data which is held by Blender side, since at this
|
||||
* point we know that we've got everything to render current view layer.
|
||||
* point we knwo that we've got everything to render current view layer.
|
||||
*/
|
||||
/* At the moment we only free if we are not doing multi-view
|
||||
* (or if we are rendering the last view). See T58142/D4239 for discussion.
|
||||
|
@@ -315,21 +315,12 @@ static ShaderNode *add_node(Scene *scene,
|
||||
else if (b_node.is_a(&RNA_ShaderNodeRGBToBW)) {
|
||||
node = new RGBToBWNode();
|
||||
}
|
||||
else if (b_node.is_a(&RNA_ShaderNodeMapRange)) {
|
||||
BL::ShaderNodeMapRange b_map_range_node(b_node);
|
||||
MapRangeNode *map_range_node = new MapRangeNode();
|
||||
map_range_node->clamp = b_map_range_node.clamp();
|
||||
node = map_range_node;
|
||||
}
|
||||
else if (b_node.is_a(&RNA_ShaderNodeClamp)) {
|
||||
node = new ClampNode();
|
||||
}
|
||||
else if (b_node.is_a(&RNA_ShaderNodeMath)) {
|
||||
BL::ShaderNodeMath b_math_node(b_node);
|
||||
MathNode *math_node = new MathNode();
|
||||
math_node->type = (NodeMathType)b_math_node.operation();
|
||||
math_node->use_clamp = b_math_node.use_clamp();
|
||||
node = math_node;
|
||||
MathNode *math = new MathNode();
|
||||
math->type = (NodeMath)b_math_node.operation();
|
||||
math->use_clamp = b_math_node.use_clamp();
|
||||
node = math;
|
||||
}
|
||||
else if (b_node.is_a(&RNA_ShaderNodeVectorMath)) {
|
||||
BL::ShaderNodeVectorMath b_vector_math_node(b_node);
|
||||
|
@@ -43,7 +43,8 @@ BVHNode *bvh_node_merge_children_recursively(const BVHNode *node)
|
||||
if (node->is_leaf()) {
|
||||
return new LeafNode(*reinterpret_cast<const LeafNode *>(node));
|
||||
}
|
||||
/* Collect nodes of one layer deeper, allowing us to have more children in an inner layer. */
|
||||
/* Collect nodes of one layer deeper, allowing us to have more childrem in
|
||||
* an inner layer. */
|
||||
assert(node->num_children() <= 2);
|
||||
const BVHNode *children[4];
|
||||
const BVHNode *child0 = node->get_child(0);
|
||||
|
@@ -194,7 +194,7 @@ string OpenCLDevice::get_build_options(const DeviceRequestedFeatures &requested_
|
||||
DeviceRequestedFeatures features(requested_features);
|
||||
enable_default_features(features);
|
||||
|
||||
/* Always turn off baking at this point. Baking is only useful when building the bake kernel.
|
||||
/* Always turn off baking at this point. Baking is only usefull when building the bake kernel.
|
||||
* this also makes sure that the kernels that are build during baking can be reused
|
||||
* when not doing any baking. */
|
||||
features.use_baking = false;
|
||||
|
@@ -746,7 +746,7 @@ bool OpenCLInfo::device_supported(const string &platform_name, const cl_device_i
|
||||
}
|
||||
VLOG(3) << "OpenCL driver version " << driver_major << "." << driver_minor;
|
||||
|
||||
/* It is possible to have Iris GPU on AMD/Apple OpenCL framework
|
||||
/* It is possible tyo have Iris GPU on AMD/Apple OpenCL framework
|
||||
* (aka, it will not be on Intel framework). This isn't supported
|
||||
* and needs an explicit blacklist.
|
||||
*/
|
||||
|
@@ -179,7 +179,6 @@ set(SRC_SVM_HEADERS
|
||||
svm/svm_blackbody.h
|
||||
svm/svm_bump.h
|
||||
svm/svm_camera.h
|
||||
svm/svm_clamp.h
|
||||
svm/svm_closure.h
|
||||
svm/svm_convert.h
|
||||
svm/svm_checker.h
|
||||
@@ -199,7 +198,6 @@ set(SRC_SVM_HEADERS
|
||||
svm/svm_invert.h
|
||||
svm/svm_light_path.h
|
||||
svm/svm_magic.h
|
||||
svm/svm_map_range.h
|
||||
svm/svm_mapping.h
|
||||
svm/svm_math.h
|
||||
svm/svm_math_util.h
|
||||
@@ -488,19 +486,6 @@ endif()
|
||||
include_directories(${INC})
|
||||
include_directories(SYSTEM ${INC_SYS})
|
||||
|
||||
if(WITH_COMPILER_ASAN)
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND (NOT WITH_CYCLES_KERNEL_ASAN))
|
||||
# GCC hangs compiling the big kernel files with asan and release, so disable by default.
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=all")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr")
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# With OSL, Cycles disables rtti in some modules, wich then breaks at linking
|
||||
# when trying to use vptr sanitizer (included into 'undefined' general option).
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-sanitize=vptr")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_source_files_properties(kernels/cpu/kernel.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set_source_files_properties(kernels/cpu/kernel_split.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
set_source_files_properties(kernels/cpu/filter.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_KERNEL_FLAGS}")
|
||||
|
@@ -231,7 +231,7 @@ ccl_device float bssrdf_burley_eval(const float d, float r)
|
||||
* NOTES:
|
||||
* - Surface albedo is already included into sc->weight, no need to
|
||||
* multiply by this term here.
|
||||
* - This is normalized diffuse model, so the equation is multiplied
|
||||
* - This is normalized diffuse model, so the equation is mutliplied
|
||||
* by 2*pi, which also matches cdf().
|
||||
*/
|
||||
float exp_r_3_d = expf(-r / (3.0f * d));
|
||||
|
@@ -108,7 +108,7 @@ ccl_device_inline void kernel_filter_finalize(int x,
|
||||
|
||||
/* The weighted average of pixel colors (essentially, the NLM-filtered image).
|
||||
* In case the solution of the linear model fails due to numerical issues or
|
||||
* returns nonsensical negative values, fall back to this value. */
|
||||
* returns non-sensical negative values, fall back to this value. */
|
||||
float3 mean_color = XtWY[0] / XtWX[0];
|
||||
|
||||
math_trimatrix_vec3_solve(XtWX, XtWY, (*rank) + 1, stride);
|
||||
|
@@ -70,9 +70,9 @@ ccl_device void kernel_filter_construct_transform(const float *ccl_restrict buff
|
||||
filter_calculate_scale(feature_scale, use_time);
|
||||
|
||||
/* === Generate the feature transformation. ===
|
||||
* This transformation maps the num_features-dimensional feature space to a reduced feature
|
||||
* (r-feature) space which generally has fewer dimensions.
|
||||
* This mainly helps to prevent over-fitting. */
|
||||
* This transformation maps the num_features-dimentional feature space to a reduced feature
|
||||
* (r-feature) space which generally has fewer dimensions. This mainly helps to prevent
|
||||
* overfitting. */
|
||||
float feature_matrix[DENOISE_FEATURES * DENOISE_FEATURES];
|
||||
math_matrix_zero(feature_matrix, num_features);
|
||||
FOR_PIXEL_WINDOW
|
||||
@@ -85,7 +85,7 @@ ccl_device void kernel_filter_construct_transform(const float *ccl_restrict buff
|
||||
|
||||
math_matrix_jacobi_eigendecomposition(feature_matrix, transform, num_features, 1);
|
||||
*rank = 0;
|
||||
/* Prevent over-fitting when a small window is used. */
|
||||
/* Prevent overfitting when a small window is used. */
|
||||
int max_rank = min(num_features, num_pixels / 3);
|
||||
if (pca_threshold < 0.0f) {
|
||||
float threshold_energy = 0.0f;
|
||||
|
@@ -686,7 +686,8 @@ ccl_device_inline const ShaderClosure *shader_bsdf_pick(ShaderData *sd, float *r
|
||||
if (r < next_sum) {
|
||||
sampled = i;
|
||||
|
||||
/* Rescale to reuse for direction sample, to better preserve stratification. */
|
||||
/* Rescale to reuse for direction sample, to better
|
||||
* preserve stratification. */
|
||||
*randu = (r - partial_sum) / sc->sample_weight;
|
||||
break;
|
||||
}
|
||||
@@ -742,7 +743,8 @@ ccl_device_inline const ShaderClosure *shader_bssrdf_pick(ShaderData *sd,
|
||||
*throughput *= (sum_bsdf + sum_bssrdf) / sum_bssrdf;
|
||||
sampled = i;
|
||||
|
||||
/* Rescale to reuse for direction sample, to better preserve stratification. */
|
||||
/* Rescale to reuse for direction sample, to better
|
||||
* preserve stratifaction. */
|
||||
*randu = (r - partial_sum) / sc->sample_weight;
|
||||
break;
|
||||
}
|
||||
|
@@ -1523,7 +1523,7 @@ static_assert_align(KernelShader, 16);
|
||||
* Queue 1 - Active rays
|
||||
* Queue 2 - Background queue
|
||||
* Queue 3 - Shadow ray cast kernel - AO
|
||||
* Queue 4 - Shadow ray cast kernel - direct lighting
|
||||
* Queeu 4 - Shadow ray cast kernel - direct lighting
|
||||
*/
|
||||
|
||||
/* Queue names */
|
||||
|
@@ -19,10 +19,6 @@
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Make template functions private so symbols don't conflict between kernels with different
|
||||
* instruction sets. */
|
||||
namespace {
|
||||
|
||||
template<typename T> struct TextureInterpolator {
|
||||
#define SET_CUBIC_SPLINE_WEIGHTS(u, t) \
|
||||
{ \
|
||||
@@ -527,8 +523,6 @@ ccl_device float4 kernel_tex_image_interp_3d(
|
||||
}
|
||||
}
|
||||
|
||||
} /* Namespace. */
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
#endif // __KERNEL_CPU_IMAGE_H__
|
||||
|
@@ -29,6 +29,8 @@ set(LIB
|
||||
cycles_render
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}")
|
||||
|
||||
include_directories(${INC})
|
||||
include_directories(SYSTEM ${INC_SYS})
|
||||
|
||||
|
@@ -13,7 +13,6 @@ set(SRC_OSL
|
||||
node_bump.osl
|
||||
node_camera.osl
|
||||
node_checker_texture.osl
|
||||
node_clamp.osl
|
||||
node_combine_rgb.osl
|
||||
node_combine_hsv.osl
|
||||
node_combine_xyz.osl
|
||||
@@ -47,7 +46,6 @@ set(SRC_OSL
|
||||
node_light_falloff.osl
|
||||
node_light_path.osl
|
||||
node_magic_texture.osl
|
||||
node_map_range.osl
|
||||
node_mapping.osl
|
||||
node_math.osl
|
||||
node_mix.osl
|
||||
|
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011-2013 Blender Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "stdosl.h"
|
||||
|
||||
shader node_clamp(float Value = 1.0, float Min = 0.0, float Max = 1.0, output float Result = 0.0)
|
||||
{
|
||||
Result = clamp(Value, Min, Max);
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011-2013 Blender Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "stdosl.h"
|
||||
|
||||
shader node_map_range(float Value = 1.0,
|
||||
float FromMin = 0.0,
|
||||
float FromMax = 1.0,
|
||||
float ToMin = 0.0,
|
||||
float ToMax = 1.0,
|
||||
output float Result = 0.0)
|
||||
{
|
||||
if (FromMax != FromMin) {
|
||||
Result = ToMin + ((Value - FromMin) / (FromMax - FromMin)) * (ToMax - ToMin);
|
||||
}
|
||||
}
|
@@ -18,30 +18,56 @@
|
||||
|
||||
float safe_divide(float a, float b)
|
||||
{
|
||||
return (b != 0.0) ? a / b : 0.0;
|
||||
float result;
|
||||
|
||||
if (b == 0.0)
|
||||
result = 0.0;
|
||||
else
|
||||
result = a / b;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
float safe_modulo(float a, float b)
|
||||
{
|
||||
return (b != 0.0) ? fmod(a, b) : 0.0;
|
||||
float result;
|
||||
|
||||
if (b == 0.0)
|
||||
result = 0.0;
|
||||
else
|
||||
result = fmod(a, b);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
float safe_sqrt(float a)
|
||||
{
|
||||
return (a > 0.0) ? sqrt(a) : 0.0;
|
||||
float result;
|
||||
|
||||
if (a > 0.0)
|
||||
result = sqrt(a);
|
||||
else
|
||||
result = 0.0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
float safe_log(float a, float b)
|
||||
{
|
||||
return (a > 0.0 && b > 0.0) ? log(a) / log(b) : 0.0;
|
||||
if (a < 0.0 || b < 0.0)
|
||||
return 0.0;
|
||||
|
||||
return log(a) / log(b);
|
||||
}
|
||||
|
||||
/* OSL asin, acos, and pow functions are safe by default. */
|
||||
shader node_math(string type = "add",
|
||||
float Value1 = 0.5,
|
||||
float Value2 = 0.5,
|
||||
int use_clamp = 0,
|
||||
float Value1 = 0.0,
|
||||
float Value2 = 0.0,
|
||||
output float Value = 0.0)
|
||||
{
|
||||
/* OSL asin, acos, pow check for values that could give rise to nan */
|
||||
|
||||
if (type == "add")
|
||||
Value = Value1 + Value2;
|
||||
else if (type == "subtract")
|
||||
@@ -50,32 +76,6 @@ shader node_math(string type = "add",
|
||||
Value = Value1 * Value2;
|
||||
else if (type == "divide")
|
||||
Value = safe_divide(Value1, Value2);
|
||||
else if (type == "power")
|
||||
Value = pow(Value1, Value2);
|
||||
else if (type == "logarithm")
|
||||
Value = safe_log(Value1, Value2);
|
||||
else if (type == "sqrt")
|
||||
Value = safe_sqrt(Value1);
|
||||
else if (type == "absolute")
|
||||
Value = fabs(Value1);
|
||||
else if (type == "minimum")
|
||||
Value = min(Value1, Value2);
|
||||
else if (type == "maximum")
|
||||
Value = max(Value1, Value2);
|
||||
else if (type == "less_than")
|
||||
Value = Value1 < Value2;
|
||||
else if (type == "greater_than")
|
||||
Value = Value1 > Value2;
|
||||
else if (type == "round")
|
||||
Value = floor(Value1 + 0.5);
|
||||
else if (type == "floor")
|
||||
Value = floor(Value1);
|
||||
else if (type == "ceil")
|
||||
Value = ceil(Value1);
|
||||
else if (type == "fraction")
|
||||
Value = Value1 - floor(Value1);
|
||||
else if (type == "modulo")
|
||||
Value = safe_modulo(Value1, Value2);
|
||||
else if (type == "sine")
|
||||
Value = sin(Value1);
|
||||
else if (type == "cosine")
|
||||
@@ -88,8 +88,35 @@ shader node_math(string type = "add",
|
||||
Value = acos(Value1);
|
||||
else if (type == "arctangent")
|
||||
Value = atan(Value1);
|
||||
else if (type == "power")
|
||||
Value = pow(Value1, Value2);
|
||||
else if (type == "logarithm")
|
||||
Value = safe_log(Value1, Value2);
|
||||
else if (type == "minimum")
|
||||
Value = min(Value1, Value2);
|
||||
else if (type == "maximum")
|
||||
Value = max(Value1, Value2);
|
||||
else if (type == "round")
|
||||
Value = floor(Value1 + 0.5);
|
||||
else if (type == "less_than")
|
||||
Value = Value1 < Value2;
|
||||
else if (type == "greater_than")
|
||||
Value = Value1 > Value2;
|
||||
else if (type == "modulo")
|
||||
Value = safe_modulo(Value1, Value2);
|
||||
else if (type == "absolute")
|
||||
Value = fabs(Value1);
|
||||
else if (type == "arctan2")
|
||||
Value = atan2(Value1, Value2);
|
||||
else
|
||||
warning("%s", "Unknown math operator!");
|
||||
else if (type == "floor")
|
||||
Value = floor(Value1);
|
||||
else if (type == "ceil")
|
||||
Value = ceil(Value1);
|
||||
else if (type == "fract")
|
||||
Value = Value1 - floor(Value1);
|
||||
else if (type == "sqrt")
|
||||
Value = safe_sqrt(Value1);
|
||||
|
||||
if (use_clamp)
|
||||
Value = clamp(Value, 0.0, 1.0);
|
||||
}
|
||||
|
@@ -192,8 +192,6 @@ CCL_NAMESPACE_END
|
||||
#include "kernel/svm/svm_vector_transform.h"
|
||||
#include "kernel/svm/svm_voxel.h"
|
||||
#include "kernel/svm/svm_bump.h"
|
||||
#include "kernel/svm/svm_map_range.h"
|
||||
#include "kernel/svm/svm_clamp.h"
|
||||
|
||||
#ifdef __SHADER_RAYTRACE__
|
||||
# include "kernel/svm/svm_ao.h"
|
||||
@@ -488,12 +486,6 @@ ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg,
|
||||
case NODE_BLACKBODY:
|
||||
svm_node_blackbody(kg, sd, stack, node.y, node.z);
|
||||
break;
|
||||
case NODE_MAP_RANGE:
|
||||
svm_node_map_range(kg, sd, stack, node.y, node.z, node.w, &offset);
|
||||
break;
|
||||
case NODE_CLAMP:
|
||||
svm_node_clamp(kg, sd, stack, node.y, node.z, node.w, &offset);
|
||||
break;
|
||||
# endif /* __EXTRA_NODES__ */
|
||||
# if NODES_FEATURE(NODE_FEATURE_VOLUME)
|
||||
case NODE_TEX_VOXEL:
|
||||
|
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011-2013 Blender Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Clamp Node */
|
||||
|
||||
ccl_device void svm_node_clamp(KernelGlobals *kg,
|
||||
ShaderData *sd,
|
||||
float *stack,
|
||||
uint value_stack_offset,
|
||||
uint parameters_stack_offsets,
|
||||
uint result_stack_offset,
|
||||
int *offset)
|
||||
{
|
||||
uint min_stack_offset, max_stack_offset;
|
||||
decode_node_uchar4(parameters_stack_offsets, &min_stack_offset, &max_stack_offset, NULL, NULL);
|
||||
|
||||
uint4 defaults = read_node(kg, offset);
|
||||
|
||||
float value = stack_load_float(stack, value_stack_offset);
|
||||
float min = stack_load_float_default(stack, min_stack_offset, defaults.x);
|
||||
float max = stack_load_float_default(stack, max_stack_offset, defaults.y);
|
||||
|
||||
stack_store_float(stack, result_stack_offset, clamp(value, min, max));
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
@@ -25,7 +25,7 @@ ccl_device_inline float interpolate_ies_vertical(
|
||||
* of v (corresponding to the north pole) would result in artifacts. The proper way of dealing
|
||||
* with this would be to lookup the corresponding value on the other side of the pole, but since
|
||||
* the horizontal coordinates might be nonuniform, this would require yet another interpolation.
|
||||
* Therefore, the assumption is made that the light is going to be symmetrical, which means that
|
||||
* Therefore, the assumtion is made that the light is going to be symmetrical, which means that
|
||||
* we can just take the corresponding value at the current horizontal coordinate. */
|
||||
|
||||
#define IES_LOOKUP(v) kernel_tex_fetch(__ies, ofs + h * v_num + (v))
|
||||
|
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2011-2013 Blender Foundation
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Map Range Node */
|
||||
|
||||
ccl_device void svm_node_map_range(KernelGlobals *kg,
|
||||
ShaderData *sd,
|
||||
float *stack,
|
||||
uint value_stack_offset,
|
||||
uint parameters_stack_offsets,
|
||||
uint result_stack_offset,
|
||||
int *offset)
|
||||
{
|
||||
uint from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset;
|
||||
decode_node_uchar4(parameters_stack_offsets,
|
||||
&from_min_stack_offset,
|
||||
&from_max_stack_offset,
|
||||
&to_min_stack_offset,
|
||||
&to_max_stack_offset);
|
||||
|
||||
uint4 defaults = read_node(kg, offset);
|
||||
|
||||
float value = stack_load_float(stack, value_stack_offset);
|
||||
float from_min = stack_load_float_default(stack, from_min_stack_offset, defaults.x);
|
||||
float from_max = stack_load_float_default(stack, from_max_stack_offset, defaults.y);
|
||||
float to_min = stack_load_float_default(stack, to_min_stack_offset, defaults.z);
|
||||
float to_max = stack_load_float_default(stack, to_max_stack_offset, defaults.w);
|
||||
|
||||
float result;
|
||||
if (from_max != from_min) {
|
||||
result = to_min + ((value - from_min) / (from_max - from_min)) * (to_max - to_min);
|
||||
}
|
||||
else {
|
||||
result = 0.0f;
|
||||
}
|
||||
stack_store_float(stack, result_stack_offset, result);
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
@@ -16,22 +16,24 @@
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Nodes */
|
||||
|
||||
ccl_device void svm_node_math(KernelGlobals *kg,
|
||||
ShaderData *sd,
|
||||
float *stack,
|
||||
uint type,
|
||||
uint inputs_stack_offsets,
|
||||
uint result_stack_offset,
|
||||
uint itype,
|
||||
uint f1_offset,
|
||||
uint f2_offset,
|
||||
int *offset)
|
||||
{
|
||||
uint a_stack_offset, b_stack_offset;
|
||||
decode_node_uchar4(inputs_stack_offsets, &a_stack_offset, &b_stack_offset, NULL, NULL);
|
||||
NodeMath type = (NodeMath)itype;
|
||||
float f1 = stack_load_float(stack, f1_offset);
|
||||
float f2 = stack_load_float(stack, f2_offset);
|
||||
float f = svm_math(type, f1, f2);
|
||||
|
||||
float a = stack_load_float(stack, a_stack_offset);
|
||||
float b = stack_load_float(stack, b_stack_offset);
|
||||
float result = svm_math((NodeMathType)type, a, b);
|
||||
uint4 node1 = read_node(kg, offset);
|
||||
|
||||
stack_store_float(stack, result_stack_offset, result);
|
||||
stack_store_float(stack, node1.y, f);
|
||||
}
|
||||
|
||||
ccl_device void svm_node_vector_math(KernelGlobals *kg,
|
||||
|
@@ -51,60 +51,64 @@ ccl_device void svm_vector_math(
|
||||
}
|
||||
}
|
||||
|
||||
ccl_device float svm_math(NodeMathType type, float a, float b)
|
||||
ccl_device float svm_math(NodeMath type, float Fac1, float Fac2)
|
||||
{
|
||||
switch (type) {
|
||||
case NODE_MATH_ADD:
|
||||
return a + b;
|
||||
case NODE_MATH_SUBTRACT:
|
||||
return a - b;
|
||||
case NODE_MATH_MULTIPLY:
|
||||
return a * b;
|
||||
case NODE_MATH_DIVIDE:
|
||||
return safe_divide(a, b);
|
||||
case NODE_MATH_POWER:
|
||||
return safe_powf(a, b);
|
||||
case NODE_MATH_LOGARITHM:
|
||||
return safe_logf(a, b);
|
||||
case NODE_MATH_SQRT:
|
||||
return safe_sqrtf(a);
|
||||
case NODE_MATH_ABSOLUTE:
|
||||
return fabsf(a);
|
||||
case NODE_MATH_MINIMUM:
|
||||
return fminf(a, b);
|
||||
case NODE_MATH_MAXIMUM:
|
||||
return fmaxf(a, b);
|
||||
case NODE_MATH_LESS_THAN:
|
||||
return a < b;
|
||||
case NODE_MATH_GREATER_THAN:
|
||||
return a > b;
|
||||
case NODE_MATH_ROUND:
|
||||
return floorf(a + 0.5f);
|
||||
case NODE_MATH_FLOOR:
|
||||
return floorf(a);
|
||||
case NODE_MATH_CEIL:
|
||||
return ceilf(a);
|
||||
case NODE_MATH_FRACTION:
|
||||
return a - floorf(a);
|
||||
case NODE_MATH_MODULO:
|
||||
return safe_modulo(a, b);
|
||||
case NODE_MATH_SINE:
|
||||
return sinf(a);
|
||||
case NODE_MATH_COSINE:
|
||||
return cosf(a);
|
||||
case NODE_MATH_TANGENT:
|
||||
return tanf(a);
|
||||
case NODE_MATH_ARCSINE:
|
||||
return safe_asinf(a);
|
||||
case NODE_MATH_ARCCOSINE:
|
||||
return safe_acosf(a);
|
||||
case NODE_MATH_ARCTANGENT:
|
||||
return atanf(a);
|
||||
case NODE_MATH_ARCTAN2:
|
||||
return atan2f(a, b);
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
float Fac;
|
||||
|
||||
if (type == NODE_MATH_ADD)
|
||||
Fac = Fac1 + Fac2;
|
||||
else if (type == NODE_MATH_SUBTRACT)
|
||||
Fac = Fac1 - Fac2;
|
||||
else if (type == NODE_MATH_MULTIPLY)
|
||||
Fac = Fac1 * Fac2;
|
||||
else if (type == NODE_MATH_DIVIDE)
|
||||
Fac = safe_divide(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_SINE)
|
||||
Fac = sinf(Fac1);
|
||||
else if (type == NODE_MATH_COSINE)
|
||||
Fac = cosf(Fac1);
|
||||
else if (type == NODE_MATH_TANGENT)
|
||||
Fac = tanf(Fac1);
|
||||
else if (type == NODE_MATH_ARCSINE)
|
||||
Fac = safe_asinf(Fac1);
|
||||
else if (type == NODE_MATH_ARCCOSINE)
|
||||
Fac = safe_acosf(Fac1);
|
||||
else if (type == NODE_MATH_ARCTANGENT)
|
||||
Fac = atanf(Fac1);
|
||||
else if (type == NODE_MATH_POWER)
|
||||
Fac = safe_powf(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_LOGARITHM)
|
||||
Fac = safe_logf(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_MINIMUM)
|
||||
Fac = fminf(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_MAXIMUM)
|
||||
Fac = fmaxf(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_ROUND)
|
||||
Fac = floorf(Fac1 + 0.5f);
|
||||
else if (type == NODE_MATH_LESS_THAN)
|
||||
Fac = Fac1 < Fac2;
|
||||
else if (type == NODE_MATH_GREATER_THAN)
|
||||
Fac = Fac1 > Fac2;
|
||||
else if (type == NODE_MATH_MODULO)
|
||||
Fac = safe_modulo(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_ABSOLUTE)
|
||||
Fac = fabsf(Fac1);
|
||||
else if (type == NODE_MATH_ARCTAN2)
|
||||
Fac = atan2f(Fac1, Fac2);
|
||||
else if (type == NODE_MATH_FLOOR)
|
||||
Fac = floorf(Fac1);
|
||||
else if (type == NODE_MATH_CEIL)
|
||||
Fac = ceilf(Fac1);
|
||||
else if (type == NODE_MATH_FRACT)
|
||||
Fac = Fac1 - floorf(Fac1);
|
||||
else if (type == NODE_MATH_SQRT)
|
||||
Fac = safe_sqrtf(Fac1);
|
||||
else if (type == NODE_MATH_CLAMP)
|
||||
Fac = saturate(Fac1);
|
||||
else
|
||||
Fac = 0.0f;
|
||||
|
||||
return Fac;
|
||||
}
|
||||
|
||||
/* Calculate color in range 800..12000 using an approximation
|
||||
|
@@ -138,8 +138,6 @@ typedef enum ShaderNodeType {
|
||||
NODE_VECTOR_DISPLACEMENT,
|
||||
NODE_PRINCIPLED_VOLUME,
|
||||
NODE_IES,
|
||||
NODE_MAP_RANGE,
|
||||
NODE_CLAMP,
|
||||
} ShaderNodeType;
|
||||
|
||||
typedef enum NodeAttributeType {
|
||||
@@ -244,7 +242,7 @@ typedef enum NodeMix {
|
||||
NODE_MIX_CLAMP /* used for the clamp UI option */
|
||||
} NodeMix;
|
||||
|
||||
typedef enum NodeMathType {
|
||||
typedef enum NodeMath {
|
||||
NODE_MATH_ADD,
|
||||
NODE_MATH_SUBTRACT,
|
||||
NODE_MATH_MULTIPLY,
|
||||
@@ -267,9 +265,10 @@ typedef enum NodeMathType {
|
||||
NODE_MATH_ARCTAN2,
|
||||
NODE_MATH_FLOOR,
|
||||
NODE_MATH_CEIL,
|
||||
NODE_MATH_FRACTION,
|
||||
NODE_MATH_FRACT,
|
||||
NODE_MATH_SQRT,
|
||||
} NodeMathType;
|
||||
NODE_MATH_CLAMP /* used for the clamp UI option */
|
||||
} NodeMath;
|
||||
|
||||
typedef enum NodeVectorMath {
|
||||
NODE_VECTOR_MATH_ADD,
|
||||
|
@@ -85,6 +85,8 @@ if(WITH_CYCLES_OSL)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}")
|
||||
|
||||
include_directories(${INC})
|
||||
include_directories(SYSTEM ${INC_SYS})
|
||||
|
||||
|
@@ -565,7 +565,8 @@ float3 Camera::transform_raster_to_world(float raster_x, float raster_y)
|
||||
BoundBox Camera::viewplane_bounds_get()
|
||||
{
|
||||
/* TODO(sergey): This is all rather stupid, but is there a way to perform
|
||||
* checks we need in a more clear and smart fashion? */
|
||||
* checks we need in a more clear and smart fasion?
|
||||
*/
|
||||
BoundBox bounds = BoundBox::empty;
|
||||
|
||||
if (type == CAMERA_PANORAMA) {
|
||||
|
@@ -301,7 +301,7 @@ void ConstantFolder::fold_mix(NodeMix type, bool clamp) const
|
||||
}
|
||||
}
|
||||
|
||||
void ConstantFolder::fold_math(NodeMathType type) const
|
||||
void ConstantFolder::fold_math(NodeMath type, bool clamp) const
|
||||
{
|
||||
ShaderInput *value1_in = node->input("Value1");
|
||||
ShaderInput *value2_in = node->input("Value2");
|
||||
@@ -310,25 +310,25 @@ void ConstantFolder::fold_math(NodeMathType type) const
|
||||
case NODE_MATH_ADD:
|
||||
/* X + 0 == 0 + X == X */
|
||||
if (is_zero(value1_in)) {
|
||||
try_bypass_or_make_constant(value2_in);
|
||||
try_bypass_or_make_constant(value2_in, clamp);
|
||||
}
|
||||
else if (is_zero(value2_in)) {
|
||||
try_bypass_or_make_constant(value1_in);
|
||||
try_bypass_or_make_constant(value1_in, clamp);
|
||||
}
|
||||
break;
|
||||
case NODE_MATH_SUBTRACT:
|
||||
/* X - 0 == X */
|
||||
if (is_zero(value2_in)) {
|
||||
try_bypass_or_make_constant(value1_in);
|
||||
try_bypass_or_make_constant(value1_in, clamp);
|
||||
}
|
||||
break;
|
||||
case NODE_MATH_MULTIPLY:
|
||||
/* X * 1 == 1 * X == X */
|
||||
if (is_one(value1_in)) {
|
||||
try_bypass_or_make_constant(value2_in);
|
||||
try_bypass_or_make_constant(value2_in, clamp);
|
||||
}
|
||||
else if (is_one(value2_in)) {
|
||||
try_bypass_or_make_constant(value1_in);
|
||||
try_bypass_or_make_constant(value1_in, clamp);
|
||||
}
|
||||
/* X * 0 == 0 * X == 0 */
|
||||
else if (is_zero(value1_in) || is_zero(value2_in)) {
|
||||
@@ -338,7 +338,7 @@ void ConstantFolder::fold_math(NodeMathType type) const
|
||||
case NODE_MATH_DIVIDE:
|
||||
/* X / 1 == X */
|
||||
if (is_one(value2_in)) {
|
||||
try_bypass_or_make_constant(value1_in);
|
||||
try_bypass_or_make_constant(value1_in, clamp);
|
||||
}
|
||||
/* 0 / X == 0 */
|
||||
else if (is_zero(value1_in)) {
|
||||
@@ -352,7 +352,7 @@ void ConstantFolder::fold_math(NodeMathType type) const
|
||||
}
|
||||
/* X ^ 1 == X */
|
||||
else if (is_one(value2_in)) {
|
||||
try_bypass_or_make_constant(value1_in);
|
||||
try_bypass_or_make_constant(value1_in, clamp);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
@@ -64,7 +64,7 @@ class ConstantFolder {
|
||||
|
||||
/* Specific nodes. */
|
||||
void fold_mix(NodeMix type, bool clamp) const;
|
||||
void fold_math(NodeMathType type) const;
|
||||
void fold_math(NodeMath type, bool clamp) const;
|
||||
void fold_vector_math(NodeVectorMath type) const;
|
||||
};
|
||||
|
||||
|
@@ -978,7 +978,7 @@ void ShaderGraph::bump_from_displacement(bool use_object_space)
|
||||
foreach (NodePair &pair, nodes_dy)
|
||||
pair.second->bump = SHADER_BUMP_DY;
|
||||
|
||||
/* add set normal node and connect the bump normal output to the set normal
|
||||
/* add set normal node and connect the bump normal ouput to the set normal
|
||||
* output, so it can finally set the shader normal, note we are only doing
|
||||
* this for bump from displacement, this will be the only bump allowed to
|
||||
* overwrite the shader normal */
|
||||
|
@@ -944,7 +944,7 @@ void LightManager::tag_update(Scene * /*scene*/)
|
||||
need_update = true;
|
||||
}
|
||||
|
||||
int LightManager::add_ies_from_file(const string &filename)
|
||||
int LightManager::add_ies_from_file(ustring filename)
|
||||
{
|
||||
string content;
|
||||
|
||||
@@ -953,10 +953,10 @@ int LightManager::add_ies_from_file(const string &filename)
|
||||
content = "\n";
|
||||
}
|
||||
|
||||
return add_ies(content);
|
||||
return add_ies(ustring(content));
|
||||
}
|
||||
|
||||
int LightManager::add_ies(const string &content)
|
||||
int LightManager::add_ies(ustring content)
|
||||
{
|
||||
uint hash = hash_string(content.c_str());
|
||||
|
||||
|
@@ -92,8 +92,8 @@ class LightManager {
|
||||
~LightManager();
|
||||
|
||||
/* IES texture management */
|
||||
int add_ies(const string &ies);
|
||||
int add_ies_from_file(const string &filename);
|
||||
int add_ies(ustring ies);
|
||||
int add_ies_from_file(ustring filename);
|
||||
void remove_ies(int slot);
|
||||
|
||||
void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress);
|
||||
|
@@ -1091,17 +1091,6 @@ bool Mesh::has_true_displacement() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Mesh::has_voxel_attributes() const
|
||||
{
|
||||
foreach (const Attribute &attr, attributes.attributes) {
|
||||
if (attr.element == ATTR_ELEMENT_VOXEL) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
float Mesh::motion_time(int step) const
|
||||
{
|
||||
return (motion_steps > 1) ? 2.0f * step / (motion_steps - 1) - 1.0f : 0.0f;
|
||||
@@ -2031,7 +2020,15 @@ void MeshManager::device_update_preprocess(Device *device, Scene *scene, Progres
|
||||
|
||||
if (need_update && mesh->has_volume) {
|
||||
/* Create volume meshes if there is voxel data. */
|
||||
if (mesh->has_voxel_attributes()) {
|
||||
bool has_voxel_attributes = false;
|
||||
|
||||
foreach (Attribute &attr, mesh->attributes.attributes) {
|
||||
if (attr.element == ATTR_ELEMENT_VOXEL) {
|
||||
has_voxel_attributes = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (has_voxel_attributes) {
|
||||
if (!volume_images_updated) {
|
||||
progress.set_status("Updating Meshes Volume Bounds");
|
||||
device_update_volume_images(device, scene, progress);
|
||||
|
@@ -318,7 +318,6 @@ class Mesh : public Node {
|
||||
|
||||
bool has_motion_blur() const;
|
||||
bool has_true_displacement() const;
|
||||
bool has_voxel_attributes() const;
|
||||
|
||||
/* Convert between normalized -1..1 motion time and index
|
||||
* in the VERTEX_MOTION attribute. */
|
||||
|
@@ -1067,10 +1067,10 @@ void IESLightNode::get_slot()
|
||||
|
||||
if (slot == -1) {
|
||||
if (ies.empty()) {
|
||||
slot = light_manager->add_ies_from_file(filename.string());
|
||||
slot = light_manager->add_ies_from_file(filename);
|
||||
}
|
||||
else {
|
||||
slot = light_manager->add_ies(ies.string());
|
||||
slot = light_manager->add_ies(ies);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5259,140 +5259,6 @@ void OutputNode::compile(OSLCompiler &compiler)
|
||||
compiler.add(this, "node_output_displacement");
|
||||
}
|
||||
|
||||
/* Map Range Node */
|
||||
|
||||
NODE_DEFINE(MapRangeNode)
|
||||
{
|
||||
NodeType *type = NodeType::add("map_range", create, NodeType::SHADER);
|
||||
|
||||
SOCKET_IN_FLOAT(value, "Value", 1.0f);
|
||||
SOCKET_IN_FLOAT(from_min, "From Min", 0.0f);
|
||||
SOCKET_IN_FLOAT(from_max, "From Max", 1.0f);
|
||||
SOCKET_IN_FLOAT(to_min, "To Min", 0.0f);
|
||||
SOCKET_IN_FLOAT(to_max, "To Max", 1.0f);
|
||||
|
||||
SOCKET_OUT_FLOAT(result, "Result");
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
MapRangeNode::MapRangeNode() : ShaderNode(node_type)
|
||||
{
|
||||
}
|
||||
|
||||
void MapRangeNode::expand(ShaderGraph *graph)
|
||||
{
|
||||
if (clamp) {
|
||||
ShaderOutput *result_out = output("Result");
|
||||
if (!result_out->links.empty()) {
|
||||
ClampNode *clamp_node = new ClampNode();
|
||||
clamp_node->min = to_min;
|
||||
clamp_node->max = to_max;
|
||||
graph->add(clamp_node);
|
||||
graph->relink(result_out, clamp_node->output("Result"));
|
||||
graph->connect(result_out, clamp_node->input("Value"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MapRangeNode::constant_fold(const ConstantFolder &folder)
|
||||
{
|
||||
if (folder.all_inputs_constant()) {
|
||||
float result;
|
||||
if (from_max != from_min) {
|
||||
result = to_min + ((value - from_min) / (from_max - from_min)) * (to_max - to_min);
|
||||
}
|
||||
else {
|
||||
result = 0.0f;
|
||||
}
|
||||
folder.make_constant(result);
|
||||
}
|
||||
}
|
||||
|
||||
void MapRangeNode::compile(SVMCompiler &compiler)
|
||||
{
|
||||
ShaderInput *value_in = input("Value");
|
||||
ShaderInput *from_min_in = input("From Min");
|
||||
ShaderInput *from_max_in = input("From Max");
|
||||
ShaderInput *to_min_in = input("To Min");
|
||||
ShaderInput *to_max_in = input("To Max");
|
||||
ShaderOutput *result_out = output("Result");
|
||||
|
||||
int value_stack_offset = compiler.stack_assign(value_in);
|
||||
int from_min_stack_offset = compiler.stack_assign_if_linked(from_min_in);
|
||||
int from_max_stack_offset = compiler.stack_assign_if_linked(from_max_in);
|
||||
int to_min_stack_offset = compiler.stack_assign_if_linked(to_min_in);
|
||||
int to_max_stack_offset = compiler.stack_assign_if_linked(to_max_in);
|
||||
int result_stack_offset = compiler.stack_assign(result_out);
|
||||
|
||||
compiler.add_node(
|
||||
NODE_MAP_RANGE,
|
||||
value_stack_offset,
|
||||
compiler.encode_uchar4(
|
||||
from_min_stack_offset, from_max_stack_offset, to_min_stack_offset, to_max_stack_offset),
|
||||
result_stack_offset);
|
||||
|
||||
compiler.add_node(__float_as_int(from_min),
|
||||
__float_as_int(from_max),
|
||||
__float_as_int(to_min),
|
||||
__float_as_int(to_max));
|
||||
}
|
||||
|
||||
void MapRangeNode::compile(OSLCompiler &compiler)
|
||||
{
|
||||
compiler.add(this, "node_map_range");
|
||||
}
|
||||
|
||||
/* Clamp Node */
|
||||
|
||||
NODE_DEFINE(ClampNode)
|
||||
{
|
||||
NodeType *type = NodeType::add("clamp", create, NodeType::SHADER);
|
||||
|
||||
SOCKET_IN_FLOAT(value, "Value", 1.0f);
|
||||
SOCKET_IN_FLOAT(min, "Min", 0.0f);
|
||||
SOCKET_IN_FLOAT(max, "Max", 1.0f);
|
||||
|
||||
SOCKET_OUT_FLOAT(result, "Result");
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
ClampNode::ClampNode() : ShaderNode(node_type)
|
||||
{
|
||||
}
|
||||
|
||||
void ClampNode::constant_fold(const ConstantFolder &folder)
|
||||
{
|
||||
if (folder.all_inputs_constant()) {
|
||||
folder.make_constant(clamp(value, min, max));
|
||||
}
|
||||
}
|
||||
|
||||
void ClampNode::compile(SVMCompiler &compiler)
|
||||
{
|
||||
ShaderInput *value_in = input("Value");
|
||||
ShaderInput *min_in = input("Min");
|
||||
ShaderInput *max_in = input("Max");
|
||||
ShaderOutput *result_out = output("Result");
|
||||
|
||||
int value_stack_offset = compiler.stack_assign(value_in);
|
||||
int min_stack_offset = compiler.stack_assign(min_in);
|
||||
int max_stack_offset = compiler.stack_assign(max_in);
|
||||
int result_stack_offset = compiler.stack_assign(result_out);
|
||||
|
||||
compiler.add_node(NODE_CLAMP,
|
||||
value_stack_offset,
|
||||
compiler.encode_uchar4(min_stack_offset, max_stack_offset),
|
||||
result_stack_offset);
|
||||
compiler.add_node(__float_as_int(min), __float_as_int(max));
|
||||
}
|
||||
|
||||
void ClampNode::compile(OSLCompiler &compiler)
|
||||
{
|
||||
compiler.add(this, "node_clamp");
|
||||
}
|
||||
|
||||
/* Math */
|
||||
|
||||
NODE_DEFINE(MathNode)
|
||||
@@ -5422,12 +5288,14 @@ NODE_DEFINE(MathNode)
|
||||
type_enum.insert("arctan2", NODE_MATH_ARCTAN2);
|
||||
type_enum.insert("floor", NODE_MATH_FLOOR);
|
||||
type_enum.insert("ceil", NODE_MATH_CEIL);
|
||||
type_enum.insert("fraction", NODE_MATH_FRACTION);
|
||||
type_enum.insert("fract", NODE_MATH_FRACT);
|
||||
type_enum.insert("sqrt", NODE_MATH_SQRT);
|
||||
SOCKET_ENUM(type, "Type", type_enum, NODE_MATH_ADD);
|
||||
|
||||
SOCKET_IN_FLOAT(value1, "Value1", 0.5f);
|
||||
SOCKET_IN_FLOAT(value2, "Value2", 0.5f);
|
||||
SOCKET_BOOLEAN(use_clamp, "Use Clamp", false);
|
||||
|
||||
SOCKET_IN_FLOAT(value1, "Value1", 0.0f);
|
||||
SOCKET_IN_FLOAT(value2, "Value2", 0.0f);
|
||||
|
||||
SOCKET_OUT_FLOAT(value, "Value");
|
||||
|
||||
@@ -5438,28 +5306,13 @@ MathNode::MathNode() : ShaderNode(node_type)
|
||||
{
|
||||
}
|
||||
|
||||
void MathNode::expand(ShaderGraph *graph)
|
||||
{
|
||||
if (use_clamp) {
|
||||
ShaderOutput *result_out = output("Value");
|
||||
if (!result_out->links.empty()) {
|
||||
ClampNode *clamp_node = new ClampNode();
|
||||
clamp_node->min = 0.0f;
|
||||
clamp_node->max = 1.0f;
|
||||
graph->add(clamp_node);
|
||||
graph->relink(result_out, clamp_node->output("Result"));
|
||||
graph->connect(result_out, clamp_node->input("Value"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MathNode::constant_fold(const ConstantFolder &folder)
|
||||
{
|
||||
if (folder.all_inputs_constant()) {
|
||||
folder.make_constant(svm_math(type, value1, value2));
|
||||
folder.make_constant_clamp(svm_math(type, value1, value2), use_clamp);
|
||||
}
|
||||
else {
|
||||
folder.fold_math(type);
|
||||
folder.fold_math(type, use_clamp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5469,19 +5322,20 @@ void MathNode::compile(SVMCompiler &compiler)
|
||||
ShaderInput *value2_in = input("Value2");
|
||||
ShaderOutput *value_out = output("Value");
|
||||
|
||||
int value1_stack_offset = compiler.stack_assign(value1_in);
|
||||
int value2_stack_offset = compiler.stack_assign(value2_in);
|
||||
int value_stack_offset = compiler.stack_assign(value_out);
|
||||
compiler.add_node(
|
||||
NODE_MATH, type, compiler.stack_assign(value1_in), compiler.stack_assign(value2_in));
|
||||
compiler.add_node(NODE_MATH, compiler.stack_assign(value_out));
|
||||
|
||||
compiler.add_node(NODE_MATH,
|
||||
type,
|
||||
compiler.encode_uchar4(value1_stack_offset, value2_stack_offset),
|
||||
value_stack_offset);
|
||||
if (use_clamp) {
|
||||
compiler.add_node(NODE_MATH, NODE_MATH_CLAMP, compiler.stack_assign(value_out));
|
||||
compiler.add_node(NODE_MATH, compiler.stack_assign(value_out));
|
||||
}
|
||||
}
|
||||
|
||||
void MathNode::compile(OSLCompiler &compiler)
|
||||
{
|
||||
compiler.parameter(this, "type");
|
||||
compiler.parameter(this, "use_clamp");
|
||||
compiler.add(this, "node_math");
|
||||
}
|
||||
|
||||
|
@@ -1228,31 +1228,6 @@ class BlackbodyNode : public ShaderNode {
|
||||
float temperature;
|
||||
};
|
||||
|
||||
class MapRangeNode : public ShaderNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(MapRangeNode)
|
||||
void constant_fold(const ConstantFolder &folder);
|
||||
virtual int get_group()
|
||||
{
|
||||
return NODE_GROUP_LEVEL_3;
|
||||
}
|
||||
void expand(ShaderGraph *graph);
|
||||
|
||||
float value, from_min, from_max, to_min, to_max;
|
||||
bool clamp;
|
||||
};
|
||||
|
||||
class ClampNode : public ShaderNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(ClampNode)
|
||||
void constant_fold(const ConstantFolder &folder);
|
||||
virtual int get_group()
|
||||
{
|
||||
return NODE_GROUP_LEVEL_3;
|
||||
}
|
||||
float value, min, max;
|
||||
};
|
||||
|
||||
class MathNode : public ShaderNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(MathNode)
|
||||
@@ -1260,12 +1235,11 @@ class MathNode : public ShaderNode {
|
||||
{
|
||||
return NODE_GROUP_LEVEL_1;
|
||||
}
|
||||
void expand(ShaderGraph *graph);
|
||||
void constant_fold(const ConstantFolder &folder);
|
||||
|
||||
float value1;
|
||||
float value2;
|
||||
NodeMathType type;
|
||||
NodeMath type;
|
||||
bool use_clamp;
|
||||
};
|
||||
|
||||
|
@@ -152,7 +152,7 @@ void OSLShaderManager::device_update(Device *device,
|
||||
{
|
||||
/* Perform greedyjit optimization.
|
||||
*
|
||||
* This might waste time on optimizing groups which are never actually
|
||||
* This might waste time on optimizing gorups which are never actually
|
||||
* used, but this prevents OSL from allocating data on TLS at render
|
||||
* time.
|
||||
*
|
||||
|
@@ -985,7 +985,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
|
||||
substatus += string_printf(", Prefiltered %d tiles", progress.get_denoised_tiles());
|
||||
}
|
||||
}
|
||||
else if (tile_manager.num_samples == Integrator::MAX_SAMPLES)
|
||||
else if (tile_manager.num_samples == INT_MAX)
|
||||
substatus = string_printf("Path Tracing Sample %d", progressive_sample + 1);
|
||||
else
|
||||
substatus = string_printf("Path Tracing Sample %d/%d", progressive_sample + 1, num_samples);
|
||||
|
@@ -62,7 +62,7 @@ typedef struct SobolDirectionNumbers {
|
||||
|
||||
/* Keep simple alignment. */
|
||||
/* clang-format off */
|
||||
static const SobolDirectionNumbers SOBOL_NUMBERS[SOBOL_MAX_DIMENSIONS - 1] = {
|
||||
static SobolDirectionNumbers SOBOL_NUMBERS[SOBOL_MAX_DIMENSIONS - 1] = {
|
||||
{2, 1, 0, {1}},
|
||||
{3, 2, 1, {1, 3}},
|
||||
{4, 3, 1, {1, 3, 1}},
|
||||
@@ -21279,10 +21279,10 @@ void sobol_generate_direction_vectors(uint vectors[][SOBOL_BITS], int dimensions
|
||||
v[i] = 1 << (31 - i); // all m's = 1
|
||||
|
||||
for (int dim = 1; dim < dimensions; dim++) {
|
||||
const SobolDirectionNumbers *numbers = &SOBOL_NUMBERS[dim - 1];
|
||||
const uint s = numbers->s;
|
||||
const uint a = numbers->a;
|
||||
const uint *m = numbers->m;
|
||||
SobolDirectionNumbers *numbers = &SOBOL_NUMBERS[dim - 1];
|
||||
uint s = numbers->s;
|
||||
uint a = numbers->a;
|
||||
uint *m = numbers->m;
|
||||
|
||||
v = vectors[dim];
|
||||
|
||||
|
@@ -29,7 +29,7 @@ CCL_NAMESPACE_BEGIN
|
||||
* semantic around the units of size, it just should be the same for all
|
||||
* entries.
|
||||
*
|
||||
* This is a generic entry for all size-related statistics, which helps
|
||||
* This is a generic entry foi all size-related statistics, which helps
|
||||
* avoiding duplicating code for things like sorting.
|
||||
*/
|
||||
class NamedSizeEntry {
|
||||
|
@@ -47,23 +47,46 @@ void SVMShaderManager::reset(Scene * /*scene*/)
|
||||
void SVMShaderManager::device_update_shader(Scene *scene,
|
||||
Shader *shader,
|
||||
Progress *progress,
|
||||
array<int4> *svm_nodes)
|
||||
array<int4> *global_svm_nodes)
|
||||
{
|
||||
if (progress->get_cancel()) {
|
||||
return;
|
||||
}
|
||||
assert(shader->graph);
|
||||
|
||||
svm_nodes->push_back_slow(make_int4(NODE_SHADER_JUMP, 0, 0, 0));
|
||||
array<int4> svm_nodes;
|
||||
svm_nodes.push_back_slow(make_int4(NODE_SHADER_JUMP, 0, 0, 0));
|
||||
|
||||
SVMCompiler::Summary summary;
|
||||
SVMCompiler compiler(scene->shader_manager, scene->image_manager, scene->light_manager);
|
||||
compiler.background = (shader == scene->default_background);
|
||||
compiler.compile(scene, shader, *svm_nodes, 0, &summary);
|
||||
compiler.compile(scene, shader, svm_nodes, 0, &summary);
|
||||
|
||||
VLOG(2) << "Compilation summary:\n"
|
||||
<< "Shader name: " << shader->name << "\n"
|
||||
<< summary.full_report();
|
||||
|
||||
nodes_lock_.lock();
|
||||
if (shader->use_mis && shader->has_surface_emission) {
|
||||
scene->light_manager->need_update = true;
|
||||
}
|
||||
|
||||
/* The copy needs to be done inside the lock, if another thread resizes the array
|
||||
* while memcpy is running, it'll be copying into possibly invalid/freed ram.
|
||||
*/
|
||||
size_t global_nodes_size = global_svm_nodes->size();
|
||||
global_svm_nodes->resize(global_nodes_size + svm_nodes.size());
|
||||
|
||||
/* Offset local SVM nodes to a global address space. */
|
||||
int4 &jump_node = (*global_svm_nodes)[shader->id];
|
||||
jump_node.y = svm_nodes[0].y + global_nodes_size - 1;
|
||||
jump_node.z = svm_nodes[0].z + global_nodes_size - 1;
|
||||
jump_node.w = svm_nodes[0].w + global_nodes_size - 1;
|
||||
/* Copy new nodes to global storage. */
|
||||
memcpy(&(*global_svm_nodes)[global_nodes_size],
|
||||
&svm_nodes[1],
|
||||
sizeof(int4) * (svm_nodes.size() - 1));
|
||||
nodes_lock_.unlock();
|
||||
}
|
||||
|
||||
void SVMShaderManager::device_update(Device *device,
|
||||
@@ -74,9 +97,7 @@ void SVMShaderManager::device_update(Device *device,
|
||||
if (!need_update)
|
||||
return;
|
||||
|
||||
const int num_shaders = scene->shaders.size();
|
||||
|
||||
VLOG(1) << "Total " << num_shaders << " shaders.";
|
||||
VLOG(1) << "Total " << scene->shaders.size() << " shaders.";
|
||||
|
||||
double start_time = time_dt();
|
||||
|
||||
@@ -86,17 +107,20 @@ void SVMShaderManager::device_update(Device *device,
|
||||
/* determine which shaders are in use */
|
||||
device_update_shaders_used(scene);
|
||||
|
||||
/* Build all shaders. */
|
||||
/* svm_nodes */
|
||||
array<int4> svm_nodes;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < scene->shaders.size(); i++) {
|
||||
svm_nodes.push_back_slow(make_int4(NODE_SHADER_JUMP, 0, 0, 0));
|
||||
}
|
||||
|
||||
TaskPool task_pool;
|
||||
vector<array<int4>> shader_svm_nodes(num_shaders);
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
task_pool.push(function_bind(&SVMShaderManager::device_update_shader,
|
||||
this,
|
||||
scene,
|
||||
scene->shaders[i],
|
||||
&progress,
|
||||
&shader_svm_nodes[i]),
|
||||
false);
|
||||
foreach (Shader *shader, scene->shaders) {
|
||||
task_pool.push(
|
||||
function_bind(
|
||||
&SVMShaderManager::device_update_shader, this, scene, shader, &progress, &svm_nodes),
|
||||
false);
|
||||
}
|
||||
task_pool.wait_work();
|
||||
|
||||
@@ -104,60 +128,20 @@ void SVMShaderManager::device_update(Device *device,
|
||||
return;
|
||||
}
|
||||
|
||||
/* The global node list contains a jump table (one node per shader)
|
||||
* followed by the nodes of all shaders. */
|
||||
int svm_nodes_size = num_shaders;
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
/* Since we're not copying the local jump node, the size ends up being one node lower. */
|
||||
svm_nodes_size += shader_svm_nodes[i].size() - 1;
|
||||
}
|
||||
|
||||
int4 *svm_nodes = dscene->svm_nodes.alloc(svm_nodes_size);
|
||||
|
||||
int node_offset = num_shaders;
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
Shader *shader = scene->shaders[i];
|
||||
|
||||
shader->need_update = false;
|
||||
if (shader->use_mis && shader->has_surface_emission) {
|
||||
scene->light_manager->need_update = true;
|
||||
}
|
||||
|
||||
/* Update the global jump table.
|
||||
* Each compiled shader starts with a jump node that has offsets local
|
||||
* to the shader, so copy those and add the offset into the global node list. */
|
||||
int4 &global_jump_node = svm_nodes[shader->id];
|
||||
int4 &local_jump_node = shader_svm_nodes[i][0];
|
||||
|
||||
global_jump_node.x = NODE_SHADER_JUMP;
|
||||
global_jump_node.y = local_jump_node.y - 1 + node_offset;
|
||||
global_jump_node.z = local_jump_node.z - 1 + node_offset;
|
||||
global_jump_node.w = local_jump_node.w - 1 + node_offset;
|
||||
|
||||
node_offset += shader_svm_nodes[i].size() - 1;
|
||||
}
|
||||
|
||||
/* Copy the nodes of each shader into the correct location. */
|
||||
svm_nodes += num_shaders;
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
int shader_size = shader_svm_nodes[i].size() - 1;
|
||||
|
||||
memcpy(svm_nodes, &shader_svm_nodes[i][1], sizeof(int4) * shader_size);
|
||||
svm_nodes += shader_size;
|
||||
}
|
||||
|
||||
if (progress.get_cancel()) {
|
||||
return;
|
||||
}
|
||||
|
||||
dscene->svm_nodes.steal_data(svm_nodes);
|
||||
dscene->svm_nodes.copy_to_device();
|
||||
|
||||
for (i = 0; i < scene->shaders.size(); i++) {
|
||||
Shader *shader = scene->shaders[i];
|
||||
shader->need_update = false;
|
||||
}
|
||||
|
||||
device_update_common(device, dscene, scene, progress);
|
||||
|
||||
need_update = false;
|
||||
|
||||
VLOG(1) << "Shader manager updated " << num_shaders << " shaders in " << time_dt() - start_time
|
||||
<< " seconds.";
|
||||
VLOG(1) << "Shader manager updated " << scene->shaders.size() << " shaders in "
|
||||
<< time_dt() - start_time << " seconds.";
|
||||
}
|
||||
|
||||
void SVMShaderManager::device_free(Device *device, DeviceScene *dscene, Scene *scene)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user