[Bf-blender-cvs] [62377431114] blender2.7: Cycles/OpenCL: Added missing opencl programs

Jeroen Bakker noreply at git.blender.org
Fri Mar 15 08:14:02 CET 2019


Commit: 62377431114411c50ededadf98fda284ec4061c5
Author: Jeroen Bakker
Date:   Fri Mar 15 08:11:28 2019 +0100
Branches: blender2.7
https://developer.blender.org/rB62377431114411c50ededadf98fda284ec4061c5

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.

===================================================================

M	intern/cycles/device/opencl/opencl_split.cpp

===================================================================

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 {



More information about the Bf-blender-cvs mailing list