diff options
-rw-r--r-- | intern/cycles/device/device_memory.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/device/device_memory.h b/intern/cycles/device/device_memory.h index 796c898bc8d..0f2015ee27c 100644 --- a/intern/cycles/device/device_memory.h +++ b/intern/cycles/device/device_memory.h @@ -434,7 +434,10 @@ public: void alloc_to_device(size_t width, size_t height, size_t depth = 0) { device_vector<T>::alloc(width, height, depth); - device_memory::device_alloc(); + + if(!device_memory::device_pointer) { + device_memory::device_alloc(); + } } T *copy_from_device(int y, int w, int h) |