forked from bartvdbraak/blender
Cycles: Improve memory usage of CPU split kernel by using smaller global size
This commit is contained in:
parent
60a344b43d
commit
2cae58524c
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user