[Bf-blender-cvs] [1c71b8e] master: Cycles: Fix compilation with older OSL

Sergey Sharybin noreply at git.blender.org
Sat Jan 16 18:47:09 CET 2016


Commit: 1c71b8e32385ab8867b6d65c2e684626f1b3fca7
Author: Sergey Sharybin
Date:   Sat Jan 16 22:46:23 2016 +0500
Branches: master
https://developer.blender.org/rB1c71b8e32385ab8867b6d65c2e684626f1b3fca7

Cycles: Fix compilation with older OSL

We didn't switch to OSL-1.6.9 on all platforms yet,
so please keep codeabse compiled with 1.5 for the
time being.

===================================================================

M	intern/cycles/render/osl.cpp

===================================================================

diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index 75c993c..f81fc40 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -282,7 +282,11 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
 	stdosl_path = path_get("shader/stdosl.h");
 
 	/* compile */
+#if OSL_LIBRARY_VERSION_CODE >= 10602
 	OSL::OSLCompiler *compiler = new OSL::OSLCompiler(&OSL::ErrorHandler::default_handler());
+#else
+	OSL::OSLCompiler *compiler = new OSL::OSLCompiler();
+#endif
 	bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
 	delete compiler;




More information about the Bf-blender-cvs mailing list