[Bf-blender-cvs] [ed1e517] compositor-2016: Fix CUDA MEMCPY condition, it should only copy 3D, 2D or 1D.

Thomas Dinges noreply at git.blender.org
Wed Jun 8 21:47:26 CEST 2016


Commit: ed1e5171a1eced9ba448a30585747071a504222b
Author: Thomas Dinges
Date:   Tue May 17 00:37:34 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rBed1e5171a1eced9ba448a30585747071a504222b

Fix CUDA MEMCPY condition, it should only copy 3D, 2D or 1D.

Found by Brecht, thanks!

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

M	intern/cycles/device/device_cuda.cpp

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

diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 69015e7..12c62c0 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -562,7 +562,7 @@ public:
 
 					cuda_assert(cuMemcpy3D(&param));
 				}
-				if(mem.data_height > 1) {
+				else if(mem.data_height > 1) {
 					CUDA_MEMCPY2D param;
 					memset(&param, 0, sizeof(param));
 					param.dstMemoryType = CU_MEMORYTYPE_ARRAY;




More information about the Bf-blender-cvs mailing list