Cycles: Improve memory usage of CPU split kernel by using smaller global size

This commit is contained in:
Mai Lavelle 2017-03-17 01:31:11 -04:00
parent 60a344b43d
commit 2cae58524c
2 changed files with 2 additions and 2 deletions

View File

@ -856,8 +856,7 @@ int2 CPUSplitKernel::split_kernel_local_size()
}
int2 CPUSplitKernel::split_kernel_global_size(device_memory& /*kg*/, device_memory& /*data*/, DeviceTask *task) {
/* TODO(mai): this needs investigation but cpu gives incorrect render if global size doesnt match tile size */
return task->requested_tile_size;
return make_int2(64, 1);
}
uint64_t CPUSplitKernel::state_buffer_size(device_memory& kernel_globals, device_memory& /*data*/, size_t num_threads) {

View File

@ -142,6 +142,7 @@ bool DeviceSplitKernel::path_trace(DeviceTask *task,
/* Number of elements in the global state buffer */
int num_global_elements = global_size[0] * global_size[1];
assert(num_global_elements % WORK_POOL_SIZE == 0);
/* Allocate all required global memory once. */
if(first_tile) {