[Bf-blender-cvs] [3300b1f] master: Cycles: Add option to force mega kernel to be used

Sergey Sharybin noreply at git.blender.org
Thu Oct 29 17:53:01 CET 2015


Commit: 3300b1f23249819a3cb6d279c2b2425f97fde3f6
Author: Sergey Sharybin
Date:   Thu Oct 29 21:45:57 2015 +0500
Branches: master
https://developer.blender.org/rB3300b1f23249819a3cb6d279c2b2425f97fde3f6

Cycles: Add option to force mega kernel to be used

This way it's possible to test mega kernel on various hardware.

That being said mega kernel seems to work on Fiji card here in the studio.

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

M	intern/cycles/device/device_opencl.cpp

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

diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 7f16a73..a9e5f02 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -130,8 +130,13 @@ bool opencl_kernel_use_split(const string& platform_name,
                              const cl_device_type device_type)
 {
 	if(getenv("CYCLES_OPENCL_SPLIT_KERNEL_TEST") != NULL) {
+		VLOG(1) << "Forcing split kernel to use.";
 		return true;
 	}
+	if(getenv("CYCLES_OPENCL_MEGA_KERNEL_TEST") != NULL) {
+		VLOG(1) << "Forcing mega kernel to use.";
+		return false;
+	}
 	/* TODO(sergey): Replace string lookups with more enum-like API,
 	 * similar to device/vendor checks blender's gpu.
 	 */




More information about the Bf-blender-cvs mailing list