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:
authorMartijn Berger <mberger@denc.com>2014-08-05 13:11:52 +0400
committerMartijn Berger <mberger@denc.com>2014-08-05 13:11:52 +0400
commitb9e4929846a59b0f274ec0b898582becb58718d0 (patch)
tree16292ef92be132ce957bba23c4054fedc8686a6b
parent77b7e1fe9abb882b7bd1d60f5273e03f079d8a54 (diff)
Fix: T41318
OSL compiler signature changed with 1.5.
-rw-r--r--intern/cycles/render/osl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index fa7a242e77b..c95c626f5d0 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -260,12 +260,18 @@ bool OSLShaderManager::osl_compile(const string& inputfile, const string& output
options.push_back(outputfile);
/* specify standard include path */
- options.push_back("-I" + path_get("shader"));
+ options.push_back("-I");
+ options.push_back(path_get("shader"));
+
stdosl_path = path_get("shader/stdosl.h");
/* compile */
OSL::OSLCompiler *compiler = OSL::OSLCompiler::create();
+#if OSL_LIBRARY_VERSION_CODE >= 10500
+ bool ok = compiler->compile(string_view(inputfile), options, string_view(stdosl_path));
+#else
bool ok = compiler->compile(inputfile, options, stdosl_path);
+#endif
delete compiler;
return ok;