Cycles: Split kernel - sort shaders
authorHristo Gueorguiev <prem.nirved@gmail.com>
Wed, 3 May 2017 13:30:45 +0000 (15:30 +0200)
committerHristo Gueorguiev <prem.nirved@gmail.com>
Wed, 3 May 2017 13:30:45 +0000 (15:30 +0200)
commit6bf4115c13962c99d1cdc97f2be92c4922f3fd33
tree569c512a242caf2ea4465f2eef561933ed937a2f
parent6f9c839f444f92c4b0c336a6f5e31cb9660d7dbc
Cycles: Split kernel - sort shaders

Reduce thread divergence in kernel_shader_eval.

Rays are sorted in blocks of 2048 according to shader->id.

On R9 290 Classroom is ~30% faster, and Pabellon Barcelone is ~8% faster.

No sorting for CUDA split kernel.

Reviewers: sergey, maiself

Reviewed By: maiself

Differential Revision: https://developer.blender.org/D2598
15 files changed:
intern/cycles/device/device_split_kernel.cpp
intern/cycles/device/device_split_kernel.h
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/kernels/cpu/kernel_cpu.h
intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
intern/cycles/kernel/kernels/cuda/kernel_split.cu
intern/cycles/kernel/kernels/opencl/kernel_shader_eval.cl
intern/cycles/kernel/kernels/opencl/kernel_shader_setup.cl [new file with mode: 0644]
intern/cycles/kernel/kernels/opencl/kernel_shader_sort.cl [new file with mode: 0644]
intern/cycles/kernel/kernels/opencl/kernel_split.cl
intern/cycles/kernel/split/kernel_shader_eval.h
intern/cycles/kernel/split/kernel_shader_setup.h [new file with mode: 0644]
intern/cycles/kernel/split/kernel_shader_sort.h [new file with mode: 0644]
intern/cycles/kernel/split/kernel_split_data_types.h