mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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.
This commit is contained in:
parent
08aaa07adb
commit
b4bddf2e3b
1 changed files with 4 additions and 3 deletions
|
|
@ -1543,10 +1543,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue