[Bf-blender-cvs] [413192f] cycles_kernel_split: Don't use variable count macros to calc ShaderData size
varunsundar08
noreply at git.blender.org
Tue May 5 09:17:26 CEST 2015
Commit: 413192f442c90de0de1c0267127efcbba12e6c11
Author: varunsundar08
Date: Tue May 5 05:13:24 2015 +0530
Branches: cycles_kernel_split
https://developer.blender.org/rB413192f442c90de0de1c0267127efcbba12e6c11
Don't use variable count macros to calc ShaderData size
===================================================================
M intern/cycles/device/device_opencl.cpp
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index a994fa1..c9ed4a9 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -1728,19 +1728,8 @@ public:
}
size_t get_shader_data_size(size_t shader_closure_size) {
- size_t shader_data_size = 0;
- shader_data_size = SD_NUM_FLOAT3 * sizeof(float3)
-#ifdef __DPDU__
- + SD_NUM_DPDU_FLOAT3 * sizeof(float3)
-#endif
-#ifdef __RAY_DIFFERENTIALS__
- + SD_NUM_RAY_DIFFERENTIALS_DIFFERENTIAL3 * sizeof(differential3)
- +SD_NUM_DIFFERENTIAL * sizeof(differential)
-#endif
- + SD_NUM_RAY_DP_DIFFERENTIAL3 * sizeof(differential3)
- +SD_NUM_INT * sizeof(int)
- +SD_NUM_FLOAT * sizeof(float);
-
+ /* ShaderData size without accounting for ShaderClosure array */
+ size_t shader_data_size = sizeof(ShaderData) - (sizeof(ShaderClosure) * MAX_CLOSURE);
return (shader_data_size + shader_closure_size);
}
More information about the Bf-blender-cvs
mailing list