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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-21 19:58:59 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-21 21:13:44 +0300
commitdc9eb8234fe4c9c561a3bfb9a8e3a3cefe77d5e3 (patch)
treeb5d93ce6d13577a8d922b2675dbc7b55b1557f01 /intern/cycles/device/opencl
parentefd70ab78f0c0d9288508fd28988c969a0cbd31a (diff)
Cycles: combined CPU + GPU rendering support.
CPU rendering will be restricted to a BVH2, which is not ideal for raytracing performance but can be shared with the GPU. Decoupled volume shading will be disabled to match GPU volume sampling. The number of CPU rendering threads is reduced to leave one core dedicated to each GPU. Viewport rendering will also only use GPU rendering still. So along with the BVH2 usage, perfect scaling should not be expected. Go to User Preferences > System to enable the CPU to render alongside the GPU. Differential Revision: https://developer.blender.org/D2873
Diffstat (limited to 'intern/cycles/device/opencl')
-rw-r--r--intern/cycles/device/opencl/opencl_util.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp
index 7d5173a5f1d..459d512172f 100644
--- a/intern/cycles/device/opencl/opencl_util.cpp
+++ b/intern/cycles/device/opencl/opencl_util.cpp
@@ -1080,6 +1080,7 @@ cl_device_type OpenCLInfo::get_device_type(cl_device_id device_id)
string OpenCLInfo::get_readable_device_name(cl_device_id device_id)
{
+ string name = "";
char board_name[1024];
size_t length = 0;
if(clGetDeviceInfo(device_id,
@@ -1089,11 +1090,21 @@ string OpenCLInfo::get_readable_device_name(cl_device_id device_id)
&length) == CL_SUCCESS)
{
if(length != 0 && board_name[0] != '\0') {
- return board_name;
+ name = board_name;
}
}
+
/* Fallback to standard device name API. */
- return get_device_name(device_id);
+ if(name.empty()) {
+ name = get_device_name(device_id);
+ }
+
+ /* Distinguish from our native CPU device. */
+ if(get_device_type(device_id) & CL_DEVICE_TYPE_CPU) {
+ name += " (OpenCL)";
+ }
+
+ return name;
}
bool OpenCLInfo::get_driver_version(cl_device_id device_id,