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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-30 01:30:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-11-30 01:43:27 +0300
commita8b8da55672c2177c55709321df3514355b513f4 (patch)
tree97c730a1b39e60ecd15ad5c73b63892329daae1e /intern/cycles/device/device_cpu.cpp
parent8ac2d85d2fd3f8b997e9c9bddadada0dc7bdaf37 (diff)
Fix T58183: crash with CPU + GPU rendering after profiling changes.
Multi-device was not passing along profiler to the CPU.
Diffstat (limited to 'intern/cycles/device/device_cpu.cpp')
-rw-r--r--intern/cycles/device/device_cpu.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index f0a6fd6e3f4..16908b0244a 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -208,8 +208,8 @@ public:
KERNEL_NAME_EVAL(cpu_avx, name), \
KERNEL_NAME_EVAL(cpu_avx2, name)
- CPUDevice(DeviceInfo& info_, Stats &stats_, bool background_)
- : Device(info_, stats_, background_),
+ CPUDevice(DeviceInfo& info_, Stats &stats_, Profiler &profiler_, bool background_)
+ : Device(info_, stats_, profiler_, background_),
texture_info(this, "__texture_info", MEM_TEXTURE),
#define REGISTER_KERNEL(name) name ## _kernel(KERNEL_FUNCTIONS(name))
REGISTER_KERNEL(path_trace),
@@ -781,7 +781,7 @@ public:
KernelGlobals *kg = new ((void*) kgbuffer.device_pointer) KernelGlobals(thread_kernel_globals_init());
- stats.profiler.add_state(&kg->profiler);
+ profiler.add_state(&kg->profiler);
CPUSplitKernel *split_kernel = NULL;
if(use_split_kernel) {
@@ -821,7 +821,7 @@ public:
}
}
- stats.profiler.remove_state(&kg->profiler);
+ profiler.remove_state(&kg->profiler);
thread_kernel_globals_free((KernelGlobals*)kgbuffer.device_pointer);
kg->~KernelGlobals();
@@ -1065,9 +1065,9 @@ uint64_t CPUSplitKernel::state_buffer_size(device_memory& kernel_globals, device
return split_data_buffer_size(kg, num_threads);
}
-Device *device_cpu_create(DeviceInfo& info, Stats &stats, bool background)
+Device *device_cpu_create(DeviceInfo& info, Stats &stats, Profiler &profiler, bool background)
{
- return new CPUDevice(info, stats, background);
+ return new CPUDevice(info, stats, profiler, background);
}
void device_cpu_info(vector<DeviceInfo>& devices)