Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-03 18:34:03 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-03 18:34:03 +0300
commit4cb0e256789231a329780bbdc8706e6aa031e52e (patch)
tree850260589816718c026757d807b03a5a308eb7b1 /intern/cycles/kernel
parent894dbda575515d75951a30546b62c9796adf9c72 (diff)
Cycles: Use 16 bytes aligned closures in OSL
This solves bugs like T42210 which are caused by compiler being smart and using some SSE instructions to operate with closure classes, which was failing because those classes are not allocated by the regular allocator but allocated in memory pool in OSL. With newer versions of OSL it is now possible to force closure classes being aligned to a given boundary and this commit uses this new functionality. Unfortunately, it means we're no longer compatible with older versions of OSL, only latest git version from upstream and our branch at github are supported: https://github.com/Nazg-Gul/OpenShadingLanguage/tree/blender-fixes For OSX and Windows it's not an issue because libraries are already updated there, Linux users would need to run install_deps script.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/osl/osl_closures.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp
index bae9cb2f377..1d99f1d2682 100644
--- a/intern/cycles/kernel/osl/osl_closures.cpp
+++ b/intern/cycles/kernel/osl/osl_closures.cpp
@@ -189,7 +189,7 @@ static void register_closure(OSL::ShadingSystem *ss, const char *name, int id, O
/* optimization: it's possible to not use a prepare function at all and
* only initialize the actual class when accessing the closure component
* data, but then we need to map the id to the class somehow */
- ss->register_closure(name, id, params, prepare, NULL);
+ ss->register_closure(name, id, params, prepare, NULL, 16);
}
void OSLShader::register_closures(OSLShadingSystem *ss_)