From 949ab753bb2e2d0f76921ed6d716f074ce863f21 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Wed, 20 Feb 2019 14:41:56 +0100 Subject: Cycles OpenCL: Remove OpenCL MegaKernel Using OpenCL MegaKernel has been slow and therefore not usefull. This patch will remove the mega kernel from the OpenCL codebase and the OpenCLDeviceBase class. T61736: removal of mega kernel T61703: baking does not work with mega kernel Tags: #cycles Differential Revision: https://developer.blender.org/D4383 --- intern/cycles/device/device_opencl.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'intern/cycles/device/device_opencl.cpp') diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 1e8c6b2dd0e..948fe407f63 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -29,19 +29,7 @@ CCL_NAMESPACE_BEGIN Device *device_opencl_create(DeviceInfo& info, Stats &stats, Profiler &profiler, bool background) { - vector usable_devices; - OpenCLInfo::get_usable_devices(&usable_devices); - assert(info.num < usable_devices.size()); - const OpenCLPlatformDevice& platform_device = usable_devices[info.num]; - const string& platform_name = platform_device.platform_name; - const cl_device_type device_type = platform_device.device_type; - if(OpenCLInfo::kernel_use_split(platform_name, device_type)) { - VLOG(1) << "Using split kernel."; - return opencl_create_split_device(info, stats, profiler, background); - } else { - VLOG(1) << "Using mega kernel."; - return opencl_create_mega_device(info, stats, profiler, background); - } + return opencl_create_split_device(info, stats, profiler, background); } bool device_opencl_init() @@ -111,7 +99,6 @@ void device_opencl_info(vector& devices) foreach(OpenCLPlatformDevice& platform_device, usable_devices) { /* Compute unique ID for persistent user preferences. */ const string& platform_name = platform_device.platform_name; - const cl_device_type device_type = platform_device.device_type; const string& device_name = platform_device.device_name; string hardware_id = platform_device.hardware_id; if(hardware_id == "") { @@ -133,8 +120,7 @@ void device_opencl_info(vector& devices) /* We don't know if it's used for display, but assume it is. */ info.display_device = true; info.advanced_shading = OpenCLInfo::kernel_use_advanced_shading(platform_name); - info.use_split_kernel = OpenCLInfo::kernel_use_split(platform_name, - device_type); + info.use_split_kernel = true; info.has_volume_decoupled = false; info.id = id; -- cgit v1.2.3