[Bf-blender-cvs] [f9963f29e8b] master: Cycles: Dont allow global size to fall to zero

Mai Lavelle noreply at git.blender.org
Thu Jul 6 02:35:45 CEST 2017


Commit: f9963f29e8beac1336a053ca642ebb03b4e123e2
Author: Mai Lavelle
Date:   Wed Jul 5 20:15:47 2017 -0400
Branches: master
https://developer.blender.org/rBf9963f29e8beac1336a053ca642ebb03b4e123e2

Cycles: Dont allow global size to fall to zero

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

M	intern/cycles/device/opencl/opencl_split.cpp

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

diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp
index 73b8769d3cc..50345613b6d 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -428,7 +428,7 @@ public:
 		        << string_human_readable_size(max_buffer_size) << ").";
 
 		size_t num_elements = max_elements_for_max_buffer_size(kg, data, max_buffer_size / 2);
-		int2 global_size = make_int2(round_down((int)sqrt(num_elements), 64), (int)sqrt(num_elements));
+		int2 global_size = make_int2(max(round_down((int)sqrt(num_elements), 64), 64), (int)sqrt(num_elements));
 		VLOG(1) << "Global size: " << global_size << ".";
 		return global_size;
 	}




More information about the Bf-blender-cvs mailing list