Fix #118020: Cycles OptiX OSL crashes

Turns out we were not building OSL with OptiX enabled anymore.
Also check now if the OSL builds has OptiX support and if not
disable it in Cycles.

Building OSL with support for this (still) does not require
either the OptiX SDK or CUDA, it only needs LLVM.

Pull Request: https://projects.blender.org/blender/blender/pulls/118234
This commit is contained in:
Brecht Van Lommel
2024-02-14 03:40:01 +01:00
committed by Brecht Van Lommel
parent c6e229d3e4
commit dd382be067
2 changed files with 7 additions and 1 deletions

View File

@@ -43,6 +43,10 @@ set(OSL_EXTRA_ARGS
-DPython_EXECUTABLE=${PYTHON_BINARY}
)
if(NOT APPLE)
list(APPEND OSL_EXTRA_ARGS -DOSL_USE_OPTIX=ON)
endif()
ExternalProject_Add(external_osl
URL file://${PACKAGE_DIR}/${OSL_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}