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:
Diffstat (limited to 'intern/cycles/integrator/path_trace_work_cpu.cpp')
-rw-r--r--intern/cycles/integrator/path_trace_work_cpu.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/intern/cycles/integrator/path_trace_work_cpu.cpp b/intern/cycles/integrator/path_trace_work_cpu.cpp
index 36ce2be9f6d..12dcc899dbb 100644
--- a/intern/cycles/integrator/path_trace_work_cpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_cpu.cpp
@@ -77,8 +77,10 @@ void PathTraceWorkCPU::render_samples(RenderStatistics &statistics,
const int64_t image_height = effective_buffer_params_.height;
const int64_t total_pixels_num = image_width * image_height;
- for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) {
- kernel_globals.start_profiling();
+ if (device_->profiler.active()) {
+ for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) {
+ kernel_globals.start_profiling();
+ }
}
tbb::task_arena local_arena = local_tbb_arena_create(device_);
@@ -106,9 +108,10 @@ void PathTraceWorkCPU::render_samples(RenderStatistics &statistics,
render_samples_full_pipeline(kernel_globals, work_tile, samples_num);
});
});
-
- for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) {
- kernel_globals.stop_profiling();
+ if (device_->profiler.active()) {
+ for (CPUKernelThreadGlobals &kernel_globals : kernel_thread_globals_) {
+ kernel_globals.stop_profiling();
+ }
}
statistics.occupancy = 1.0f;