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
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2020-07-27 17:11:00 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-02-08 15:33:04 +0300
commitf00ba344115ca07f255fdd6088956e4d035714a0 (patch)
tree7b1c5ba1d471a3a253505c34f810507663dabb51
parentb4bddf2e3bd3e33a9ca7488fc78112f8a5fa0544 (diff)
Cycles: Enable OptiX on first generation Maxwell GPUs again
-rw-r--r--intern/cycles/device/device_optix.cpp7
-rw-r--r--intern/cycles/kernel/CMakeLists.txt4
2 files changed, 5 insertions, 6 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index 2b28d1e1dbb..db04c13d083 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1543,11 +1543,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 6ab0b9d39d2..5e408c55328 100644
--- a/intern/cycles/kernel/CMakeLists.txt
+++ b/intern/cycles/kernel/CMakeLists.txt
@@ -549,7 +549,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}
@@ -573,7 +573,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