diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-09 17:28:00 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-09 17:28:00 +0300 |
commit | f680c1b54a28a02fb86271bca649da0660542e9a (patch) | |
tree | 4e0aacf401d31814e436e39c8704f428b9ff562e /intern/cycles/render | |
parent | 6fc166967989072bda085ae4cf54fc513f6f1daf (diff) |
Cycles: Communicate number of closures and nodes feature set to the device
This way device can actually make a decision of how it can optimize the kernel
in order to make it most efficient.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/session.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index cfd974346c3..aacb81faf83 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -601,6 +601,18 @@ DeviceRequestedFeatures Session::get_requested_device_features() { DeviceRequestedFeatures requested_features; requested_features.experimental = params.experimental; + if(!params.background) { + requested_features.max_closure = 64; + requested_features.max_nodes_group = NODE_GROUP_LEVEL_2; + requested_features.nodes_features = NODE_FEATURE_ALL; + } + else { + requested_features.max_closure = get_max_closure_count(); + scene->shader_manager->get_requested_features( + scene, + requested_features.max_nodes_group, + requested_features.nodes_features); + } return requested_features; } |