Cycles: delay CUDA and OpenCL initialization to avoid driver crashes.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 29 Jan 2019 15:39:30 +0000 (16:39 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 29 Jan 2019 16:00:02 +0000 (17:00 +0100)
commit001414fb2f7346d2ff332bf851373522d87659d7
tree366112462b869a31767d7439b04b900ba21044c1
parente37b9b5d0d2664697de8f1c7614e88073dd8ff49
Cycles: delay CUDA and OpenCL initialization to avoid driver crashes.

We've had many reported crashes on Windows where we suspect there is a
corrupted OpenCL driver. The purpose here is to keep Blender generally
usable in such cases.

Now it always shows None / CUDA / OpenCL in the preferences, and only when
selecting one will it reveal if there are any GPUs available. This should
avoid crashes when opening the preferences or on startup.

Differential Revision: https://developer.blender.org/D4265
intern/cycles/app/cycles_standalone.cpp
intern/cycles/blender/addon/properties.py
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/device/device.cpp
intern/cycles/device/device.h