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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-21 05:00:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-21 05:00:03 +0400
commitfdadfde5c5cc2c5b7255834170b32c4d169bdd42 (patch)
treef681b0c10cf8341d783586874b1c75f4fd7a73db /intern/cycles/device
parentf43e75c4d6decffe813f28b083a54158758ff5f9 (diff)
Fix #33158: motion vector pass wrong in cycles in some scenes, wrong vectors
due to float precision problem in matrix inverse.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device_cuda.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index d797c0f09ca..14f8cfa8767 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -60,7 +60,7 @@ public:
return (CUdeviceptr)mem;
}
- const char *cuda_error_string(CUresult result)
+ static const char *cuda_error_string(CUresult result)
{
switch(result) {
case CUDA_SUCCESS: return "No errors";
@@ -915,12 +915,21 @@ Device *device_cuda_create(DeviceInfo& info, Stats &stats, bool background)
void device_cuda_info(vector<DeviceInfo>& devices)
{
+ CUresult result;
int count = 0;
- if(cuInit(0) != CUDA_SUCCESS)
+ result = cuInit(0);
+ if(result != CUDA_SUCCESS) {
+ if(result != CUDA_ERROR_NO_DEVICE)
+ fprintf(stderr, "CUDA cuInit: %s\n", CUDADevice::cuda_error_string(result));
return;
- if(cuDeviceGetCount(&count) != CUDA_SUCCESS)
+ }
+
+ result = cuDeviceGetCount(&count);
+ if(result != CUDA_SUCCESS) {
+ fprintf(stderr, "CUDA cuDeviceGetCount: %s\n", CUDADevice::cuda_error_string(result));
return;
+ }
vector<DeviceInfo> display_devices;