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:
-rw-r--r--intern/cycles/device/device.h10
-rw-r--r--intern/cycles/kernel/kernel_types.h3
-rw-r--r--intern/cycles/render/session.cpp1
3 files changed, 13 insertions, 1 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index b956090a199..9324f5c7069 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -103,6 +103,9 @@ public:
/* Use subsurface scattering materials. */
bool use_subsurface;
+ /* Use branched integrator. */
+ bool use_integrator_branched;
+
DeviceRequestedFeatures()
{
/* TODO(sergey): Find more meaningful defaults. */
@@ -115,6 +118,7 @@ public:
use_camera_motion = false;
use_baking = false;
use_subsurface = false;
+ use_integrator_branched = false;
}
bool modified(const DeviceRequestedFeatures& requested_features)
@@ -127,7 +131,8 @@ public:
use_object_motion == requested_features.use_object_motion &&
use_camera_motion == requested_features.use_camera_motion &&
use_baking == requested_features.use_baking &&
- use_subsurface == requested_features.use_subsurface);
+ use_subsurface == requested_features.use_subsurface &&
+ use_integrator_branched == requested_features.use_integrator_branched);
}
/* Convert the requested features structure to a build options,
@@ -159,6 +164,9 @@ public:
if(!use_subsurface) {
build_options += " -D__NO_SUBSURFACE__";
}
+ if(!use_integrator_branched) {
+ build_options += " -D__NO_BRANCHED_PATH__";
+ }
return build_options;
}
};
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 31ad4940152..5ccbc1de94c 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -193,6 +193,9 @@ CCL_NAMESPACE_BEGIN
#ifdef __NO_SUBSURFACE__
# undef __SUBSURFACE__
#endif
+#ifdef __NO_BRANCHED_PATH__
+# undef __BRANCHED_PATH__
+#endif
/* Random Numbers */
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index b5bc4109630..762e49a8f0a 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -639,6 +639,7 @@ DeviceRequestedFeatures Session::get_requested_device_features()
BakeManager *bake_manager = scene->bake_manager;
requested_features.use_baking = bake_manager->get_baking();
+ requested_features.use_integrator_branched = (scene->integrator->method == Integrator::BRANCHED_PATH);
return requested_features;
}