forked from git-for-windows/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix-osl.patch
28 lines (23 loc) · 1009 Bytes
/
fix-osl.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- blender/intern/cycles/render/osl.cpp.orig 2014-06-01 19:42:48.435400000 +0400
+++ blender/intern/cycles/render/osl.cpp 2014-06-01 19:46:55.180600000 +0400
@@ -248,20 +248,20 @@
bool OSLShaderManager::osl_compile(const string& inputfile, const string& outputfile)
{
- vector<string> options;
+ vector<OIIO::string_view> options;
string stdosl_path;
/* specify output file name */
- options.push_back("-o");
- options.push_back(outputfile);
+ options.push_back(OIIO::string_view("-o"));
+ options.push_back(OIIO::string_view(outputfile));
/* specify standard include path */
- options.push_back("-I" + path_get("shader"));
+ options.push_back(OIIO::string_view("-I" + path_get("shader")));
stdosl_path = path_get("shader/stdosl.h");
/* compile */
OSL::OSLCompiler *compiler = OSL::OSLCompiler::create();
- bool ok = compiler->compile(inputfile, options, stdosl_path);
+ bool ok = compiler->compile(OIIO::string_view(inputfile), options, stdosl_path);
delete compiler;
return ok;