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-07-18 17:00:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-18 17:02:09 +0300
commitcf14437ac91975aaf51b50ae6dca7abf7cc997fa (patch)
treef9f04eadbf5b6cc1b3737a09be3043ba520c7c79 /intern/cycles/device/device.cpp
parent45b5bf034b053509d7175e74ddea22c658b4717e (diff)
Cycles: Log requested device features
Useful to have this always logged because otherwise it's needed to remove cached kernels and check build flags to see which features are enabled.
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r--intern/cycles/device/device.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 5cad8e1b49c..fc9959e0b48 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -31,6 +31,29 @@
CCL_NAMESPACE_BEGIN
+/* Device Requested Features */
+
+std::ostream& operator <<(std::ostream &os,
+ const DeviceRequestedFeatures& requested_features)
+{
+ os << "Experimental features: "
+ << (requested_features.experimental ? "On" : "Off") << std::endl;
+ os << "Max closure count: " << requested_features.max_closure << std::endl;
+ os << "Max nodes group: " << requested_features.max_nodes_group << std::endl;
+ /* TODO(sergey): Decode bitflag into list of names. */
+ os << "Nodes features: " << requested_features.nodes_features << std::endl;
+ /* TODO(sergey): Make it utility function to convert bool to string. */
+ os << "Use hair: "
+ << (requested_features.use_hair ? "True" : "False") << std::endl;
+ os << "Use object motion: "
+ << (requested_features.use_object_motion ? "True" : "False") << std::endl;
+ os << "Use camera motion: "
+ << (requested_features.use_camera_motion ? "True" : "False") << std::endl;
+ os << "Use Baking: "
+ << (requested_features.use_baking ? "True" : "False") << std::endl;
+ return os;
+}
+
/* Device */
Device::~Device()