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.
This commit is contained in:
@@ -282,7 +282,11 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
|
|||||||
stdosl_path = path_get("shader/stdosl.h");
|
stdosl_path = path_get("shader/stdosl.h");
|
||||||
|
|
||||||
/* compile */
|
/* compile */
|
||||||
|
#if OSL_LIBRARY_VERSION_CODE >= 10602
|
||||||
OSL::OSLCompiler *compiler = new OSL::OSLCompiler(&OSL::ErrorHandler::default_handler());
|
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));
|
bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
|
||||||
delete compiler;
|
delete compiler;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user