blender/build_files/build_environment/patches/embree.diff
Jonas Holzman d5d927b670 Deps: Library changes for Blender 5.2 LTS
### New libraries
- meshoptimizer v1.0
- tomli-w 1.2.0
- Tracy 0.13.1

### Updates of existing libraries
- OpenShadingLanguage 1.15.3.0
- OpenPGL 0.7.1
- ThorVG 1.0.3
- OpenUSD 26.03
- OpenImageIO 3.1.13.1
- libpng 1.6.58
- DPC++ 6.3.0
- Embree 4.4.1
- Intel Graphics Compiler v2.30.1
- Manifold 3.4.1
- x265 4.1
- ROCm / HIP 7.1.1 / 7.1.51803
- libexpat 2.7.5
- libtiff 4.7.1
- mesa 25.3.6
- OpenEXR 3.4.10
- OpenSSL 3.5.6
- Python 3.13.13
- sqlite 3.51.3
- libxml2 2.14.6
- ffmpeg 8.1
- Draco 1.5.7
- SDL 3.4.2

Library changes tracking issue ref: #153974

Co-authored-by: Sebastian Parborg <sebastian@blender.org>
Co-authored-by: Ray Molenkamp <github@lazydodo.com>
Co-authored-by: Sahar A. Kashi <salipour@noreply.localhost>
Co-authored-by: Nikita Sirgienko <nikita.sirgienko@intel.com>
Co-authored-by: Bart van der Braak <bart@blender.org>
Co-authored-by: Thomas Dinges <thomas@blender.org>
Co-authored-by: Alaska <Alaskayou01@gmail.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/157180
2026-05-11 19:04:45 +02:00

39 lines
No EOL
1.9 KiB
Diff

diff --git a/common/cmake/dpcpp.cmake b/common/cmake/dpcpp.cmake
index a15c179..4760e63 100644
--- a/common/cmake/dpcpp.cmake
+++ b/common/cmake/dpcpp.cmake
@@ -45,7 +45,7 @@ IF (EMBREE_SYCL_SUPPORT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-sycl") # makes dpcpp compiler compatible with clang++
- SET(CMAKE_CXX_FLAGS_SYCL "-fsycl -fsycl-unnamed-lambda -Xclang -fsycl-allow-func-ptr")
+ SET(CMAKE_CXX_FLAGS_SYCL "-fsycl -nolibsycl -fsycl-unnamed-lambda -Xclang -fsycl-allow-func-ptr")
SET(CMAKE_CXX_FLAGS_SYCL "${CMAKE_CXX_FLAGS_SYCL} -Wno-mismatched-tags -Wno-pessimizing-move -Wno-reorder -Wno-unneeded-internal-declaration -Wno-delete-non-abstract-non-virtual-dtor -Wno-dangling-field -Wno-unknown-pragmas -Wno-logical-op-parentheses")
IF (SYCL_ONEAPI_ICX AND WIN32)
diff --git a/kernels/CMakeLists.txt b/kernels/CMakeLists.txt
index b827807..648603a 100644
--- a/kernels/CMakeLists.txt
+++ b/kernels/CMakeLists.txt
@@ -216,6 +216,12 @@ embree_files(EMBREE_LIBRARY_FILES_AVX512 ${AVX512})
#message("AVX2: ${EMBREE_LIBRARY_FILES_AVX2}")
#message("AVX512: ${EMBREE_LIBRARY_FILES_AVX512}")
+# Bundle Neon2x into the main static library.
+IF(EMBREE_ISA_NEON2X AND EMBREE_STATIC_LIB)
+ LIST(APPEND EMBREE_LIBRARY_FILES ${EMBREE_LIBRARY_FILES_AVX2})
+ LIST(REMOVE_DUPLICATES EMBREE_LIBRARY_FILES)
+ENDIF()
+
# replaces all .cpp files with a dummy file that includes that .cpp file
# this is to work around an ICC name mangling issue related to lambda functions under windows
MACRO (CreateISADummyFiles list isa)
@@ -318,7 +324,7 @@ IF (EMBREE_ISA_AVX AND EMBREE_LIBRARY_FILES_AVX)
ENDIF()
ENDIF()
-IF (EMBREE_ISA_AVX2 AND EMBREE_LIBRARY_FILES_AVX2)
+IF (EMBREE_ISA_AVX2 AND EMBREE_LIBRARY_FILES_AVX2 AND NOT (EMBREE_ISA_NEON2X AND EMBREE_STATIC_LIB))
DISABLE_STACK_PROTECTOR_FOR_INTERSECTORS(${EMBREE_LIBRARY_FILES_AVX2})
ADD_LIBRARY(embree_avx2 STATIC ${EMBREE_LIBRARY_FILES_AVX2})
TARGET_LINK_LIBRARIES(embree_avx2 PRIVATE tasking)