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
path: root/intern
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
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')
-rw-r--r--intern/cycles/device/device.cpp23
-rw-r--r--intern/cycles/device/device.h4
-rw-r--r--intern/cycles/render/session.cpp5
3 files changed, 31 insertions, 1 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()
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 7c4f5b61a48..ea1e20d1500 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -124,8 +124,12 @@ public:
use_camera_motion == requested_features.use_camera_motion &&
use_baking == requested_features.use_baking);
}
+
};
+std::ostream& operator <<(std::ostream &os,
+ const DeviceRequestedFeatures& requested_features);
+
/* Device */
struct DeviceDrawParams {
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index f3acebd33d5..837c2694894 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -30,6 +30,7 @@
#include "util_foreach.h"
#include "util_function.h"
+#include "util_logging.h"
#include "util_math.h"
#include "util_opengl.h"
#include "util_task.h"
@@ -650,7 +651,9 @@ void Session::load_kernels()
if(!kernels_loaded) {
progress.set_status("Loading render kernels (may take a few minutes the first time)");
- if(!device->load_kernels(get_requested_device_features())) {
+ DeviceRequestedFeatures requested_features = get_requested_device_features();
+ VLOG(2) << "Requested features:\n" << requested_features;
+ if(!device->load_kernels(requested_features)) {
string message = device->error_message();
if(message.empty())
message = "Failed loading render kernel, see console for errors";