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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-05-09 17:28:00 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-05-09 17:28:00 +0300
commitf680c1b54a28a02fb86271bca649da0660542e9a (patch)
tree4e0aacf401d31814e436e39c8704f428b9ff562e /intern/cycles/device/device.h
parent6fc166967989072bda085ae4cf54fc513f6f1daf (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/device/device.h')
-rw-r--r--intern/cycles/device/device.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 98155900748..4d40518644e 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -74,14 +74,37 @@ public:
/* Use experimental feature set. */
bool experimental;
+ /* Maximum number of closures in shader trees. */
+ int max_closure;
+
+ /* Selective nodes compilation. */
+
+ /* Identifier of a node group up to which all the nodes needs to be
+ * compiled in. Nodes from higher group indices will be ignores.
+ */
+ int max_nodes_group;
+
+ /* Features bitfield indicating which features from the requested group
+ * will be compiled in. Nodes which corresponds to features which are not
+ * in this bitfield will be ignored even if they're in the requested group.
+ */
+ int nodes_features;
+
DeviceRequestedFeatures()
{
+ /* TODO(sergey): Find more meaningful defaults. */
experimental = false;
+ max_closure = 0;
+ max_nodes_group = 0;
+ nodes_features = 0;
}
bool modified(const DeviceRequestedFeatures& requested_features)
{
- return !(experimental == requested_features.experimental);
+ return !(experimental == requested_features.experimental &&
+ max_closure == requested_features.max_closure &&
+ max_nodes_group == requested_features.max_nodes_group &&
+ nodes_features == requested_features.nodes_features);
}
};