[Bf-blender-cvs] [859039f] master: Cycles: Raise a proper error message when using Branched Path on sm_30, this is currently still disabled.
Thomas Dinges
noreply at git.blender.org
Thu Mar 27 10:30:00 CET 2014
Commit: 859039f732b02b438a5fdc315345c4d6caf207e0
Author: Thomas Dinges
Date: Thu Mar 27 10:29:22 2014 +0100
https://developer.blender.org/rB859039f732b02b438a5fdc315345c4d6caf207e0
Cycles: Raise a proper error message when using Branched Path on sm_30, this is currently still disabled.
===================================================================
M intern/cycles/device/device_cuda.cpp
===================================================================
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 2500141..a8a3134 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -236,15 +236,23 @@ public:
cuda_assert(cuCtxDestroy(cuContext))
}
- bool support_device(bool experimental)
+ bool support_device(bool experimental, bool branched)
{
int major, minor;
cuDeviceComputeCapability(&major, &minor, cuDevId);
-
+
+ /* We only support sm_20 and above */
if(major < 2) {
cuda_error_message(string_printf("CUDA device supported only with compute capability 2.0 or up, found %d.%d.", major, minor));
return false;
}
+
+ /* Currently no Branched Path on sm_30 */
+ if(branched && major == 3 && minor == 0) {
+ cuda_error_message(string_printf("CUDA device: Branched Path is currently disabled on sm_30 GPUs."));
+ return false;
+ }
+
return true;
}
@@ -352,8 +360,8 @@ public:
if(cuContext == 0)
return false;
- /* check if GPU is supported with current feature set */
- if(!support_device(experimental))
+ /* check if GPU is supported */
+ if(!support_device(experimental, false))
return false;
/* get kernel */
@@ -613,7 +621,7 @@ public:
CUdeviceptr d_rng_state = cuda_device_ptr(rtile.rng_state);
/* get kernel function */
- if(branched)
+ if(branched && support_device(true, branched))
cuda_assert(cuModuleGetFunction(&cuPathTrace, cuModule, "kernel_cuda_branched_path_trace"))
else
cuda_assert(cuModuleGetFunction(&cuPathTrace, cuModule, "kernel_cuda_path_trace"))
More information about the Bf-blender-cvs
mailing list