Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-23 15:01:02 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-23 15:07:25 +0300
commit4a3ddd8a7a5bc1851f832869310b5340a6b41d46 (patch)
tree6de0954b490d752a2ca611e54971d220aa32d0d6 /intern/cycles/device
parentb129ea843a7332ddd96554a8c59be379dabf2210 (diff)
Fix Cycles assert when resizing rendererd viewport.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device_memory.h5
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)