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:
-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)