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:
authorLukas Stockner <lukas.stockner@freenet.de>2016-10-17 12:48:24 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2016-10-17 12:51:18 +0300
commitd5dd12e56cd142c8d95cdb538658bae45a3f510c (patch)
tree24e34936c1ae49a8a0e58e10fdc427134e9d77ed /intern/cycles/device/opencl/opencl_base.cpp
parent2a6ec00b9b083e8c235ec4721d6fa67b9bee4794 (diff)
Cycles: Improve OpenCL kernel compilation logging
The previous refactor changed the code to use a separate logging mechanism to support multithreaded compilation. However, since that's not supported by any frameworks yes, it just resulted in bad logging behaviour. So, this commit changes the logging to go diectly to stdout/stderr once again by default.
Diffstat (limited to 'intern/cycles/device/opencl/opencl_base.cpp')
-rw-r--r--intern/cycles/device/opencl/opencl_base.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/device/opencl/opencl_base.cpp b/intern/cycles/device/opencl/opencl_base.cpp
index 1e8fd26b5e9..025a61c8e27 100644
--- a/intern/cycles/device/opencl/opencl_base.cpp
+++ b/intern/cycles/device/opencl/opencl_base.cpp
@@ -212,6 +212,11 @@ bool OpenCLDeviceBase::load_kernels(const DeviceRequestedFeatures& requested_fea
/* Call actual class to fill the vector with its programs. */
load_kernels(requested_features, programs);
+ /* Parallel compilation is supported by Cycles, but currently all OpenCL frameworks
+ * serialize the calls internally, so it's not much use right now.
+ * Note: When enabling parallel compilation, use_stdout in the OpenCLProgram constructor
+ * should be set to false as well. */
+#if 0
TaskPool task_pool;
foreach(OpenCLProgram *program, programs) {
task_pool.push(function_bind(&OpenCLProgram::load, program));
@@ -225,6 +230,11 @@ bool OpenCLDeviceBase::load_kernels(const DeviceRequestedFeatures& requested_fea
return false;
}
}
+#else
+ foreach(OpenCLProgram *program, programs) {
+ program->load();
+ }
+#endif
return true;
}