diff options
author | Hristo Gueorguiev <prem.nirved@gmail.com> | 2017-03-08 19:56:06 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-09 19:09:37 +0300 |
commit | 9de9f25b2455808335b5373003695610599daab7 (patch) | |
tree | b9b88b5a265199c91340619400a3eeca274cfd7b /intern/cycles/util | |
parent | 06c051363b509f7c3c40a803b87739fe0e2a8576 (diff) |
Cycles: add single program debug option for split kernel
Single program generally compiles kernels faster (2-3 times), loads faster,
takes less drive space (2-3 times), and reduces the number of cached kernels.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r-- | intern/cycles/util/util_debug.cpp | 11 | ||||
-rw-r--r-- | intern/cycles/util/util_debug.h | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/intern/cycles/util/util_debug.cpp b/intern/cycles/util/util_debug.cpp index f12c5e28c80..da3ccae45bf 100644 --- a/intern/cycles/util/util_debug.cpp +++ b/intern/cycles/util/util_debug.cpp @@ -77,7 +77,8 @@ void DebugFlags::CUDA::reset() DebugFlags::OpenCL::OpenCL() : device_type(DebugFlags::OpenCL::DEVICE_ALL), kernel_type(DebugFlags::OpenCL::KERNEL_DEFAULT), - debug(false) + debug(false), + single_program(false) { reset(); } @@ -117,6 +118,7 @@ void DebugFlags::OpenCL::reset() } /* Initialize other flags from environment variables. */ debug = (getenv("CYCLES_OPENCL_DEBUG") != NULL); + single_program = (getenv("CYCLES_OPENCL_SINGLE_PROGRAM") != NULL); } DebugFlags::DebugFlags() @@ -179,9 +181,10 @@ std::ostream& operator <<(std::ostream &os, break; } os << "OpenCL flags:\n" - << " Device type : " << opencl_device_type << "\n" - << " Kernel type : " << opencl_kernel_type << "\n" - << " Debug : " << string_from_bool(debug_flags.opencl.debug) + << " Device type : " << opencl_device_type << "\n" + << " Kernel type : " << opencl_kernel_type << "\n" + << " Debug : " << string_from_bool(debug_flags.opencl.debug) << "\n" + << " Signle program : " << string_from_bool(debug_flags.opencl.single_program) << "\n"; return os; } diff --git a/intern/cycles/util/util_debug.h b/intern/cycles/util/util_debug.h index 911c95de4ab..5aa0d911884 100644 --- a/intern/cycles/util/util_debug.h +++ b/intern/cycles/util/util_debug.h @@ -112,6 +112,9 @@ public: /* Use debug version of the kernel. */ bool debug; + + /* Use single program */ + bool single_program; }; /* Get instance of debug flags registry. */ |