diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-03-24 21:42:23 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-03-24 22:09:36 +0300 |
commit | 394a1373a0cd20b7d0660df4bf80e1231e33cba9 (patch) | |
tree | b50349a3fdc0ed3fbfcc7825a16583042f60ecd9 /intern/cycles/device/opencl/device_opencl.h | |
parent | bb26c1359e4f4bb21ec4ec4ab37e28d1fada20b8 (diff) |
Cycles: use OpenCL C 2.0 if available, to improve performance for AMD
Tested with AMD Radeon Pro WX 9100, where it brings performance back to 2.80
level, and combined with recent changes is about 2-15% faster than 2.80 in
our benchmark scenes.
This somehow appears to specifically address the issue where adding more shader
nodes leads to slower runtime. I found no additional speedup by applying this
to change to 2.80 or removing the new shader node code.
Ref T71479
Patch by Jeroen Bakker.
Differential Revision: https://developer.blender.org/D6252
Diffstat (limited to 'intern/cycles/device/opencl/device_opencl.h')
-rw-r--r-- | intern/cycles/device/opencl/device_opencl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/device/opencl/device_opencl.h b/intern/cycles/device/opencl/device_opencl.h index cee29aefcfd..d6f4fb43061 100644 --- a/intern/cycles/device/opencl/device_opencl.h +++ b/intern/cycles/device/opencl/device_opencl.h @@ -88,6 +88,10 @@ class OpenCLInfo { static bool device_supported(const string &platform_name, const cl_device_id device_id); static bool platform_version_check(cl_platform_id platform, string *error = NULL); static bool device_version_check(cl_device_id device, string *error = NULL); + static bool get_device_version(cl_device_id device, + int *r_major, + int *r_minor, + string *error = NULL); static string get_hardware_id(const string &platform_name, cl_device_id device_id); static void get_usable_devices(vector<OpenCLPlatformDevice> *usable_devices); |