[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [61417] trunk/lib/ darwin-9.x.universal/osl/threaded_osl_osx_fix.patch: OSX/OSL: add the patch that fixes osl crashes in threaded render
jens verwiebe
info at jensverwiebe.de
Thu Aug 14 15:14:09 CEST 2014
Revision: 61417
https://developer.blender.org/rBL61417
Author: jensverwiebe
Date: 2014-08-14 13:14:09 +0000 (Thu, 14 Aug 2014)
Log Message:
-----------
OSX/OSL: add the patch that fixes osl crashes in threaded render
Added Paths:
-----------
trunk/lib/darwin-9.x.universal/osl/threaded_osl_osx_fix.patch
Added: trunk/lib/darwin-9.x.universal/osl/threaded_osl_osx_fix.patch
===================================================================
--- trunk/lib/darwin-9.x.universal/osl/threaded_osl_osx_fix.patch (rev 0)
+++ trunk/lib/darwin-9.x.universal/osl/threaded_osl_osx_fix.patch 2014-08-14 13:14:09 UTC (rev 61417)
@@ -0,0 +1,22 @@
+*** /Volumes/Workdata/Blender/Development/lib/darwin-10-x86_64/OpenShadingLanguage/src/liboslexec/llvm_util.cpp 2014-07-21 23:59:41.000000000 +0200
+--- /Volumes/Workdata/Blender/Development/lib/darwin-9.x.universal/OpenShadingLanguage-Release-1.5.10/src/liboslexec/llvm_util.cpp 2014-08-14 14:49:10.000000000 +0200
+***************
+*** 111,126 ****
+--- 111,127 ----
+
+
+ // We hold certain things (LLVM context and custom JIT memory manager)
+ // per thread and retained across LLVM_Util invocations. We are
+ // intentionally "leaking" them.
+ struct LLVM_Util::PerThreadInfo {
+ PerThreadInfo () : llvm_context(NULL), llvm_jitmm(NULL) {}
+ ~PerThreadInfo () {
++ OIIO::spin_lock lock (llvm_global_mutex);
+ delete llvm_context;
+ // N.B. Do NOT delete the jitmm -- another thread may need the
+ // code! Don't worry, we stashed a pointer in jitmm_hold.
+ }
+ static void destroy (PerThreadInfo *threadinfo) { delete threadinfo; }
+ static PerThreadInfo *get () {
+ PerThreadInfo *p = perthread_infos.get ();
+ if (! p) {
More information about the Bf-blender-cvs
mailing list