diff options
author | Brecht Van Lommel <brecht> | 2021-07-13 19:48:22 +0300 |
---|---|---|
committer | James Monteath <james@blender.org> | 2021-07-13 19:48:22 +0300 |
commit | 7691ba9d540c7c7a7240504ce2c68955a27ef169 (patch) | |
tree | 6ca2f4e6e218fdbdb063b41508e48582c80fda5c | |
parent | 4e5537d0edacdba6b66155da99b63f912c91441b (diff) |
Cycles: make OptiX 7.3 the minimum required SDK version [WIP]tmp_arcpath-D11868
This is will be done in the cycles-x branch, this is just a temporary patch
so we can test it on the buildbot which assumes master.
Differential Revision: https://developer.blender.org/D11868
-rw-r--r-- | build_files/cmake/Modules/FindOptiX.cmake | 17 | ||||
-rw-r--r-- | build_files/config/pipeline_config.json | 2 | ||||
-rw-r--r-- | intern/cycles/CMakeLists.txt | 2 |
3 files changed, 17 insertions, 4 deletions
diff --git a/build_files/cmake/Modules/FindOptiX.cmake b/build_files/cmake/Modules/FindOptiX.cmake index cfcdd9cd23b..67106740f57 100644 --- a/build_files/cmake/Modules/FindOptiX.cmake +++ b/build_files/cmake/Modules/FindOptiX.cmake @@ -33,11 +33,23 @@ FIND_PATH(OPTIX_INCLUDE_DIR include ) +IF(EXISTS "${OPTIX_INCLUDE_DIR}/optix.h") + FILE(STRINGS "${OPTIX_INCLUDE_DIR}/optix.h" _optix_version REGEX "^#define OPTIX_VERSION[ \t].*$") + STRING(REGEX MATCHALL "[0-9]+" _optix_version ${_optix_version}) + + MATH(EXPR _optix_version_major "${_optix_version} / 10000") + MATH(EXPR _optix_version_minor "(${_optix_version} % 10000) / 100") + MATH(EXPR _optix_version_patch "${_optix_version} % 100") + + SET(OPTIX_VERSION "${_optix_version_major}.${_optix_version_minor}.${_optix_version_patch}") +ENDIF() + # handle the QUIETLY and REQUIRED arguments and set OPTIX_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OptiX DEFAULT_MSG - OPTIX_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OptiX + REQUIRED_VARS OPTIX_INCLUDE_DIR + VERSION_VAR OPTIX_VERSION) IF(OPTIX_FOUND) SET(OPTIX_INCLUDE_DIRS ${OPTIX_INCLUDE_DIR}) @@ -45,6 +57,7 @@ ENDIF() MARK_AS_ADVANCED( OPTIX_INCLUDE_DIR + OPTIX_VERSION ) UNSET(_optix_SEARCH_DIRS) diff --git a/build_files/config/pipeline_config.json b/build_files/config/pipeline_config.json index c9a5e25eaaf..a353d35bd6c 100644 --- a/build_files/config/pipeline_config.json +++ b/build_files/config/pipeline_config.json @@ -33,7 +33,7 @@ { "optix": { - "version": "7.1.0" + "version": "7.3.0" }, "cuda10": { diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index b01bf1bd1e2..736481a5be7 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -247,7 +247,7 @@ if(WITH_CYCLES_OSL) endif() if(WITH_CYCLES_DEVICE_OPTIX) - find_package(OptiX) + find_package(OptiX 7.3.0) if(OPTIX_FOUND) add_definitions(-DWITH_OPTIX) |