[Bf-blender-cvs] [9a10435] cycles_kernel_split: Cycles kernel split: Always gather requested feature set for the device

Sergey Sharybin noreply at git.blender.org
Thu May 7 15:54:00 CEST 2015


Commit: 9a1043548811e46ef12780197d1455bf0900ed2f
Author: Sergey Sharybin
Date:   Thu May 7 17:06:57 2015 +0500
Branches: cycles_kernel_split
https://developer.blender.org/rB9a1043548811e46ef12780197d1455bf0900ed2f

Cycles kernel split: Always gather requested feature set for the device

It is a bit violation of design to check what kernel type device will use
prior gathering the required features. It'll also fail for cases like
network rendering.

This bit of code is relatively cheap, so there's no real harm doing it
always and letting the device itself to decide ignore or use the info.

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

M	intern/cycles/render/session.cpp

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

diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index c23b8ff..b5c988e 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -622,18 +622,17 @@ void Session::load_kernels()
 
 void Session::run()
 {
-	if (device->info.use_split_kernel) {
-		if(!params.background) {
-			device->clos_max = 64;
-			device->nodes_max_group = NODE_GROUP_LEVEL_2;
-			device->nodes_features = NODE_FEATURE_ALL;
-		}
-		else {
-			device->clos_max = get_max_closure_count();
-			scene->shader_manager->get_requested_features(scene,
-			                                              device->nodes_max_group,
-			                                              device->nodes_features);
-		}
+	/* Gather feature set required from the device. */
+	if(!params.background) {
+		device->clos_max = 64;
+		device->nodes_max_group = NODE_GROUP_LEVEL_2;
+		device->nodes_features = NODE_FEATURE_ALL;
+	}
+	else {
+		device->clos_max = get_max_closure_count();
+		scene->shader_manager->get_requested_features(scene,
+		                                              device->nodes_max_group,
+		                                              device->nodes_features);
 	}
 
 	/* load kernels */




More information about the Bf-blender-cvs mailing list