[Bf-blender-cvs] [ad4bb312d7] cycles_split_kernel: Cycles: Set device ideal global work size for split kernel
Mai Lavelle
noreply at git.blender.org
Tue Jan 24 13:33:51 CET 2017
Commit: ad4bb312d78b45fe0e1fdb5c8e91e8fa44712144
Author: Mai Lavelle
Date: Tue Jan 24 06:58:51 2017 -0500
Branches: cycles_split_kernel
https://developer.blender.org/rBad4bb312d78b45fe0e1fdb5c8e91e8fa44712144
Cycles: Set device ideal global work size for split kernel
With this the split kernel is running quite a bit faster on some
devices. Other devices will still need more testing.
===================================================================
M intern/cycles/device/device_split_kernel.cpp
===================================================================
diff --git a/intern/cycles/device/device_split_kernel.cpp b/intern/cycles/device/device_split_kernel.cpp
index 9429c901c8..e47b65b459 100644
--- a/intern/cycles/device/device_split_kernel.cpp
+++ b/intern/cycles/device/device_split_kernel.cpp
@@ -118,16 +118,21 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
local_size[1] = lsize[1];
}
- /* Make sure that set render feasible tile size is a multiple of local
- * work size dimensions.
- */
- size_t global_size[2];
- global_size[0] = round_up(task->requested_tile_size.x, local_size[0]);
- global_size[1] = round_up(task->requested_tile_size.y, local_size[1]);
-
/* Calculate per_thread_output_buffer_size. */
size_t per_thread_output_buffer_size = task->passes_size;
+ /* Set gloabl size */
+ size_t global_size[2];
+ {
+ int2 gsize = device->split_kernel_global_size(task, *this);
+
+ /* Make sure that set work size is a multiple of local
+ * work size dimensions.
+ */
+ global_size[0] = round_up(gsize[0], local_size[0]);
+ global_size[1] = round_up(gsize[1], local_size[1]);
+ }
+
/* Number of elements in the global state buffer */
int num_global_elements = global_size[0] * global_size[1];
More information about the Bf-blender-cvs
mailing list