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:
authorJeroen Bakker <j.bakker@atmind.nl>2019-03-13 14:31:48 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2019-03-15 18:18:21 +0300
commit2f6257fd7fe305e3b226a8b505eb614bbeaf762a (patch)
treefba47f34d5bc5f10d50be92e5dd8b14fa9ecc9a9 /intern/cycles/util/util_task.cpp
parent62377431114411c50ededadf98fda284ec4061c5 (diff)
Cycles/OpenCL: Compile Kernels During Scene Update
The main goals of this change is faster starting when using foreground rendering. This patch will build kernels in parallel to the update process of the scene. When these optimized kernels are not available (yet) an AO kernel will be used. These AO kernels are fast to compile (3-7 seconds) and can be reused by all scenes. When the final kernels become available we will switch to these kernels. In background mode the AO kernels will not be used. Some kernels are being used during Scene update (displace, background light). When these kernels are being used the process can halt until these become available. Reviewed By: brecht, #cycles Maniphest Tasks: T61752 Differential Revision: https://developer.blender.org/D4428
Diffstat (limited to 'intern/cycles/util/util_task.cpp')
-rw-r--r--intern/cycles/util/util_task.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/util/util_task.cpp b/intern/cycles/util/util_task.cpp
index 2a705c2432b..ce166af206a 100644
--- a/intern/cycles/util/util_task.cpp
+++ b/intern/cycles/util/util_task.cpp
@@ -148,6 +148,12 @@ bool TaskPool::canceled()
return do_cancel;
}
+bool TaskPool::finished()
+{
+ thread_scoped_lock num_lock(num_mutex);
+ return num == 0;
+}
+
void TaskPool::num_decrease(int done)
{
num_mutex.lock();