[Bf-blender-cvs] [29a17d5] master: Fix CUDA MEMCPY condition, it should only copy 3D, 2D or 1D.

Thomas Dinges noreply at git.blender.org
Tue May 17 00:38:24 CEST 2016


Commit: 29a17d54da1f4b85a59487e032165bb44dc1b065
Author: Thomas Dinges
Date:   Tue May 17 00:37:34 2016 +0200
Branches: master
https://developer.blender.org/rB29a17d54da1f4b85a59487e032165bb44dc1b065

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