diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-20 13:02:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-20 13:02:19 +0300 |
commit | 333dc8d60ff4589fe73a7d0f63c3f7589d6b345a (patch) | |
tree | c2ccbcb01747d848af7735aea8b976b8382beb94 | |
parent | 9992e6a1693a7fe7512759811d79287c18a699a9 (diff) |
Fix T50719: Memory usage won't reset to zero while re-rendering on two video cards
Was only visible with Persistent Images option ON.
-rw-r--r-- | intern/cycles/device/device_multi.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp index 31b800640d3..61d78ee65de 100644 --- a/intern/cycles/device/device_multi.cpp +++ b/intern/cycles/device/device_multi.cpp @@ -162,6 +162,7 @@ public: void mem_free(device_memory& mem) { device_ptr tmp = mem.device_pointer; + stats.mem_free(mem.device_size); foreach(SubDevice& sub, devices) { mem.device_pointer = sub.ptr_map[tmp]; @@ -170,7 +171,6 @@ public: } mem.device_pointer = 0; - stats.mem_free(mem.device_size); } void const_copy_to(const char *name, void *host, size_t size) @@ -202,6 +202,7 @@ public: void tex_free(device_memory& mem) { device_ptr tmp = mem.device_pointer; + stats.mem_free(mem.device_size); foreach(SubDevice& sub, devices) { mem.device_pointer = sub.ptr_map[tmp]; @@ -210,7 +211,6 @@ public: } mem.device_pointer = 0; - stats.mem_free(mem.device_size); } void pixels_alloc(device_memory& mem) |