[Bf-blender-cvs] [0356521] master: Cycles: Various fixes

Sergey Sharybin noreply at git.blender.org
Thu May 14 21:43:29 CEST 2015


Commit: 03565218d5a85f06a26a1ac95e70991613faaf2a
Author: Sergey Sharybin
Date:   Fri May 15 00:42:05 2015 +0500
Branches: master
https://developer.blender.org/rB03565218d5a85f06a26a1ac95e70991613faaf2a

Cycles: Various fixes

Some stupid fixes like spaces around operator and missing semicolon,
plus fix for wrong detecting of ShaderData SOA size. Thar was harmless
since there's only one closure array, but still better to fix this.

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

M	intern/cycles/device/device_opencl.cpp

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

diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 9153aa3..81edd25 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -1867,7 +1867,7 @@ public:
 
 	size_t get_shader_closure_size(int max_closure)
 	{
-		return (sizeof(ShaderClosure)* max_closure);
+		return (sizeof(ShaderClosure) * max_closure);
 	}
 
 	size_t get_shader_data_size(size_t shader_closure_size)
@@ -1900,10 +1900,8 @@ public:
 	{
 		size_t shader_soa_size = 0;
 
-#define SD_VAR(type, what) \
-		shader_soa_size += sizeof(void *);
-#define SD_CLOSURE_VAR(type, what, max_closure)
-		shader_soa_size += sizeof(void *);
+#define SD_VAR(type, what) shader_soa_size += sizeof(void *);
+#define SD_CLOSURE_VAR(type, what, max_closure) shader_soa_size += sizeof(void *);
 		#include "kernel_shaderdata_vars.h"
 #undef SD_VAR
 #undef SD_CLOSURE_VAR
@@ -2215,7 +2213,7 @@ public:
 		 */
 		if(num_parallel_samples >= 64) {
 			/* TODO(sergey): Could use generic round-up here. */
-			num_parallel_samples = (num_parallel_samples / 64) * 64
+			num_parallel_samples = (num_parallel_samples / 64) * 64;
 		}
 		assert(num_parallel_samples != 0);




More information about the Bf-blender-cvs mailing list