diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-14 16:05:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-14 16:06:23 +0300 |
commit | b63ffa89199a941e2f5fd26cad5c9b60087a6a20 (patch) | |
tree | 4597da11d93c5c7d330a18c800a87cae093705ac /intern/cycles/render | |
parent | 0dd5281ab295361bea348874cf841a5937352ba3 (diff) |
Fix Cycles build error after recent changes
We need to do aligned alloc of the services instead of globals now since the
concurrent map moved there.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/osl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp index 4bc18e53c9b..6f927bd5c42 100644 --- a/intern/cycles/render/osl.cpp +++ b/intern/cycles/render/osl.cpp @@ -30,6 +30,7 @@ # include "kernel/osl/osl_services.h" # include "kernel/osl/osl_shader.h" +# include "util/util_aligned_malloc.h" # include "util/util_foreach.h" # include "util/util_logging.h" # include "util/util_md5.h" @@ -224,7 +225,8 @@ void OSLShaderManager::shading_system_init() thread_scoped_lock lock(ss_shared_mutex); if (ss_shared_users == 0) { - services_shared = new OSLRenderServices(ts_shared); + /* Must use aligned new due to concurrent hash map. */ + services_shared = util_aligned_new<OSLRenderServices>(ts_shared); string shader_path = path_get("shader"); # ifdef _WIN32 @@ -293,7 +295,7 @@ void OSLShaderManager::shading_system_free() delete ss_shared; ss_shared = NULL; - delete services_shared; + util_aligned_delete(services_shared); services_shared = NULL; } |