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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-18 08:11:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-11-21 01:24:24 +0300
commitd089875c4c753f084e02849462ec1bd6f785eadf (patch)
tree58626e23ec88f40610f125c7e339136160ed5e2a
parent51e2844387c1fefe213d5b3ded9c89083421ce0b (diff)
Fix build with OSL 1.9.x, automatically aligns to 16 bytes now.
-rw-r--r--intern/cycles/kernel/osl/osl_closures.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp
index e3e85705ebc..597d25e9f30 100644
--- a/intern/cycles/kernel/osl/osl_closures.cpp
+++ b/intern/cycles/kernel/osl/osl_closures.cpp
@@ -232,7 +232,11 @@ 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 */
+#if OSL_LIBRARY_VERSION_CODE >= 10900
+ ss->register_closure(name, id, params, prepare, NULL);
+#else
ss->register_closure(name, id, params, prepare, NULL, 16);
+#endif
}
void OSLShader::register_closures(OSLShadingSystem *ss_)