diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2017-03-01 09:05:55 +0300 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2017-03-08 09:30:43 +0300 |
commit | 4cf501b83557ed5d64dbd2ddb13e1e8c5add88f5 (patch) | |
tree | 9f142597016bae22e73137aeeaf4d8107af3d8c8 /intern/cycles/device/device_split_kernel.cpp | |
parent | 5b8f1c8d342274e08d1a489b655ca4138eb1c5fc (diff) |
Cycles: Split path initialization into own kernel
This makes it easier to initialize things correctly in the data_init kernel
before they are needed by path tracing.
Diffstat (limited to 'intern/cycles/device/device_split_kernel.cpp')
-rw-r--r-- | intern/cycles/device/device_split_kernel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/device/device_split_kernel.cpp b/intern/cycles/device/device_split_kernel.cpp index c50afe85da5..85da7024a2c 100644 --- a/intern/cycles/device/device_split_kernel.cpp +++ b/intern/cycles/device/device_split_kernel.cpp @@ -41,6 +41,7 @@ DeviceSplitKernel::~DeviceSplitKernel() device->mem_free(queue_index); device->mem_free(work_pool_wgs); + delete kernel_path_init; delete kernel_scene_intersect; delete kernel_lamp_emission; delete kernel_queue_enqueue; @@ -61,6 +62,7 @@ bool DeviceSplitKernel::load_kernels(const DeviceRequestedFeatures& requested_fe return false; \ } + LOAD_KERNEL(path_init); LOAD_KERNEL(scene_intersect); LOAD_KERNEL(lamp_emission); LOAD_KERNEL(queue_enqueue); @@ -200,6 +202,8 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task, return false; } + ENQUEUE_SPLIT_KERNEL(path_init, global_size, local_size); + bool activeRaysAvailable = true; while(activeRaysAvailable) { |