diff options
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/session.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index e9274fbf49e..e88d960d9d2 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -1131,6 +1131,12 @@ void Session::collect_statistics(RenderStats *render_stats) int Session::get_max_closure_count() { + if (scene->shader_manager->use_osl()) { + /* OSL always needs the maximum as we can't predict the + * number of closures a shader might generate. */ + return MAX_CLOSURE; + } + int max_closures = 0; for(int i = 0; i < scene->shaders.size(); i++) { int num_closures = scene->shaders[i]->graph->get_num_closures(); |