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:
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r--intern/cycles/device/device.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 3c0fb880948..769fb3ccf9d 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -125,6 +125,34 @@ public:
use_baking == requested_features.use_baking);
}
+ /* Convert the requested features structure to a build options,
+ * which could then be passed to compilers.
+ */
+ string get_build_options(void) const
+ {
+ string build_options = "";
+ if(experimental) {
+ build_options += "-D__KERNEL_EXPERIMENTAL__ ";
+ }
+ build_options += "-D__NODES_MAX_GROUP__=" +
+ string_printf("%d", max_nodes_group);
+ build_options += " -D__NODES_FEATURES__=" +
+ string_printf("%d", nodes_features);
+ build_options += string_printf(" -D__MAX_CLOSURE__=%d", max_closure);
+ if(!use_hair) {
+ build_options += " -D__NO_HAIR__";
+ }
+ if(!use_object_motion) {
+ build_options += " -D__NO_OBJECT_MOTION__";
+ }
+ if(!use_camera_motion) {
+ build_options += " -D__NO_CAMERA_MOTION__";
+ }
+ if(!use_baking) {
+ build_options += " -D__NO_BAKING__";
+ }
+ return build_options;
+ }
};
std::ostream& operator <<(std::ostream &os,