diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-09-23 13:43:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-09-23 13:43:23 +0300 |
commit | 2372e67dd6a2231869ec50d7bf382006be7141de (patch) | |
tree | cf42d6f729d1728dba50bc5188ec51d95fa66d92 | |
parent | 1b2b7cfa2007172e07d78324bb941d0160b59c42 (diff) |
Cycles: Don't sum up memory usage of all devices together for the stats
-rw-r--r-- | intern/cycles/device/device_multi.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp index c4f8d9e16e0..ef257358b22 100644 --- a/intern/cycles/device/device_multi.cpp +++ b/intern/cycles/device/device_multi.cpp @@ -51,7 +51,7 @@ public: Device *device; foreach(DeviceInfo& subinfo, info.multi_devices) { - device = Device::create(subinfo, stats, background); + device = Device::create(subinfo, sub_stats_, background); devices.push_back(SubDevice(device)); } @@ -107,6 +107,7 @@ public: } mem.device_pointer = unique_ptr++; + stats.mem_alloc(mem.device_size); } void mem_copy_to(device_memory& mem) @@ -161,6 +162,7 @@ public: } mem.device_pointer = 0; + stats.mem_free(mem.device_size); } void const_copy_to(const char *name, void *host, size_t size) @@ -186,6 +188,7 @@ public: } mem.device_pointer = unique_ptr++; + stats.mem_alloc(mem.device_size); } void tex_free(device_memory& mem) @@ -199,6 +202,7 @@ public: } mem.device_pointer = 0; + stats.mem_free(mem.device_size); } void pixels_alloc(device_memory& mem) @@ -336,6 +340,9 @@ public: foreach(SubDevice& sub, devices) sub.device->task_cancel(); } + +protected: + Stats sub_stats_; }; Device *device_multi_create(DeviceInfo& info, Stats &stats, bool background) |