Cycles: Enable OptiX on first generation Maxwell GPUs again

This commit is contained in:
Patrick Mours 2020-07-27 16:11:00 +02:00 committed by Brecht Van Lommel
parent b4bddf2e3b
commit f00ba34411
Notes: blender-bot 2023-02-13 22:19:23 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
2 changed files with 5 additions and 6 deletions

View File

@ -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;

View File

@ -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