diff options
author | Thomas Dinges <blender@dingto.org> | 2012-06-05 00:50:59 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-06-05 00:50:59 +0400 |
commit | 0d3b19e7340e0f3fa075e90e695ddf760529b925 (patch) | |
tree | 4aba28db12de3da54f2175fabecf7e3e2a6c029b /intern/cycles/kernel | |
parent | 5189356d587f51280c9486980d9f5e774338540e (diff) |
Cycles / OSL:
* Fixes for changes in the OSL register_closure() API.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/osl/osl_closures.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp index b87cdf8af86..0793b29d1ac 100644 --- a/intern/cycles/kernel/osl/osl_closures.cpp +++ b/intern/cycles/kernel/osl/osl_closures.cpp @@ -48,7 +48,7 @@ static void generic_closure_setup(OSL::RendererServices *, int id, void *data) prim->setup(); } -static bool generic_closure_mergeable(int id, const void *dataA, const void *dataB) +static bool generic_closure_compare(int id, const void *dataA, const void *dataB) { assert(dataA && dataB); @@ -59,11 +59,7 @@ static bool generic_closure_mergeable(int id, const void *dataA, const void *dat static void register_closure(OSL::ShadingSystem *ss, const char *name, int id, OSL::ClosureParam *params, OSL::PrepareClosureFunc prepare) { - int j; - for(j = 0; params[j].type != TypeDesc(); ++j) {} - int size = params[j].offset; - - ss->register_closure(name, id, params, size, prepare, generic_closure_setup, generic_closure_mergeable); + ss->register_closure(name, id, params, prepare, generic_closure_setup, generic_closure_compare); } void OSLShader::register_closures(OSL::ShadingSystem *ss) |