Commit: f1fdb4c9e329abd6d008c979c5ddb3b82bf07873 Author: varunsundar08 Date: Tue May 5 18:11:51 2015 +0530 Branches: cycles_kernel_split https://developer.blender.org/rBf1fdb4c9e329abd6d008c979c5ddb3b82bf07873
Account for d_data memory in 'get_scene_specific_mem_allocated' =================================================================== M intern/cycles/device/device_opencl.cpp =================================================================== diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 0a2dbe7..9728ec7 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -3292,8 +3292,8 @@ public: return tile_specific_mem_allocated; } - /* Calculates the texture memories that has been allocated */ - size_t get_scene_specific_mem_allocated(cl_mem /*d_data*/) { + /* Calculates the texture memories and KernelData (d_data) memory that has been allocated */ + size_t get_scene_specific_mem_allocated(cl_mem d_data) { size_t scene_specific_mem_allocated = 0; /* Calculate texture memories */ #define KERNEL_TEX(type, ttype, name) \ @@ -3301,6 +3301,12 @@ public: #include "kernel_textures.h" #undef KERNEL_TEX + size_t d_data_size; + ciErr = clGetMemObjectInfo(d_data, CL_MEM_SIZE, sizeof(d_data_size), &d_data_size, NULL); + assert(ciErr == CL_SUCCESS && "Can't get d_data mem object info"); + + scene_specific_mem_allocated += d_data_size; + return scene_specific_mem_allocated; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs