[Bf-blender-cvs] [4a3ddd8a7a5] master: Fix Cycles assert when resizing rendererd viewport.

Brecht Van Lommel noreply at git.blender.org
Tue Jan 23 13:07:56 CET 2018


Commit: 4a3ddd8a7a5bc1851f832869310b5340a6b41d46
Author: Brecht Van Lommel
Date:   Tue Jan 23 13:01:02 2018 +0100
Branches: master
https://developer.blender.org/rB4a3ddd8a7a5bc1851f832869310b5340a6b41d46

Fix Cycles assert when resizing rendererd viewport.

===================================================================

M	intern/cycles/device/device_memory.h

===================================================================

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)



More information about the Bf-blender-cvs mailing list