[Bf-blender-cvs] [531e4fcf3ef] blender-v2.83-release: Fix T88813: Scalable allocator not used on win10

Ray Molenkamp noreply at git.blender.org
Wed Jun 9 13:02:21 CEST 2021


Commit: 531e4fcf3ef5b9ab3cd3a04f2d8a24d967abfce5
Author: Ray Molenkamp
Date:   Fri Jun 4 17:22:31 2021 -0600
Branches: blender-v2.83-release
https://developer.blender.org/rB531e4fcf3ef5b9ab3cd3a04f2d8a24d967abfce5

Fix T88813: Scalable allocator not used on win10

Due to the way we ship the CRT on windows TBB's
malloc proxy was unable to attach it self to
the memory management functions on windows 10.

This change moves ucrtbase.dll out of the blender.crt
folder and back into the main blender folder to side
step some undesirable behaviour on win10 making TBB
once more able to attach it self.

Having this work again, should give a speed
boost in memory allocation heavy workloads
such as mantaflow.

For details on how this only failed on Win10
see T88813

===================================================================

M	build_files/cmake/platform/platform_win32_bundle_crt.cmake

===================================================================

diff --git a/build_files/cmake/platform/platform_win32_bundle_crt.cmake b/build_files/cmake/platform/platform_win32_bundle_crt.cmake
index abadaa112a2..6c42e882bc6 100644
--- a/build_files/cmake/platform/platform_win32_bundle_crt.cmake
+++ b/build_files/cmake/platform/platform_win32_bundle_crt.cmake
@@ -7,6 +7,15 @@ if(WITH_WINDOWS_BUNDLE_CRT)
   set(CMAKE_INSTALL_OPENMP_LIBRARIES ${WITH_OPENMP})
   include(InstallRequiredSystemLibraries)
 
+  # ucrtbase(d).dll cannot be in the manifest, due to the way windows 10 handles
+  # redirects for this dll, for details see T88813.
+  foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
+    string(FIND ${lib} "ucrtbase" pos)
+    if(NOT pos EQUAL -1)
+      list(REMOVE_ITEM CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${lib})
+      install(FILES ${lib} DESTINATION . COMPONENT Libraries)
+    endif()
+  endforeach()
   # Install the CRT to the blender.crt Sub folder.
   install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ./blender.crt COMPONENT Libraries)



More information about the Bf-blender-cvs mailing list