diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2017-06-30 05:50:00 +0300 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2017-06-30 06:07:18 +0300 |
commit | 56dcfcce059f696ed927f97502579f8286429116 (patch) | |
tree | ef2eeb9b49b0536a95c0130dabedef2d21e0c043 | |
parent | 9c2bbfb6ce90007a11f0fc4b2a1afa7d2eab5039 (diff) |
Cycles: Disable baking in mega kernel when not in use to improve build times
-rw-r--r-- | intern/cycles/device/opencl/opencl_base.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp index e4ab979dcbf..223a5901197 100644 --- a/intern/cycles/device/opencl/opencl_base.cpp +++ b/intern/cycles/device/opencl/opencl_base.cpp @@ -1226,7 +1226,7 @@ void OpenCLDeviceBase::store_cached_kernel( } string OpenCLDeviceBase::build_options_for_base_program( - const DeviceRequestedFeatures& /*requested_features*/) + const DeviceRequestedFeatures& requested_features) { /* TODO(sergey): By default we compile all features, meaning * mega kernel is not getting feature-based optimizations. @@ -1234,6 +1234,14 @@ string OpenCLDeviceBase::build_options_for_base_program( * Ideally we need always compile kernel with as less features * enabled as possible to keep performance at it's max. */ + + /* For now disable baking when not in use as this has major + * impact on kernel build times. + */ + if(!requested_features.use_baking) { + return "-D__NO_BAKING__"; + } + return ""; } |