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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-04 03:39:42 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-04 03:39:42 +0400
commit0fcf17fc72319bc52b793b2f6156a60aed31dc62 (patch)
tree5deeb3074f2df5ed89617a97bdb6dd3f1e4195ac /intern
parent48ead2736643cf0327b9472cfd05042a58f9d9b0 (diff)
Possible fix for #31054: cycles viewport rendering not working with CUDA for
computation and ATI card for OpenGL.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/device_cuda.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 0c08baae3ff..4bead82fe5a 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -172,10 +172,15 @@ public:
CUresult result;
- if(background)
+ if(background) {
result = cuCtxCreate(&cuContext, 0, cuDevice);
- else
- result = cuGLCtxCreate(&cuContext, 0, cuDevice);
+ }
+ else {
+ if(cuGLCtxCreate(&cuContext, 0, cuDevice) != CUDA_SUCCESS) {
+ result = cuCtxCreate(&cuContext, 0, cuDevice);
+ background = true;
+ }
+ }
if(cuda_error(result))
return;