Commit: d64e171c4ba1648c647e5b160cc80c5dd15d05c6
Author: Patrick Mours
Date:   Mon Jul 27 16:11:00 2020 +0200
Branches: blender-v2.90-release master
https://developer.blender.org/rBd64e171c4ba1648c647e5b160cc80c5dd15d05c6

Cycles: Enable OptiX on first generation Maxwell GPUs again

===================================================================

M       intern/cycles/device/device_optix.cpp
M       intern/cycles/kernel/CMakeLists.txt

===================================================================

diff --git a/intern/cycles/device/device_optix.cpp 
b/intern/cycles/device/device_optix.cpp
index ca10cee76ad..1cc45983565 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1746,11 +1746,10 @@ void device_optix_info(const vector<DeviceInfo> 
&cuda_devices, vector<DeviceInfo
   for (DeviceInfo info : cuda_devices) {
     assert(info.type == DEVICE_CUDA);
 
-    int major, minor;
+    int major;
     cuDeviceGetAttribute(&major, CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, 
info.num);
-    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
+    if (major < 5) {
+      continue;  // Only Maxwell and up are supported by OptiX
     }
 
     info.type = DEVICE_OPTIX;
diff --git a/intern/cycles/kernel/CMakeLists.txt 
b/intern/cycles/kernel/CMakeLists.txt
index 5533eeb006d..db146226dc7 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -539,7 +539,7 @@ if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
           ${SRC_UTIL_HEADERS}
         COMMAND ${CUBIN_CC_ENV}
             "$<TARGET_FILE:cycles_cubin_cc>"
-            -target 52
+            -target 50
             -ptx
             -i ${CMAKE_CURRENT_SOURCE_DIR}/${input}
             ${cuda_flags}
@@ -563,7 +563,7 @@ if(WITH_CYCLES_DEVICE_OPTIX AND WITH_CYCLES_CUDA_BINARIES)
         COMMAND
           ${CUDA_NVCC_EXECUTABLE}
           --ptx
-          -arch=sm_52
+          -arch=sm_50
           ${cuda_flags}
           ${input}
         WORKING_DIRECTORY

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to