diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-09-27 01:39:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-04 22:11:14 +0300 |
commit | e3e16cecc4f080edbbd14e4bf1cfc580c5957d62 (patch) | |
tree | 5b9da903526442acb10b48d2ccee5686a00a1017 /intern/cycles/device/opencl | |
parent | 5b7d6ea54b2fc35b8b12c667f5bf9a1c9c46d5c2 (diff) |
Code refactor: remove rng_state buffer and compute hash on the fly.
A little faster on some benchmark scenes, a little slower on others, seems
about performance neutral on average and saves a little memory.
Diffstat (limited to 'intern/cycles/device/opencl')
-rw-r--r-- | intern/cycles/device/opencl/opencl_mega.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/device/opencl/opencl_split.cpp | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/intern/cycles/device/opencl/opencl_mega.cpp b/intern/cycles/device/opencl/opencl_mega.cpp index ec47fdafa3d..f4555eaba4f 100644 --- a/intern/cycles/device/opencl/opencl_mega.cpp +++ b/intern/cycles/device/opencl/opencl_mega.cpp @@ -62,7 +62,6 @@ public: /* Cast arguments to cl types. */ cl_mem d_data = CL_MEM_PTR(const_mem_map["__data"]->device_pointer); cl_mem d_buffer = CL_MEM_PTR(rtile.buffer); - cl_mem d_rng_state = CL_MEM_PTR(rtile.rng_state); cl_int d_x = rtile.x; cl_int d_y = rtile.y; cl_int d_w = rtile.w; @@ -79,8 +78,7 @@ public: kernel_set_args(ckPathTraceKernel, 0, d_data, - d_buffer, - d_rng_state); + d_buffer); set_kernel_arg_buffers(ckPathTraceKernel, &start_arg_index); diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp index 16a96213100..976cc9df46d 100644 --- a/intern/cycles/device/opencl/opencl_split.cpp +++ b/intern/cycles/device/opencl/opencl_split.cpp @@ -192,7 +192,6 @@ struct CachedSplitMemory { int id; device_memory *split_data; device_memory *ray_state; - device_ptr *rng_state; device_memory *queue_index; device_memory *use_queues_flag; device_memory *work_pools; @@ -225,8 +224,7 @@ public: kg, data, *cached_memory.split_data, - *cached_memory.ray_state, - *cached_memory.rng_state); + *cached_memory.ray_state); device->set_kernel_arg_buffers(program(), &start_arg_index); @@ -356,8 +354,7 @@ public: kernel_data, split_data, num_global_elements, - ray_state, - rtile.rng_state); + ray_state); device->set_kernel_arg_buffers(device->program_data_init(), &start_arg_index); @@ -401,7 +398,6 @@ public: cached_memory.split_data = &split_data; cached_memory.ray_state = &ray_state; - cached_memory.rng_state = &rtile.rng_state; cached_memory.queue_index = &queue_index; cached_memory.use_queues_flag = &use_queues_flag; cached_memory.work_pools = &work_pool_wgs; |