Fix Cycles allocating too much device memory, after recent memory refactoring.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 29 Jan 2018 13:51:22 +0000 (14:51 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 29 Jan 2018 16:07:08 +0000 (17:07 +0100)
Spotted by Ha Hyung-jin, thanks!

intern/cycles/device/device_memory.h

index 0f2015ee27c6b500abac1358fd4f7c953d9150d6..d8fe41e78bb8262d18e0e06e9a2d59da8b6bf278 100644 (file)
@@ -247,7 +247,7 @@ public:
 
        void alloc_to_device(size_t num, bool shrink_to_fit = true)
        {
-               size_t new_size = num*sizeof(T);
+               size_t new_size = num;
                bool reallocate;
 
                if(shrink_to_fit) {