diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-23 15:01:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-01-23 15:07:25 +0300 |
commit | 4a3ddd8a7a5bc1851f832869310b5340a6b41d46 (patch) | |
tree | 6de0954b490d752a2ca611e54971d220aa32d0d6 /intern | |
parent | b129ea843a7332ddd96554a8c59be379dabf2210 (diff) |
Fix Cycles assert when resizing rendererd viewport.
Diffstat (limited to 'intern')
-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) |