diff options
author | Hans Goudey <h.goudey@me.com> | 2022-10-13 00:51:29 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-10-13 00:51:29 +0300 |
commit | 6c4210b97bab2c704e3586c67131d65b5b5a0c97 (patch) | |
tree | faf8ec067b698ca5d4beecc73f58e7fdb9420cd9 /source/blender | |
parent | 7f921032c2988e3d59703259c7a39dc542787e81 (diff) |
Draw: Add missing TBB define to draw module
Allows improving performance with BLI_task.hh in draw extraction code.
Threading added in c15a63d21eae49ffd improved performance by 3-4x
for me, but didn't make a difference until now.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index bfccc22899d..a645bd6b6af 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -731,6 +731,21 @@ if(WITH_GTESTS) endif() endif() +if(WITH_TBB) + add_definitions(-DWITH_TBB) + if(WIN32) + # TBB includes Windows.h which will define min/max macros + # that will collide with the stl versions. + add_definitions(-DNOMINMAX) + endif() + list(APPEND INC_SYS + ${TBB_INCLUDE_DIRS} + ) + + list(APPEND LIB + ${TBB_LIBRARIES} + ) +endif() blender_add_lib(bf_draw "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") @@ -756,3 +771,4 @@ if(WITH_GTESTS) blender_add_test_lib(bf_draw_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") endif() endif() + |