diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-03-15 10:11:28 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-03-15 10:11:28 +0300 |
commit | 62377431114411c50ededadf98fda284ec4061c5 (patch) | |
tree | 2f56ea4b13a8c39b5bf30c742839a6fa9376ef02 /intern/cycles | |
parent | 57b5852bc8b8188e73e2ffd7c05aaa3f409c3025 (diff) |
Cycles/OpenCL: Added missing opencl programs
The functions that determine the program name + filename of kernels
were missing some base kernels like denoising and base. For completeness
I added those kernels so the function returns the correct results.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/opencl/opencl_split.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp index 422813c2e07..57612098b34 100644 --- a/intern/cycles/device/opencl/opencl_split.cpp +++ b/intern/cycles/device/opencl/opencl_split.cpp @@ -40,7 +40,13 @@ struct texture_slot_t { int slot; }; -static const string fast_compiled_kernels = +static const string NON_SPLIT_KERNELS = + "denoising " + "base " + "background " + "displace "; + +static const string SPLIT_BUNDLE_KERNELS = "data_init " "path_init " "state_buffer_size " @@ -55,7 +61,10 @@ static const string fast_compiled_kernels = const string OpenCLDevice::get_opencl_program_name(const string& kernel_name) { - if (fast_compiled_kernels.find(kernel_name) != std::string::npos) { + if (NON_SPLIT_KERNELS.find(kernel_name) != std::string::npos) { + return kernel_name; + } + else if (SPLIT_BUNDLE_KERNELS.find(kernel_name) != std::string::npos) { return "split_bundle"; } else { @@ -65,7 +74,10 @@ const string OpenCLDevice::get_opencl_program_name(const string& kernel_name) const string OpenCLDevice::get_opencl_program_filename(const string& kernel_name) { - if (fast_compiled_kernels.find(kernel_name) != std::string::npos) { + if (kernel_name == "denoising") { + return "filter.cl"; + } + else if (SPLIT_BUNDLE_KERNELS.find(kernel_name) != std::string::npos) { return "kernel_split_bundle.cl"; } else { |