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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-01-14 21:30:33 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-14 21:30:33 +0400
commite5179bfefc649cca07077d34d13c574e712d82d0 (patch)
tree255aa6003028cd403eab00d015c3a768e92f1cc4 /intern/cycles/device/device_cuda.cpp
parent36f44c6e02a5e35bb4572f232b867bb055dbb2d8 (diff)
Remove usage WITH_CYCLES_CUDA_BINARIES in code, use check for
precompiled cubins instead, Logic here is following now: - If there're precompiled cubins, assume CUDA compute is available, otherwise - If cuda toolkit found, assume CUDA compute is available - In all other cases CUDA compute is not available For windows there're still check for only precompiled binaries, no runtime compilation is allowed. Ended up with such decision after discussion with Brecht. The thing is, if we'll support runtime compilation on windows we'll end up having lots of reports about different aspects of something doesn't work (you need particular toolkit version, msvc installed, environment variables set properly and so) and giving feedback on such reports will waste time.
Diffstat (limited to 'intern/cycles/device/device_cuda.cpp')
-rw-r--r--intern/cycles/device/device_cuda.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 040f3044457..ae540710b50 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -238,13 +238,16 @@ public:
if(path_exists(cubin))
return cubin;
-#if defined(WITH_CUDA_BINARIES) && defined(_WIN32)
- if(major <= 1 && minor <= 2)
- cuda_error(string_printf("CUDA device supported only compute capability 1.3 or up, found %d.%d.", major, minor));
- else
- cuda_error(string_printf("CUDA binary kernel for this graphics card compute capability (%d.%d) not found.", major, minor));
- return "";
-#else
+#ifdef _WIN32
+ if(cuHavePrecompiledKernels()) {
+ if(major <= 1 && minor <= 2)
+ cuda_error(string_printf("CUDA device supported only compute capability 1.3 or up, found %d.%d.", major, minor));
+ else
+ cuda_error(string_printf("CUDA binary kernel for this graphics card compute capability (%d.%d) not found.", major, minor));
+ return "";
+ }
+#endif
+
/* if not, find CUDA compiler */
string nvcc = cuCompilerPath();
@@ -282,7 +285,6 @@ public:
printf("Kernel compilation finished in %.2lfs.\n", time_dt() - starttime);
return cubin;
-#endif
}
bool load_kernels(bool experimental)