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:
authorPatrick Mours <pmours@nvidia.com>2020-07-24 16:36:09 +0300
committerPatrick Mours <pmours@nvidia.com>2020-07-24 16:36:09 +0300
commitc64b12c0b80bc5a60ff39c7f984d06020009400c (patch)
tree96d4f7e7805b30669e01de6e53138f9450e2e062 /intern
parentec17b45034fbc9278bb42ea574bdaf2b8a6857e3 (diff)
Fix OptiX being shown as available on first generation Maxwell GPUs
The OptiX kernels are compiled for target "compute_sm_52", which is only available on second generation Maxwell GPUs, so disable support for older ones.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/device_optix.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index 1cc45983565..ca10cee76ad 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1746,10 +1746,11 @@ void device_optix_info(const vector<DeviceInfo> &cuda_devices, vector<DeviceInfo
for (DeviceInfo info : cuda_devices) {
assert(info.type == DEVICE_CUDA);
- int major;
+ int major, minor;
cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, info.num);
- if (major < 5) {
- continue; // Only Maxwell and up are supported by OptiX
+ cuDeviceGetAttribute(&minor, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, info.num);
+ if (major < 5 || (major == 5 && minor < 2)) {
+ continue; // Only Maxwell 2.0 and up are supported by OptiX
}
info.type = DEVICE_OPTIX;