diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp index 14c5c1c3db5..2ebc76eb2ff 100644 --- a/intern/cycles/kernel/osl/osl_closures.cpp +++ b/intern/cycles/kernel/osl/osl_closures.cpp @@ -5,7 +5,7 @@ * All Rights Reserved. * * Modifications Copyright 2011, Blender Foundation. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: @@ -242,7 +242,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 */ - ss->register_closure(name, id, params, prepare, NULL, 16); + #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_) @@ -638,4 +642,3 @@ ClosureParam *closure_bsdf_microfacet_multi_ggx_glass_fresnel_params() CCLOSURE_PREPARE(closure_bsdf_microfacet_multi_ggx_glass_fresnel_prepare, MicrofacetMultiGGXGlassFresnelClosure); CCL_NAMESPACE_END -