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:
authorXavier Hallade <xavier.hallade@intel.com>2022-10-06 19:35:51 +0300
committerXavier Hallade <xavier.hallade@intel.com>2022-10-07 10:50:05 +0300
commit7eeeaec6da33971ab7805c9a4bfd5f4e186273d1 (patch)
treef3090686dab61d3a25d77fdbece49f1bc4c04ca4 /build_files/cmake/platform/platform_win32.cmake
parentfc0b1627ebb821b1897cbca7f6ba9be29e52359a (diff)
Cycles: use direct linking for oneAPI backend
This is a minimal set of changes, allowing a lot of cleanup that can happen afterward as it allows sycl method and objects to be used outside of kernel.cpp. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D15397
Diffstat (limited to 'build_files/cmake/platform/platform_win32.cmake')
-rw-r--r--build_files/cmake/platform/platform_win32.cmake16
1 files changed, 14 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 4778ddebea6..0f7f04203c6 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -952,5 +952,17 @@ endif()
set(ZSTD_INCLUDE_DIRS ${LIBDIR}/zstd/include)
set(ZSTD_LIBRARIES ${LIBDIR}/zstd/lib/zstd_static.lib)
-set(LEVEL_ZERO_ROOT_DIR ${LIBDIR}/level_zero)
-set(SYCL_ROOT_DIR ${LIBDIR}/dpcpp)
+if(WITH_CYCLES_DEVICE_ONEAPI)
+ set(LEVEL_ZERO_ROOT_DIR ${LIBDIR}/level_zero)
+ set(CYCLES_SYCL ${LIBDIR}/dpcpp CACHE PATH "Path to oneAPI DPC++ compiler")
+ if(EXISTS ${CYCLES_SYCL} AND NOT SYCL_ROOT_DIR)
+ set(SYCL_ROOT_DIR ${CYCLES_SYCL})
+ endif()
+ file(GLOB _sycl_runtime_libraries
+ ${SYCL_ROOT_DIR}/bin/sycl.dll
+ ${SYCL_ROOT_DIR}/bin/sycl[0-9].dll
+ ${SYCL_ROOT_DIR}/bin/pi_level_zero.dll
+ )
+ list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
+ unset(_sycl_runtime_libraries)
+endif()