From e6099c7e46f6ca90dff3dc62d06db7fcb276e790 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 26 Feb 2019 08:53:47 +0100 Subject: T61576: Do Not (Re-)Compile OpenCL kernels The goal of this patch is to have limit the number of times kernels needs to be compiled and are reused as kernels with different compile directives can lead to identical same binaries. The implementation does this by stripping the compile directives. and reshuffling kernels so the output is more likely to be the same. We focussed on the kernels where it was easy to detect and maintain (bundle, bake, displace, do_volume and background). More optimizations could be done but they are probably less obvious. Merged the data_init and state_buffer_size kernels to split_bundle. This patch will also remove empty kernels for do_volume and bake when their features are not enabled. When using the benchmark files there are less background, bake and do_volume kernels compiled. Fix: T61576, T61501, T61466 Reviewed By: brecht, #cycles Differential Revision: https://developer.blender.org/D4390 --- intern/cycles/kernel/kernels/opencl/kernel_split_bundle.cl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern/cycles/kernel') diff --git a/intern/cycles/kernel/kernels/opencl/kernel_split_bundle.cl b/intern/cycles/kernel/kernels/opencl/kernel_split_bundle.cl index 71ea68382b4..6041f13b52b 100644 --- a/intern/cycles/kernel/kernels/opencl/kernel_split_bundle.cl +++ b/intern/cycles/kernel/kernels/opencl/kernel_split_bundle.cl @@ -17,7 +17,9 @@ #include "kernel/kernel_compat_opencl.h" // PRECOMPILED #include "kernel/split/kernel_split_common.h" // PRECOMPILED +#include "kernel/kernels/opencl/kernel_data_init.cl" #include "kernel/kernels/opencl/kernel_path_init.cl" +#include "kernel/kernels/opencl/kernel_state_buffer_size.cl" #include "kernel/kernels/opencl/kernel_scene_intersect.cl" #include "kernel/kernels/opencl/kernel_queue_enqueue.cl" #include "kernel/kernels/opencl/kernel_shader_setup.cl" -- cgit v1.2.3