mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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:
parent
c6e229d3e4
commit
dd382be067
2 changed files with 7 additions and 1 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "util/log.h"
|
||||
|
||||
#ifdef WITH_OSL
|
||||
# include <OSL/oslconfig.h>
|
||||
# include <OSL/oslversion.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -72,7 +73,8 @@ void device_optix_info(const vector<DeviceInfo> &cuda_devices, vector<DeviceInfo
|
|||
|
||||
info.type = DEVICE_OPTIX;
|
||||
info.id += "_OptiX";
|
||||
# if defined(WITH_OSL) && (OSL_VERSION_MINOR >= 13 || OSL_VERSION_MAJOR > 1)
|
||||
# if defined(WITH_OSL) && defined(OSL_USE_OPTIX) && \
|
||||
(OSL_VERSION_MINOR >= 13 || OSL_VERSION_MAJOR > 1)
|
||||
info.has_osl = true;
|
||||
# endif
|
||||
info.denoisers |= DENOISER_OPTIX;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue