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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-07 11:15:30 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-07 11:15:30 +0300
commit772a3dab21459637da69132aaac6b7b31173161f (patch)
treedc0e98f149bb0d8cca48658922f085a29ab4ff4d /intern
parent3d313c9e5cad1020f0266a9ef6d83db9860ab0ec (diff)
Cycles: Update some types used form OSL
Some types were deprecated back in 2013, better to be prepared earlier for those types being removed from upstream.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/osl/osl_globals.h8
-rw-r--r--intern/cycles/render/osl.cpp12
-rw-r--r--intern/cycles/render/osl.h2
-rw-r--r--intern/cycles/render/shader.h8
4 files changed, 15 insertions, 15 deletions
diff --git a/intern/cycles/kernel/osl/osl_globals.h b/intern/cycles/kernel/osl/osl_globals.h
index e349ac676b0..916542ec628 100644
--- a/intern/cycles/kernel/osl/osl_globals.h
+++ b/intern/cycles/kernel/osl/osl_globals.h
@@ -51,10 +51,10 @@ struct OSLGlobals {
OSLRenderServices *services;
/* shader states */
- vector<OSL::ShadingAttribStateRef> surface_state;
- vector<OSL::ShadingAttribStateRef> volume_state;
- vector<OSL::ShadingAttribStateRef> displacement_state;
- OSL::ShadingAttribStateRef background_state;
+ vector<OSL::ShaderGroupRef> surface_state;
+ vector<OSL::ShaderGroupRef> volume_state;
+ vector<OSL::ShaderGroupRef> displacement_state;
+ OSL::ShaderGroupRef background_state;
/* attributes */
struct Attribute {
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index e5842c796db..a75716e9f68 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -765,13 +765,13 @@ void OSLCompiler::generate_nodes(const ShaderNodeSet& nodes)
} while(!nodes_done);
}
-OSL::ShadingAttribStateRef OSLCompiler::compile_type(Shader *shader, ShaderGraph *graph, ShaderType type)
+OSL::ShaderGroupRef OSLCompiler::compile_type(Shader *shader, ShaderGraph *graph, ShaderType type)
{
OSL::ShadingSystem *ss = (OSL::ShadingSystem*)shadingsys;
current_type = type;
- OSL::ShadingAttribStateRef group = ss->ShaderGroupBegin(shader->name.c_str());
+ OSL::ShaderGroupRef group = ss->ShaderGroupBegin(shader->name.c_str());
ShaderNode *output = graph->output();
ShaderNodeSet dependencies;
@@ -850,8 +850,8 @@ void OSLCompiler::compile(Scene *scene, OSLGlobals *og, Shader *shader)
shader->has_surface = true;
}
else {
- shader->osl_surface_ref = OSL::ShadingAttribStateRef();
- shader->osl_surface_bump_ref = OSL::ShadingAttribStateRef();
+ shader->osl_surface_ref = OSL::ShaderGroupRef();
+ shader->osl_surface_bump_ref = OSL::ShaderGroupRef();
}
/* generate volume shader */
@@ -860,7 +860,7 @@ void OSLCompiler::compile(Scene *scene, OSLGlobals *og, Shader *shader)
shader->has_volume = true;
}
else
- shader->osl_volume_ref = OSL::ShadingAttribStateRef();
+ shader->osl_volume_ref = OSL::ShaderGroupRef();
/* generate displacement shader */
if(shader->used && graph && output->input("Displacement")->link) {
@@ -868,7 +868,7 @@ void OSLCompiler::compile(Scene *scene, OSLGlobals *og, Shader *shader)
shader->has_displacement = true;
}
else
- shader->osl_displacement_ref = OSL::ShadingAttribStateRef();
+ shader->osl_displacement_ref = OSL::ShaderGroupRef();
}
/* push state to array for lookup */
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index 3ff37c56e50..ac985a84eef 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -145,7 +145,7 @@ public:
private:
#ifdef WITH_OSL
string id(ShaderNode *node);
- OSL::ShadingAttribStateRef compile_type(Shader *shader, ShaderGraph *graph, ShaderType type);
+ OSL::ShaderGroupRef compile_type(Shader *shader, ShaderGraph *graph, ShaderType type);
bool node_skip_input(ShaderNode *node, ShaderInput *input);
string compatible_name(ShaderNode *node, ShaderInput *input);
string compatible_name(ShaderNode *node, ShaderOutput *output);
diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h
index b19b1c619a2..954e1f56fff 100644
--- a/intern/cycles/render/shader.h
+++ b/intern/cycles/render/shader.h
@@ -118,10 +118,10 @@ public:
#ifdef WITH_OSL
/* osl shading state references */
- OSL::ShadingAttribStateRef osl_surface_ref;
- OSL::ShadingAttribStateRef osl_surface_bump_ref;
- OSL::ShadingAttribStateRef osl_volume_ref;
- OSL::ShadingAttribStateRef osl_displacement_ref;
+ OSL::ShaderGroupRef osl_surface_ref;
+ OSL::ShaderGroupRef osl_surface_bump_ref;
+ OSL::ShaderGroupRef osl_volume_ref;
+ OSL::ShaderGroupRef osl_displacement_ref;
#endif
Shader();