forked from bartvdbraak/blender
Possible fix for #31054: cycles viewport rendering not working with CUDA for
computation and ATI card for OpenGL.
This commit is contained in:
parent
48ead27366
commit
0fcf17fc72
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user