Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-11-12 07:59:45 +0400
committerJoshua Leung <aligorith@gmail.com>2011-11-12 07:59:45 +0400
commit4e83c67baa9ee50d9f1620186ce71de68c21202f (patch)
tree44e76a09118580b8f60d14c1d84e319b25dd9dc7 /intern/cycles/util/util_cuda.cpp
parent0f85990d4adf648dcb79b2196116191583011de3 (diff)
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.
Diffstat (limited to 'intern/cycles/util/util_cuda.cpp')
-rw-r--r--intern/cycles/util/util_cuda.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp
index fdf3d664a11..f81a11ba9da 100644
--- a/intern/cycles/util/util_cuda.cpp
+++ b/intern/cycles/util/util_cuda.cpp
@@ -147,6 +147,8 @@ tcuCtxSetCurrent *cuCtxSetCurrent;
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 @@ bool cuLibraryInit()
/* detect driver version */
int driver_version = 1000;
- CUDA_LIBRARY_FIND(cuDriverGetVersion);
+ CUDA_LIBRARY_FIND_CHECKED(cuDriverGetVersion);
if(cuDriverGetVersion)
cuDriverGetVersion(&driver_version);