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:
authorMai Lavelle <mai.lavelle@gmail.com>2017-03-01 09:05:55 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2017-03-08 09:30:43 +0300
commit4cf501b83557ed5d64dbd2ddb13e1e8c5add88f5 (patch)
tree9f142597016bae22e73137aeeaf4d8107af3d8c8 /intern/cycles/device
parent5b8f1c8d342274e08d1a489b655ca4138eb1c5fc (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')
-rw-r--r--intern/cycles/device/device_split_kernel.cpp4
-rw-r--r--intern/cycles/device/device_split_kernel.h1
2 files changed, 5 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) {
diff --git a/intern/cycles/device/device_split_kernel.h b/intern/cycles/device/device_split_kernel.h
index b3106fd5632..1903574f0b5 100644
--- a/intern/cycles/device/device_split_kernel.h
+++ b/intern/cycles/device/device_split_kernel.h
@@ -55,6 +55,7 @@ class DeviceSplitKernel {
private:
Device *device;
+ SplitKernelFunction *kernel_path_init;
SplitKernelFunction *kernel_scene_intersect;
SplitKernelFunction *kernel_lamp_emission;
SplitKernelFunction *kernel_queue_enqueue;