[Bf-blender-cvs] [39bfde6] master: Cycles CUDA: don't use cuLaunchGridAsync at all for display devices.

Brecht Van Lommel noreply at git.blender.org
Thu Apr 17 12:26:28 CEST 2014


Commit: 39bfde674cfe4f6a9140b6d4c48a348de04d715a
Author: Brecht Van Lommel
Date:   Thu Apr 17 12:18:49 2014 +0200
https://developer.blender.org/rB39bfde674cfe4f6a9140b6d4c48a348de04d715a

Cycles CUDA: don't use cuLaunchGridAsync at all for display devices.

As suggested by Martijn, this is slower than cuLaunchGrid.

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

M	intern/cycles/device/device_cuda.cpp

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

diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 9739717..0d2f6cd 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -664,11 +664,14 @@ public:
 
 		cuda_assert(cuFuncSetCacheConfig(cuPathTrace, CU_FUNC_CACHE_PREFER_L1))
 		cuda_assert(cuFuncSetBlockShape(cuPathTrace, xthreads, ythreads, 1))
-		cuda_assert(cuLaunchGridAsync(cuPathTrace, xblocks, yblocks, cuStream))
 
 		if(info.display_device) {
 			/* don't use async for device used for display, locks up UI too much */
-			cuda_assert(cuStreamSynchronize(cuStream))
+			cuda_assert(cuLaunchGrid(cuPathTrace, xblocks, yblocks))
+			cuda_assert(cuCtxSynchronize())
+		}
+		else {
+			cuda_assert(cuLaunchGridAsync(cuPathTrace, xblocks, yblocks, cuStream))
 		}
 
 		cuda_pop_context();




More information about the Bf-blender-cvs mailing list