[Bf-blender-cvs] [acaa1e8] cycles_kernel_split: Refactor : Add assert and comment for clos_max
varunsundar08
noreply at git.blender.org
Tue May 5 20:05:50 CEST 2015
Commit: acaa1e84666ce00cbfda2a94b6c6c4d7615c9371
Author: varunsundar08
Date: Tue May 5 18:29:49 2015 +0530
Branches: cycles_kernel_split
https://developer.blender.org/rBacaa1e84666ce00cbfda2a94b6c6c4d7615c9371
Refactor : Add assert and comment for clos_max
===================================================================
M intern/cycles/device/device_opencl.cpp
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 9728ec7..7a175b8 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -1987,10 +1987,9 @@ public:
* to limit re-compilations
*/
if(!background) {
- /* clos_max value can't be 0 */
- clos_max = (clos_max == 0) ? 1 : clos_max;
+ assert((clos_max != 0) && "clos_max value is 0" );
clos_max = (((clos_max - 1) / 5) + 1) * 5;
- /* clos_max value can't be greater than MAX_CLOSURE */
+ /* clos_max value shouldn't be greater than MAX_CLOSURE */
clos_max = (clos_max > MAX_CLOSURE) ? MAX_CLOSURE : clos_max;
if(current_clos_max == clos_max) {
@@ -2478,7 +2477,6 @@ public:
#ifdef __WORK_STEALING__
if(work_pool_wgs != NULL)
clReleaseMemObject(work_pool_wgs);
-
#endif
if(per_sample_output_buffers != NULL)
More information about the Bf-blender-cvs
mailing list