From d60a60f0cb85087ddebcb47910847f1a0c4b916c Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 12 Nov 2019 20:55:39 -0700 Subject: Add support for the TBB allocator on windows. The heap on windows is single threaded causing it to lag behind linux in performance in allocation heavy multithreaded scenarios, BVH building is a prime example. See https://developer.blender.org/D6218 for benchmark results for testing with the allocator enabled/disabled you can set the environment variable TBB_MALLOC_DISABLE_REPLACEMENT=1 to disable the TBB allocator. Reviewed By: @sergey Differential Revision: https://developer.blender.org/D6218 --- source/creator/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/creator/CMakeLists.txt') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 50b4f3edfa9..8a85c75cade 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -81,6 +81,12 @@ if(WITH_CODEC_FFMPEG) add_definitions(-DWITH_FFMPEG) endif() +if(WITH_TBB) + blender_include_dirs(${TBB_INCLUDE_DIRS}) + link_directories(${LIBDIR}/tbb/lib) +endif() + + if(WITH_PYTHON) blender_include_dirs(../blender/python) add_definitions(-DWITH_PYTHON) @@ -806,6 +812,15 @@ elseif(WIN32) ) endif() + if(WITH_TBB_MALLOC_PROXY) + install( + FILES + ${LIBDIR}/tbb/lib/tbbmalloc.dll + ${LIBDIR}/tbb/lib/tbbmalloc_proxy.dll + DESTINATION "." + ) + endif() + if(WITH_CODEC_SNDFILE) install( FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll -- cgit v1.2.3