Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-07-14 13:49:20 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-07-14 13:49:20 +0300
commit274795045c988065757faa88aee335961d978fff (patch)
tree2a615cfcf8103644b33ec3800bdb7ec39e4481b2 /intern/cycles/device/device_opencl.cpp
parent95a0bff83af260d618f5848925cb6f0602b66722 (diff)
Cycles: Give better idea which OpenCL kernel is currently compiling
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r--intern/cycles/device/device_opencl.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 08de384c3ca..50490f3a20e 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -881,7 +881,8 @@ public:
return true;
}
- bool compile_kernel(const string& kernel_path,
+ bool compile_kernel(const string& kernel_name,
+ const string& kernel_path,
const string& source,
const string& custom_kernel_build_options,
cl_program *kernel_program,
@@ -912,7 +913,7 @@ public:
}
double starttime = time_dt();
- printf("Compiling OpenCL kernel ...\n");
+ printf("Compiling %s OpenCL kernel ...\n", kernel_name.c_str());
/* TODO(sergey): Report which kernel is being compiled
* as well (megakernel or which of split kernels etc..).
*/
@@ -1012,7 +1013,8 @@ public:
string init_kernel_source = "#include \"kernels/opencl/kernel.cl\" // " + kernel_md5 + "\n";
/* If does not exist or loading binary failed, compile kernel. */
- if(!compile_kernel(kernel_path,
+ if(!compile_kernel("base_kernel",
+ kernel_path,
init_kernel_source,
build_flags,
&cpProgram,
@@ -1702,7 +1704,8 @@ public:
string init_kernel_source = "#include \"kernels/opencl/kernel.cl\" // " +
kernel_md5 + "\n";
/* If does not exist or loading binary failed, compile kernel. */
- if(!compile_kernel(kernel_path,
+ if(!compile_kernel("mega_kernel",
+ kernel_path,
init_kernel_source,
custom_kernel_build_options,
&path_trace_program,
@@ -2086,7 +2089,8 @@ public:
/* TODO(sergey): Seems really close to load_kernel(),
* could it be de-duplicated?
*/
- bool load_split_kernel(const string& kernel_path,
+ bool load_split_kernel(const string& kernel_name,
+ const string& kernel_path,
const string& kernel_init_source,
const string& clbin,
const string& custom_kernel_build_options,
@@ -2110,7 +2114,8 @@ public:
}
else {
/* If does not exist or loading binary failed, compile kernel. */
- if(!compile_kernel(kernel_path,
+ if(!compile_kernel(kernel_name,
+ kernel_path,
kernel_init_source,
custom_kernel_build_options,
program,
@@ -2217,7 +2222,10 @@ public:
clsrc = path_user_get(path_join("cache", clsrc)); \
debug_src = &clsrc; \
} \
- if(!load_split_kernel(kernel_path, kernel_init_source, clbin, \
+ if(!load_split_kernel(#name, \
+ kernel_path, \
+ kernel_init_source, \
+ clbin, \
build_options, \
&GLUE(name, _program), \
debug_src)) \