[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41763] trunk/blender/intern/cycles/util/ util_cuda.cpp: Hack-fix for crash-by-assertion on mingw builds on startup if the CUDA driver on
Joshua Leung
aligorith at gmail.com
Sat Nov 12 04:59:50 CET 2011
Revision: 41763
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41763
Author: aligorith
Date: 2011-11-12 03:59:45 +0000 (Sat, 12 Nov 2011)
Log Message:
-----------
Hack-fix for crash-by-assertion on mingw builds on startup if the CUDA driver on
the computer is too old (and probably can't be upgraded to a version that does)
to support the cuDriverGetVersion method.
Modified Paths:
--------------
trunk/blender/intern/cycles/util/util_cuda.cpp
Modified: trunk/blender/intern/cycles/util/util_cuda.cpp
===================================================================
--- trunk/blender/intern/cycles/util/util_cuda.cpp 2011-11-11 20:57:00 UTC (rev 41762)
+++ trunk/blender/intern/cycles/util/util_cuda.cpp 2011-11-12 03:59:45 UTC (rev 41763)
@@ -147,6 +147,8 @@
CCL_NAMESPACE_BEGIN
/* utility macros */
+#define CUDA_LIBRARY_FIND_CHECKED(name) \
+ name = (t##name*)dynamic_library_find(lib, #name);
#define CUDA_LIBRARY_FIND(name) \
name = (t##name*)dynamic_library_find(lib, #name); \
@@ -188,7 +190,7 @@
/* detect driver version */
int driver_version = 1000;
- CUDA_LIBRARY_FIND(cuDriverGetVersion);
+ CUDA_LIBRARY_FIND_CHECKED(cuDriverGetVersion);
if(cuDriverGetVersion)
cuDriverGetVersion(&driver_version);
More information about the Bf-blender-cvs
mailing list