For VFX platform 2025 and more.

Boost (removed!)
Cython 3.0.11
Expat 2.6.4
GMP 6.3.0
MaterialX 1.39.2
Nanobind 2.1.0 (new, for OpenVDB)
NumPy 1.26.4
OpenColorIO 2.4.1
OpenEXR 3.3.2
OpenImageIO 3.0.3.1
OpenVDB 12.0.0
OSL 1.14.3-beta
Python 3.11.11
Robinmap 1.3.0
TBB 2021.13.0
TIFF 4.7.0
USD 25.02
libxml2 2.13.5
zlib 1.3.1

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>

Ref #128577

Pull Request: https://projects.blender.org/blender/blender/pulls/134178
This commit is contained in:
Ray Molenkamp
2025-02-06 14:53:16 +01:00
committed by Brecht Van Lommel
parent d5823ad895
commit 1540817576
48 changed files with 1013 additions and 1598 deletions

View File

@@ -28,7 +28,6 @@ include(cmake/options.cmake)
# `versions.cmake` needs to be included after `options.cmake`
# due to the `BLENDER_PLATFORM_ARM` variable being needed.
include(cmake/versions.cmake)
include(cmake/boost_build_options.cmake)
include(cmake/download.cmake)
include(cmake/macros.cmake)
# `setup_msys2.cmake` to install `perl`,
@@ -85,8 +84,6 @@ include(cmake/materialx.cmake)
include(cmake/openvdb.cmake)
include(cmake/potrace.cmake)
include(cmake/haru.cmake)
# Boost needs to be included after `python.cmake` due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
include(cmake/pugixml.cmake)
include(cmake/fribidi.cmake)
include(cmake/harfbuzz.cmake)
@@ -187,5 +184,7 @@ include(cmake/shaderc_deps.cmake)
include(cmake/shaderc.cmake)
include(cmake/vulkan.cmake)
include(cmake/pybind11.cmake)
include(cmake/nanobind.cmake)
# Keep these last
include(cmake/deps_html.cmake)
include(cmake/cve_check.cmake)

View File

@@ -1,123 +0,0 @@
# SPDX-FileCopyrightText: 2017-2022 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(BOOST_CONFIGURE_COMMAND bootstrap.bat)
set(BOOST_BUILD_COMMAND b2)
set(BOOST_BUILD_OPTIONS runtime-link=shared)
if(BUILD_MODE STREQUAL Debug)
list(APPEND BOOST_BUILD_OPTIONS python-debugging=on variant=debug)
if(WITH_OPTIMIZED_DEBUG)
list(APPEND BOOST_BUILD_OPTIONS debug-symbols=off)
else()
list(APPEND BOOST_BUILD_OPTIONS debug-symbols=on)
endif()
else()
list(APPEND BOOST_BUILD_OPTIONS variant=release)
endif()
set(BOOST_HARVEST_CMD
${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/boost/lib/
${HARVEST_TARGET}/boost/lib/
)
if(BUILD_MODE STREQUAL Release)
set(BOOST_HARVEST_CMD
${BOOST_HARVEST_CMD} &&
${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/boost/include/boost-${BOOST_VERSION_NODOTS_SHORT}/
${HARVEST_TARGET}/boost/include/
)
endif()
elseif(APPLE)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS
toolset=clang-darwin
cxxflags=${PLATFORM_CXXFLAGS}
linkflags=${PLATFORM_LDFLAGS}
visibility=global
--disable-icu boost.locale.icu=off
)
set(BOOST_HARVEST_CMD echo .)
else()
set(BOOST_HARVEST_CMD echo .)
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
set(BOOST_BUILD_COMMAND ./b2)
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
endif()
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
configure_file(${PATCH_DIR}/boost.user.jam.in ${JAM_FILE})
set(BOOST_PYTHON_OPTIONS
--with-python
--user-config=${JAM_FILE}
)
if(WIN32 AND BUILD_MODE STREQUAL Debug)
set(BOOST_PYTHON_OPTIONS
${BOOST_PYTHON_OPTIONS}
define=BOOST_DEBUG_PYTHON
)
endif()
set(BOOST_OPTIONS
--with-filesystem
--with-locale
--with-thread
--with-regex
--with-system
--with-date_time
--with-wave
--with-atomic
--with-serialization
--with-program_options
--with-iostreams
-sNO_BZIP2=1
-sNO_LZMA=1
-sNO_ZSTD=1
${BOOST_TOOLSET}
${BOOST_PYTHON_OPTIONS}
)
string(TOLOWER ${BUILD_MODE} BOOST_BUILD_TYPE)
ExternalProject_Add(external_boost
URL file://${PACKAGE_DIR}/${BOOST_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
PREFIX ${BUILD_DIR}/boost
UPDATE_COMMAND ""
PATCH_COMMAND ${PATCH_CMD} -p 1 -d
${BUILD_DIR}/boost/src/external_boost <
${PATCH_DIR}/boost.diff
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
BUILD_COMMAND
${BOOST_BUILD_COMMAND}
${BOOST_BUILD_OPTIONS}
-j${MAKE_THREADS}
architecture=${BOOST_ARCHITECTURE}
address-model=${BOOST_ADDRESS_MODEL}
link=shared
threading=multi
${BOOST_OPTIONS}
--prefix=${LIBDIR}/boost
install
BUILD_IN_SOURCE 1
INSTALL_COMMAND "${BOOST_HARVEST_CMD}"
)
add_dependencies(
external_boost
external_python
external_numpy
external_zlib
)
if(NOT WIN32)
harvest(external_boost boost/include boost/include "*")
harvest_rpath_lib(external_boost boost/lib boost/lib "*${SHAREDLIBEXT}*")
endif()

View File

@@ -1,36 +0,0 @@
# SPDX-FileCopyrightText: 2022 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
set(BOOST_ADDRESS_MODEL 64)
if(BLENDER_PLATFORM_ARM)
set(BOOST_ARCHITECTURE arm)
else()
set(BOOST_ARCHITECTURE x86)
endif()
if(WIN32)
if(MSVC_TOOLSET_VERSION GREATER_EQUAL 143) # 2022
set(BOOST_TOOLSET toolset=msvc-14.3)
set(BOOST_COMPILER_STRING -vc143)
elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 142) # 2019
set(BOOST_TOOLSET toolset=msvc-14.2)
set(BOOST_COMPILER_STRING -vc142)
else() # 2017
set(BOOST_TOOLSET toolset=msvc-14.1)
set(BOOST_COMPILER_STRING -vc141)
endif()
endif()
set(DEFAULT_BOOST_FLAGS
-DBoost_COMPILER:STRING=${BOOST_COMPILER_STRING}
-DBoost_USE_MULTITHREADED=ON
-DBoost_USE_STATIC_LIBS=OFF
-DBoost_USE_STATIC_RUNTIME=OFF
-DBOOST_ROOT=${LIBDIR}/boost
-DBoost_NO_SYSTEM_PATHS=ON
-DBoost_NO_BOOST_CMAKE=ON
-DBoost_ADDITIONAL_VERSIONS=${BOOST_VERSION_SHORT}
-DBOOST_LIBRARYDIR=${LIBDIR}/boost/lib/
-DBoost_USE_DEBUG_PYTHON=On
)

View File

@@ -6,6 +6,8 @@ vendor,product,version,cve_number,remarks,comment
@PYTHON_ID@,CVE-2009-3720,NotAffected,already fixed in libexpat version used
@PYTHON_ID@,CVE-2023-36632,NotAffected,not used in blender and not considered a bug upstream
@PYTHON_ID@,CVE-2023-27043,NotAffected,not used in blender
@PYTHON_ID@,CVE-2024-6232,FalsePositive,fixed in 3.11.10 upstream fix gh-121285
@PYTHON_ID@,CVE-2024-7592,FalsePositive,fixed in 3.11.10 upstream fix gh-123067
@PYTHON_PIP_ID@,CVE-2018-20225,NotAffected,not a blender specific issue and pip is inherently affected by malicious packages
@SSL_ID@,CVE-2009-1390,NotAffected,issue in mutt not used by blender
@SSL_ID@,CVE-2009-3765,NotAffected,issue in mutt not used by blender
@@ -36,4 +38,6 @@ vendor,product,version,cve_number,remarks,comment
@SQLITE_ID@,CVE-2023-7104,NotAffected,does not affect blender use of sqlite
@SQLITE_ID@,CVE-2024-0232,NotAffected,does not affect blender use of sqlite
@ZLIB_ID@,CVE-2023-45853,NotAffected,only affects minizip not used by blender
@SNDFILE_ID@,CVE-2024-50612,Mitigated,patched using upstream PR 1045
@SNDFILE_ID@,CVE-2024-50613,NotAffected,all mp3 handling in blender goes through ffmpeg
@SBOMCONTENTS@

View File

@@ -78,7 +78,6 @@ download_source(ZLIB)
download_source(OPENAL)
download_source(PNG)
download_source(JPEG)
download_source(BOOST)
download_source(BLOSC)
download_source(PTHREADS)
download_source(OPENEXR)
@@ -181,3 +180,4 @@ download_source(VULKAN_LOADER)
download_source(PYBIND11)
download_source(DEFLATE)
download_source(HIPRT)
download_source(NANOBIND)

View File

@@ -141,6 +141,7 @@ add_dependencies(
external_spirvheaders
external_unifiedruntime
external_unifiedmemoryframework
external_zstd
)
if(WIN32)

View File

@@ -65,8 +65,8 @@ list(GET EMBREE_INSTALLED_VCTOOLS -1 EMBREE_VCTOOLS_VERSION)
# Configure our in file and temporarily store it in the build dir
# (with modified extension so nothing else picks it up)
# This feels icky, but boost does something similar, and we haven't called
# `ExternalProject_Add` yet, so the embree dir does not yet exist.
# This feels icky, but we haven't called `ExternalProject_Add` yet,
# so the embree dir does not yet exist.
configure_file(
${PATCH_DIR}/embree_Directory.Build.Props.in
${BUILD_DIR}/embree_Directory.Build.Props_temp

View File

@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2024 Blender Authors
#
# SPDX-License-Identifier: GPL-2.0-or-later
set(NANOBIND_EXTRA_ARGS
-DNB_TEST=OFF
-DPython_EXECUTABLE=${PYTHON_BINARY}
)
set(NANOBIND_PATCH
${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/robinmap/include/
${BUILD_DIR}/nanobind/src/external_nanobind/ext/robin_map/include/
)
ExternalProject_Add(external_nanobind
URL file://${PACKAGE_DIR}/${NANOBIND_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${NANOBIND_HASH_TYPE}=${NANOBIND_HASH}
PREFIX ${BUILD_DIR}/nanobind
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
PATCH_COMMAND ${NANOBIND_PATCH}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/nanobind
${DEFAULT_CMAKE_FLAGS}
${NANOBIND_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/nanobind
)
add_dependencies(
external_nanobind
external_robinmap
)

View File

@@ -25,6 +25,7 @@ ExternalProject_Add(external_numpy
PATCH_COMMAND ${NUMPY_PATCH}
CONFIGURE_COMMAND ""
LOG_BUILD 1
BUILD_IN_SOURCE 1
BUILD_COMMAND
${PYTHON_BINARY} ${BUILD_DIR}/numpy/src/external_numpy/setup.py

View File

@@ -96,8 +96,8 @@ if(WIN32)
${LIBDIR}/opencolorio/include
${HARVEST_TARGET}/opencolorio/include
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/opencolorio/bin/OpenColorIO_2_3.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_2_3.dll
${LIBDIR}/opencolorio/bin/OpenColorIO_2_4.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_2_4.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/opencolorio/lib
${HARVEST_TARGET}/opencolorio/lib
@@ -108,8 +108,8 @@ if(WIN32)
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_opencolorio after_install
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/opencolorio/bin/OpenColorIO_d_2_3.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_d_2_3.dll
${LIBDIR}/opencolorio/bin/OpenColorIO_d_2_4.dll
${HARVEST_TARGET}/opencolorio/bin/OpenColorIO_d_2_4.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/opencolorio/lib/Opencolorio_d.lib
${HARVEST_TARGET}/opencolorio/lib/OpenColorIO_d.lib

View File

@@ -50,17 +50,12 @@ endif()
set(OPENIMAGEIO_EXTRA_ARGS
-DBUILD_SHARED_LIBS=ON
${OPENIMAGEIO_LINKSTATIC}
${DEFAULT_BOOST_FLAGS}
-DREQUIRED_DEPS=WebP$<SEMICOLON>JPEGTurbo$<SEMICOLON>TIFF$<SEMICOLON>OpenEXR$<SEMICOLON>PNG$<SEMICOLON>OpenJPEG$<SEMICOLON>fmt$<SEMICOLON>Robinmap$<SEMICOLON>ZLIB$<SEMICOLON>pugixml$<SEMICOLON>Python
-DUSE_LIBSQUISH=OFF
-DUSE_QT5=OFF
-DOpenImageIO_REQUIRED_DEPS=WebP$<SEMICOLON>JPEGTurbo$<SEMICOLON>TIFF$<SEMICOLON>OpenEXR$<SEMICOLON>PNG$<SEMICOLON>OpenJPEG$<SEMICOLON>fmt$<SEMICOLON>Robinmap$<SEMICOLON>ZLIB$<SEMICOLON>pugixml$<SEMICOLON>Python
-DUSE_NUKE=OFF
-DUSE_OPENVDB=OFF
-DUSE_BZIP2=OFF
-DUSE_FREETYPE=OFF
-DUSE_DCMTK=OFF
-DUSE_LIBHEIF=OFF
-DUSE_OPENGL=OFF
-DUSE_TBB=ON
-DUSE_QT=OFF
-DUSE_PYTHON=ON
@@ -71,7 +66,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DUSE_PTEX=OFF
-DUSE_FREETYPE=OFF
-DUSE_LIBRAW=OFF
-DUSE_OPENCOLORIO=OFF
-DUSE_JXL=OFF
-DUSE_OPENCOLORIO=ON
-DUSE_WEBP=ON
-DOIIO_BUILD_TOOLS=${OIIO_TOOLS}
-DOIIO_BUILD_TESTS=OFF
@@ -93,8 +89,8 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
-Dpugixml_DIR=${LIBDIR}/pugixml/lib/cmake/pugixml
-DBUILD_MISSING_ROBINMAP=OFF
-DBUILD_MISSING_FMT=OFF
-DOpenColorIO_DIR=${LIBDIR}/opencolorio/lib/cmake/OpenColorIO
-DOpenImageIO_BUILD_MISSING_DEPS=""
-DFMT_INCLUDE_DIR=${LIBDIR}/fmt/include/
-DRobinmap_ROOT=${LIBDIR}/robinmap
-DWebP_ROOT=${LIBDIR}/webp
@@ -103,6 +99,7 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DImath_ROOT=${LIBDIR}/imath
-Dpybind11_ROOT=${LIBDIR}/pybind11
-DPython_EXECUTABLE=${PYTHON_BINARY}
-DPython3_EXECUTABLE=${PYTHON_BINARY}
-DTBB_ROOT=${LIBDIR}/tbb
-Dlibdeflate_ROOT=${LIBDIR}/deflate
-Dfmt_ROOT=${LIBDIR}/fmt
@@ -134,15 +131,6 @@ ExternalProject_Add(external_openimageio
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/openimageio.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_webp.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_4062.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_4302.diff &&
${PATCH_CMD} -p 1 -N -d
${BUILD_DIR}/openimageio/src/external_openimageio/ <
${PATCH_DIR}/oiio_windows_arm64.diff
@@ -156,12 +144,12 @@ ExternalProject_Add(external_openimageio
add_dependencies(
external_openimageio
external_opencolorio
external_png
external_zlib
external_openexr
external_imath
external_jpeg
external_boost
external_tiff
external_pugixml
external_fmt

View File

@@ -50,8 +50,8 @@ list(GET OPENPGL_INSTALLED_VCTOOLS -1 OPENPGL_VCTOOLS_VERSION)
# Configure our in file and temporarily store it in the build dir
# (with modified extension so nothing else picks it up)
# This feels icky, but boost does something similar, and we haven't called
# `ExternalProject_Add` yet, so the OpenPGL dir does not yet exist.
# This feels icky, but we haven't called `ExternalProject_Add` yet,
# so the OpenPGL dir does not yet exist.
configure_file(
${PATCH_DIR}/openpgl_Directory.Build.Props.in
${BUILD_DIR}/openpgl_Directory.Build.Props_temp

View File

@@ -7,13 +7,11 @@ if(BUILD_MODE STREQUAL Debug)
endif()
set(OPENVDB_EXTRA_ARGS
${DEFAULT_BOOST_FLAGS}
-DUSE_STATIC_DEPENDENCIES=OFF # This is the global toggle for static libs
# Once the above switch is off, you can set it
# for each individual library below.
-DBLOSC_USE_STATIC_LIBS=ON
-DTBB_USE_STATIC_LIBS=OFF
-DBoost_USE_STATIC_LIBS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-DZLIB_INCLUDE_DIR=${LIBDIR}/zlib/include/
-DBlosc_INCLUDE_DIR=${LIBDIR}/blosc/include/
@@ -25,8 +23,6 @@ set(OPENVDB_EXTRA_ARGS
-DNANOVDB_BUILD_TOOLS=OFF
-DBlosc_ROOT=${LIBDIR}/blosc/
-DTBB_ROOT=${LIBDIR}/tbb/
-DTbb_INCLUDE_DIR=${LIBDIR}/tbb/include
-DTbb_LEGACY_INCLUDE_DIR=${LIBDIR}/tbb/include
-DOPENVDB_CORE_SHARED=ON
-DOPENVDB_CORE_STATIC=OFF
-DOPENVDB_BUILD_BINARIES=OFF
@@ -37,7 +33,11 @@ set(OPENVDB_EXTRA_ARGS
-DOPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON
-DUSE_NUMPY=ON
-DPython_EXECUTABLE=${PYTHON_BINARY}
-Dpybind11_DIR=${LIBDIR}/pybind11/share/cmake/pybind11
-Dnanobind_DIR=${LIBDIR}/nanobind/nanobind/cmake/
# Needed to still build with VS2019
-DDISABLE_DEPENDENCY_VERSION_CHECKS=ON
# Not used by Blender (see e4f9c50), and removes the Boost dependency.
-DOPENVDB_USE_DELAYED_LOADING=OFF
# OPENVDB_AX Disabled for now as it adds ~25MB distribution wise
# with no blender code depending on it, seems wasteful.
@@ -53,10 +53,7 @@ set(OPENVDB_PATCH
${PATCH_DIR}/openvdb.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/openvdb/src/openvdb <
${PATCH_DIR}/openvdb_1706.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/openvdb/src/openvdb <
${PATCH_DIR}/openvdb_1733.diff
${PATCH_DIR}/openvdb_1977.diff
)
ExternalProject_Add(openvdb
@@ -78,12 +75,11 @@ ExternalProject_Add(openvdb
add_dependencies(
openvdb
external_tbb
external_boost
external_zlib
external_blosc
external_python
external_numpy
external_pybind11
external_nanobind
)
if(WIN32)
@@ -104,9 +100,8 @@ if(WIN32)
${LIBDIR}/openvdb/bin/openvdb.dll
${HARVEST_TARGET}/openvdb/bin/openvdb.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
${HARVEST_TARGET}openvdb/python/pyopenvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/openvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
${HARVEST_TARGET}openvdb/python/openvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
DEPENDEES install
)
endif()
@@ -119,8 +114,8 @@ if(WIN32)
${LIBDIR}/openvdb/bin/openvdb_d.dll
${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
${HARVEST_TARGET}openvdb/python/pyopenvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/openvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
${HARVEST_TARGET}openvdb/python/openvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
DEPENDEES install
)
@@ -128,11 +123,11 @@ if(WIN32)
else()
harvest(openvdb openvdb/include/openvdb openvdb/include/openvdb "*.h")
harvest(openvdb openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
harvest_rpath_lib(openvdb openvdb/lib openvdb/lib "*${SHAREDLIBEXT}*")
harvest_rpath_lib(openvdb openvdb/lib openvdb/lib "lib*${SHAREDLIBEXT}*")
harvest_rpath_python(
openvdb
openvdb/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*pyopenvdb*"
"openvdb*"
)
endif()

View File

@@ -74,9 +74,9 @@ if(WIN32)
set(BLENDER_CMAKE_C_FLAGS_RELWITHDEBINFO "/MD ${COMMON_MSVC_FLAGS} /Zi /O2 /Ob1 /D NDEBUG /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O2 /Ob2 /D_DEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS /DBOOST_DEBUG_PYTHON /DBOOST_ALL_NO_LIB")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/MDd ${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O2 /Ob2 /D_DEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS /DBOOST_DEBUG_PYTHON /DBOOST_ALL_NO_LIB")
set(BLENDER_CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /D PLATFORM_WINDOWS /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /MTd ${COMMON_MSVC_FLAGS} /Zi /Ob0 /Od /RTC1 /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CMAKE_CXX_FLAGS_MINSIZEREL "/MD /${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O1 /Ob1 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CMAKE_CXX_FLAGS_RELEASE "/MD ${COMMON_MSVC_FLAGS} /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS /O2 /Ob2 /D NDEBUG /D PLATFORM_WINDOWS /DPSAPI_VERSION=2 /DTINYFORMAT_ALLOW_WCHAR_STRINGS")
@@ -95,9 +95,9 @@ if(WIN32)
set(BLENDER_CLANG_CMAKE_C_FLAGS_RELWITHDEBINFO "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -g -O2 -DNDEBUG -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")
if(WITH_OPTIMIZED_DEBUG)
set(BLENDER_CLANG_CMAKE_CXX_FLAGS_DEBUG "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrtd -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -O2 -D_DEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS -DBOOST_DEBUG_PYTHON -DBOOST_ALL_NO_LIB")
set(BLENDER_CLANG_CMAKE_CXX_FLAGS_DEBUG "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrtd -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -O2 -D_DEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")
else()
set(BLENDER_CLANG_CMAKE_CXX_FLAGS_DEBUG "${COMMON_CLANG_FLAG} -Xclang --dependent-lib=msvcrtd -D_DEBUG -DPLATFORM_WINDOWS -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -g -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS -DBOOST_DEBUG_PYTHON -DBOOST_ALL_NO_LIB")
set(BLENDER_CLANG_CMAKE_CXX_FLAGS_DEBUG "${COMMON_CLANG_FLAG} -Xclang --dependent-lib=msvcrtd -D_DEBUG -DPLATFORM_WINDOWS -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -g -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")
endif()
set(BLENDER_CLANG_CMAKE_CXX_FLAGS_MINSIZEREL "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -O2 -DNDEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")
set(BLENDER_CLANG_CMAKE_CXX_FLAGS_RELEASE "${COMMON_CLANG_FLAGS} -Xclang --dependent-lib=msvcrt -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS -O2 -DNDEBUG -DPLATFORM_WINDOWS -DPSAPI_VERSION=2 -DTINYFORMAT_ALLOW_WCHAR_STRINGS")

View File

@@ -26,8 +26,6 @@ else()
endif()
set(OSL_EXTRA_ARGS
${DEFAULT_BOOST_FLAGS}
-DOpenEXR_ROOT=${LIBDIR}/openexr/
-DOpenImageIO_ROOT=${LIBDIR}/openimageio/
-DOSL_BUILD_TESTS=OFF
-DZLIB_LIBRARY=${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
@@ -47,11 +45,13 @@ set(OSL_EXTRA_ARGS
-DUSE_QT=OFF
-DINSTALL_DOCS=OFF
-Dpugixml_ROOT=${LIBDIR}/pugixml
-DUSE_PYTHON=OFF
-DUSE_PYTHON=ON
-DImath_ROOT=${LIBDIR}/imath
-DCMAKE_DEBUG_POSTFIX=_d
-Dpybind11_ROOT=${LIBDIR}/pybind11
-DPython_ROOT=${LIBDIR}/python
-DPython_EXECUTABLE=${PYTHON_BINARY}
-DPython3_EXECUTABLE=${PYTHON_BINARY}
-Dlibdeflate_DIR=${LIBDIR}/deflate/lib/cmake/libdeflate
)
@@ -82,12 +82,13 @@ ExternalProject_Add(external_osl
add_dependencies(
external_osl
external_boost
ll
external_openexr
external_zlib
external_openimageio
external_pugixml
external_python
external_pybind11
)
if(WIN32)
add_dependencies(
@@ -137,6 +138,9 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/osl/bin/oslnoise_d.dll
${HARVEST_TARGET}/osl/bin/oslnoise_d.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/osl/lib/python${PYTHON_SHORT_VERSION}/
${HARVEST_TARGET}/osl/lib/python${PYTHON_SHORT_VERSION}_debug/
DEPENDEES install
)
@@ -146,4 +150,9 @@ else()
harvest(external_osl osl/include osl/include "*.h")
harvest_rpath_lib(external_osl osl/lib osl/lib "*${SHAREDLIBEXT}*")
harvest(external_osl osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
harvest_rpath_python(external_osl
osl/lib/python${PYTHON_SHORT_VERSION}
python/lib/python${PYTHON_SHORT_VERSION}
"*"
)
endif()

View File

@@ -48,11 +48,11 @@ if(WIN32)
# the foldernames *HAVE* to match the ones inside pythons get_externals.cmd.
# regardless of the version actually in there.
PATCH_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.13 ${ZLIB_SOURCE_FOLDER_DOS} &&
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\openssl-3.0.11 ${SSL_SOURCE_FOLDER_DOS} &&
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.3.1 ${ZLIB_SOURCE_FOLDER_DOS} &&
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\openssl-3.0.15 ${SSL_SOURCE_FOLDER_DOS} &&
${CMAKE_COMMAND} -E copy
${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h
${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.13/zconf.h &&
${PYTHON_EXTERNALS_FOLDER}/zlib-1.3.1/zconf.h &&
${PATCH_CMD} --verbose -p1 -d
${BUILD_DIR}/python/src/external_python <
${PATCH_DIR}/${PYTHON_PATCH_FILE}

View File

@@ -41,6 +41,11 @@ ExternalProject_Add(external_sndfile
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${SNDFILE_HASH_TYPE}=${SNDFILE_HASH}
PREFIX ${BUILD_DIR}/sndfile
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
PATCH_COMMAND ${PATCH_CMD} -p 1 -d
${BUILD_DIR}/sndfile/src/external_sndfile <
${PATCH_DIR}/sndfile_1045.diff
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/sndfile

View File

@@ -3,12 +3,13 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(TBB_EXTRA_ARGS
-DTBB_BUILD_SHARED=On
-DTBB_BUILD_TBBMALLOC=On
-DTBB_BUILD_TBBMALLOC_PROXY=On
-DTBB_BUILD_STATIC=Off
-DTBB_BUILD_TESTS=Off
-DBUILD_SHARED_LIBS=On
-DTBBMALLOC_BUILD=On
-DTBBMALLOC_PROXY_BUILD=On
-DTBB_TEST=Off
-DCMAKE_DEBUG_POSTFIX=_debug
# Don't pick up hwloc shared library from system package manager.
-DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON
)
# TBB does not use soversion by default unlike other libs, but it's needed
# to avoid conflicts with incompatible TBB system libs in LD_LIBRARY_PATH
@@ -25,23 +26,11 @@ ExternalProject_Add(external_tbb
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TBB_HASH_TYPE}=${TBB_HASH}
PREFIX ${BUILD_DIR}/tbb
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy
${PATCH_DIR}/cmakelists_tbb.txt
${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt &&
${CMAKE_COMMAND} -E copy
${BUILD_DIR}/tbb/src/external_tbb/build/vs2013/version_string.ver
${BUILD_DIR}/tbb/src/external_tbb/build/version_string.ver.in &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/tbb/src/external_tbb <
${PATCH_DIR}/tbb.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/tbb/src/external_tbb <
${PATCH_DIR}/tbb_1478.diff
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
PATCH_COMMAND
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/tbb/src/external_tbb <
${PATCH_DIR}/tbb_1478.diff
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS}
INSTALL_DIR ${LIBDIR}/tbb
)
@@ -49,76 +38,26 @@ ExternalProject_Add(external_tbb
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_tbb after_install
# `findtbb.cmake` in some deps *NEEDS* to find `tbb_debug.lib` even if they are not going
# to use it to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbb.lib
${LIBDIR}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbbmalloc.lib
${LIBDIR}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbb.dll
${LIBDIR}/tbb/bin/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbbmalloc.dll
${LIBDIR}/tbb/bin/tbbmalloc_debug.dll
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbb.lib
${HARVEST_TARGET}/tbb/lib/tbb.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbb.dll
${HARVEST_TARGET}/tbb/bin/tbb.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbbmalloc.lib
${HARVEST_TARGET}/tbb/lib/tbbmalloc.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbbmalloc.dll
${HARVEST_TARGET}/tbb/bin/tbbmalloc.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbbmalloc_proxy.lib
${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbbmalloc_proxy.dll
${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/tbb/include/
${HARVEST_TARGET}/tbb/include/
${LIBDIR}/tbb/
${HARVEST_TARGET}/tbb/
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_tbb after_install
# `findtbb.cmake` in some deps *NEEDS* to find `tbb.lib` even if they are not going to use
# it to make that test pass, we place a copy with the right name in the lib folder.
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbb_debug.lib
${LIBDIR}/tbb/lib/tbb.lib
# Normal collection of build artifacts
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbb_debug.lib
${HARVEST_TARGET}/tbb/lib/tbb_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbb_debug.dll
${HARVEST_TARGET}/tbb/bin/tbb_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbbmalloc_debug.lib
${HARVEST_TARGET}/tbb/lib/tbbmalloc_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/lib/tbbmalloc_proxy_debug.lib
${HARVEST_TARGET}/tbb/lib/tbbmalloc_proxy_debug.lib
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbbmalloc_debug.dll
${HARVEST_TARGET}/tbb/bin/tbbmalloc_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy
${LIBDIR}/tbb/bin/tbbmalloc_proxy_debug.dll
${HARVEST_TARGET}/tbb/bin/tbbmalloc_proxy_debug.dll
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/tbb/lib/
${HARVEST_TARGET}/tbb/lib/
COMMAND ${CMAKE_COMMAND} -E copy_directory
${LIBDIR}/tbb/bin/
${HARVEST_TARGET}/tbb/bin/
DEPENDEES install
)
endif()
else()
harvest(external_tbb tbb/include tbb/include "*.h")
harvest_rpath_lib(external_tbb tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}*")
harvest_rpath_lib(external_tbb tbb/lib tbb/lib "*${SHAREDLIBEXT}*")
endif()

View File

@@ -23,7 +23,7 @@ ExternalProject_Add(external_tiff
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${TIFF_HASH_TYPE}=${TIFF_HASH}
PREFIX ${BUILD_DIR}/tiff
CMAKE_GENERATOR ${PLATFORM_ALT_GENERATOR}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/tiff
${DEFAULT_CMAKE_FLAGS}

View File

@@ -17,7 +17,6 @@ if(WIN32)
set(USD_PLATFORM_FLAGS
${USD_OIIO_CMAKE_DEFINES}
-DCMAKE_CXX_FLAGS=${USD_CXX_FLAGS}
-D_PXR_CXX_DEFINITIONS=/DBOOST_ALL_NO_LIB
-DCMAKE_SHARED_LINKER_FLAGS_INIT=/LIBPATH:${LIBDIR}/tbb/lib
-DPython_FIND_REGISTRY=NEVER
-DPython3_EXECUTABLE=${PYTHON_BINARY}
@@ -46,6 +45,11 @@ elseif(UNIX)
list(APPEND USD_PLATFORM_FLAGS
-DCMAKE_SHARED_LINKER_FLAGS=${USD_SHARED_LINKER_FLAGS}
)
# Metal only patch for MaterialX 1.39 issues.
set(USD_EXTRA_PATCHES
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/usd/src/external_usd <
${PATCH_DIR}/usd_3519.diff &&)
endif()
endif()
@@ -54,14 +58,14 @@ endif()
string(REPLACE "." "_" USD_NAMESPACE "pxrBlender_v${USD_VERSION}")
set(USD_EXTRA_ARGS
${DEFAULT_BOOST_FLAGS}
${USD_PLATFORM_FLAGS}
-DOPENSUBDIV_ROOT_DIR=${LIBDIR}/opensubdiv
-DOpenImageIO_ROOT=${LIBDIR}/openimageio
-DVulkan_ROOT=${LIBDIR}/vulkan_loader
-DMaterialX_ROOT=${LIBDIR}/materialx
-DOPENEXR_LIBRARIES=${LIBDIR}/imath/lib/${LIBPREFIX}Imath${OPENEXR_VERSION_POSTFIX}${SHAREDLIBEXT}
-DOPENEXR_INCLUDE_DIR=${LIBDIR}/imath/include
-DImath_DIR=${LIBDIR}/imath
-DImath_DIR=${LIBDIR}/imath/lib/cmake/Imath
-DOPENVDB_LOCATION=${LIBDIR}/openvdb
-DPXR_SET_INTERNAL_NAMESPACE=${USD_NAMESPACE}
-DPXR_ENABLE_PYTHON_SUPPORT=ON
@@ -92,14 +96,17 @@ set(USD_EXTRA_ARGS
# USD 22.03 does not support OCIO 2.x
# Tracking ticket https://github.com/PixarAnimationStudios/USD/issues/1386
-DPXR_BUILD_OPENCOLORIO_PLUGIN=OFF
# We'd like Vulkan support on, but it has trouble not finding the SDK since we have
# the invididual components in the deps builder.
-DPXR_ENABLE_VULKAN_SUPPORT=OFF
-DPXR_ENABLE_PTEX_SUPPORT=OFF
-DPXR_BUILD_USD_TOOLS=OFF
-DCMAKE_DEBUG_POSTFIX=_d
-DBUILD_SHARED_LIBS=ON
-DTBB_INCLUDE_DIRS=${LIBDIR}/tbb/include
-DTBB_LIBRARIES=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
-DTbb_TBB_LIBRARY=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
-DTBB_tbb_LIBRARY_RELEASE=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
-DTBB_LIBRARIES_DEBUG=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
-DTBB_LIBRARIES_RELEASE=${LIBDIR}/tbb/lib/${LIBPREFIX}${TBB_LIBRARY}${SHAREDLIBEXT}
)
# Ray: I'm not sure if the other platforms relied on this or not but this is no longer
@@ -121,6 +128,7 @@ ExternalProject_Add(external_usd
LIST_SEPARATOR ^^
PATCH_COMMAND
${USD_EXTRA_PATCHES}
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/usd/src/external_usd <
${PATCH_DIR}/usd.diff &&
@@ -129,11 +137,16 @@ ExternalProject_Add(external_usd
${PATCH_DIR}/usd_core_profile.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/usd/src/external_usd <
${PATCH_DIR}/usd_metal_edf.diff &&
${PATCH_DIR}/usd_ctor.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/usd/src/external_usd <
${PATCH_DIR}/usd_ctor.diff
${PATCH_DIR}/usd_3243.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/usd/src/external_usd <
${PATCH_DIR}/usd_forward_compat.diff &&
${PATCH_CMD} -p 1 -d
${BUILD_DIR}/usd/src/external_usd <
${PATCH_DIR}/usd_noboost.diff
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${LIBDIR}/usd
-Wno-dev
@@ -146,7 +159,6 @@ ExternalProject_Add(external_usd
add_dependencies(
external_usd
external_tbb
external_boost
external_opensubdiv
external_python
external_openimageio

View File

@@ -38,15 +38,15 @@ set(RELEASE_HIP_VERSION 5.7.*)
# Note that multi-line strings *must* use [=[...]=] bounds.
set(ZLIB_VERSION 1.2.13)
set(ZLIB_VERSION 1.3.1)
set(ZLIB_URI https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_HASH 9b8aa094c4e5765dabf4da391f00d15c)
set(ZLIB_HASH 9855b6d802d7fe5b7bd5b196a2271655)
set(ZLIB_HASH_TYPE MD5)
set(ZLIB_FILE zlib-${ZLIB_VERSION}.tar.gz)
set(ZLIB_CPE "cpe:2.3:a:zlib:zlib:${ZLIB_VERSION}:*:*:*:*:*:*:*")
set(ZLIB_HOMEPAGE https://zlib.net)
set(ZLIB_LICENSE SPDX:Zlib)
set(ZLIB_COPYRIGHT "Copyright (C) 1995-2017 Jean-loup Gailly")
set(ZLIB_COPYRIGHT "Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler")
set(OPENAL_VERSION 1.23.1)
set(OPENAL_URI https://github.com/kcat/openal-soft/releases/download/${OPENAL_VERSION}/openal-soft-${OPENAL_VERSION}.tar.bz2)
@@ -92,20 +92,6 @@ Copyright (C)2009-2020 D. R. Commander. All Rights Reserved.
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
]=])
set(BOOST_VERSION 1.82.0)
set(BOOST_VERSION_SHORT 1.82)
set(BOOST_VERSION_NODOTS 1_82_0)
set(BOOST_VERSION_NODOTS_SHORT 1_82)
set(BOOST_URI https://archives.boost.io/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_HASH f7050f554a65f6a42ece221eaeec1660)
set(BOOST_HASH_TYPE MD5)
set(BOOST_FILE boost_${BOOST_VERSION_NODOTS}.tar.gz)
set(BOOST_CPE "cpe:2.3:a:boost:boost:${BOOST_VERSION}:*:*:*:*:*:*:*")
set(BOOST_HOMEPAGE https://www.boost.org/)
set(BOOST_NAME Boost)
set(BOOST_LICENSE SPDX:BSL-1.0)
set(BOOST_COPYRIGHT "The Boost license encourages both commercial and non-commercial use and does not require attribution for binary use.")
set(BLOSC_VERSION 1.21.1)
set(BLOSC_URI https://github.com/Blosc/c-blosc/archive/v${BLOSC_VERSION}.tar.gz)
set(BLOSC_HASH 134b55813b1dca57019d2a2dc1f7a923)
@@ -141,9 +127,9 @@ set(DEFLATE_HOMEPAGE https://github.com/ebiggers/libdeflate)
set(DEFLATE_LICENSE SPDX:MIT)
set(DEFLATE_COPYRIGHT "Copyright 2016 Eric Biggers")
set(OPENEXR_VERSION 3.2.4)
set(OPENEXR_VERSION 3.3.2)
set(OPENEXR_URI https://github.com/AcademySoftwareFoundation/openexr/archive/v${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_HASH 83b23b937b3a76fd37680422f41b81b7)
set(OPENEXR_HASH 0ca7b46575537ff495d9914166aafa65)
set(OPENEXR_HASH_TYPE MD5)
set(OPENEXR_FILE openexr-${OPENEXR_VERSION}.tar.gz)
set(OPENEXR_CPE "cpe:2.3:a:openexr:openexr:${OPENEXR_VERSION}:*:*:*:*:*:*:*")
@@ -254,9 +240,9 @@ set(OPENCOLLADA_FILE opencollada-${OPENCOLLADA_VERSION}.tar.gz)
set(OPENCOLLADA_LICENSE SPDX:MIT)
set(OPENCOLLADA_COPYRIGHT "Copyright (c) 2008-2009 NetAllied Systems GmbH")
set(OPENCOLORIO_VERSION 2.3.2)
set(OPENCOLORIO_VERSION 2.4.1)
set(OPENCOLORIO_URI https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/v${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_HASH 8af74fcb8c4820ab21204463a06ba490)
set(OPENCOLORIO_HASH a11368ef8f001837f29b7dd18dbd2290)
set(OPENCOLORIO_HASH_TYPE MD5)
set(OPENCOLORIO_FILE OpenColorIO-${OPENCOLORIO_VERSION}.tar.gz)
set(OPENCOLORIO_NAME OpenColorIO)
@@ -301,10 +287,10 @@ set(OPENMP_URI https://github.com/llvm/llvm-project/releases/download/llvmorg-${
set(OPENMP_HASH_TYPE MD5)
set(OPENMP_FILE openmp-${OPENMP_VERSION}.src.tar.xz)
set(OPENIMAGEIO_VERSION v2.5.11.0)
set(OPENIMAGEIO_VERSION v3.0.3.1)
set(OPENIMAGEIO_NAME OpenImageIO)
set(OPENIMAGEIO_URI https://github.com/AcademySoftwareFoundation/OpenImageIO/archive/refs/tags/${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HASH 691e9364d25e2878e042d48980fad593)
set(OPENIMAGEIO_HASH d2d50bfe58e302c26dc7e24b86cb75fd)
set(OPENIMAGEIO_HASH_TYPE MD5)
set(OPENIMAGEIO_FILE OpenImageIO-${OPENIMAGEIO_VERSION}.tar.gz)
set(OPENIMAGEIO_HOMEPAGE https://github.com/AcademySoftwareFoundation/OpenImageIO)
@@ -325,18 +311,18 @@ set(FMT_COPYRIGHT "Copyright (c) 2012 - present, Victor Zverovich and {fmt} cont
# 0.6.2 is currently oiio's preferred version although never versions may be available.
# the preferred version can be found in oiio's externalpackages.cmake
set(ROBINMAP_VERSION v0.6.2)
set(ROBINMAP_VERSION v1.3.0)
set(ROBINMAP_URI https://github.com/Tessil/robin-map/archive/refs/tags/${ROBINMAP_VERSION}.tar.gz)
set(ROBINMAP_HASH c08ec4b1bf1c85eb0d6432244a6a89862229da1cb834f3f90fba8dc35d8c8ef1)
set(ROBINMAP_HASH a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236)
set(ROBINMAP_HASH_TYPE SHA256)
set(ROBINMAP_FILE robinmap-${ROBINMAP_VERSION}.tar.gz)
set(ROBINMAP_HOMEPAGE https://github.com/Tessil/robin-map)
set(ROBINMAP_LICENSE SPDX:MIT)
set(ROBINMAP_COPYRIGHT "Copyright (c) 2017 Thibaut Goetghebuer-Planchon <tessil@gmx.com>")
set(TIFF_VERSION 4.6.0)
set(TIFF_VERSION 4.7.0)
set(TIFF_URI http://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_HASH fc7d49a9348b890b29f91a4ecadd5b49)
set(TIFF_HASH 3a0fa4a270a4a192b08913f88d0cfbdd)
set(TIFF_HASH_TYPE MD5)
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
@@ -348,13 +334,12 @@ Copyright © 1988-1997 Sam Leffler.
Copyright © 1991-1997 Silicon Graphics, Inc.
]=])
# Recent commit from 1.13.5.0 under development, which includes string table
# changes that make the Cycles OptiX implementation work. Official 1.12 OSL
# releases should also build but without OptiX support.
set(OSL_VERSION 1.13.7.0)
# Latest 1.14 (beta) main, that is compatible with OIIO 3.0
set(OSL_VERSION 1.14.3.0-beta)
set(OSL_COMMIT "b795e3e92ae1f2c5da5024b61295b0eb41486a65")
set(OSL_NAME "Open Shading Language")
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/refs/tags/v${OSL_VERSION}.tar.gz)
set(OSL_HASH 769ae444a7df0e6561b3e745fd2eb50d)
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/${OSL_COMMIT}.tar.gz)
set(OSL_HASH dbfe1a34249959f2d66296bf04317c1c)
set(OSL_HASH_TYPE MD5)
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
set(OSL_HOMEPAGE https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/)
@@ -368,18 +353,18 @@ set(OSL_COPYRIGHT "Copyright Contributors to the Open Shading Language project."
# Additionally, keep the PYTHON_PIP_VERSION in sync with the pip version bundled
# into Python.
set(PYTHON_VERSION 3.11.9)
set(PYTHON_VERSION 3.11.11)
set(PYTHON_SHORT_VERSION 3.11)
set(PYTHON_SHORT_VERSION_NO_DOTS 311)
set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_HASH 22ea467e7d915477152e99d5da856ddc)
set(PYTHON_HASH 3e497037b170fe4be5f462c4964596f2)
set(PYTHON_HASH_TYPE MD5)
set(PYTHON_FILE Python-${PYTHON_VERSION}.tar.xz)
set(PYTHON_CPE "cpe:2.3:a:python:python:${PYTHON_VERSION}:-:*:*:*:*:*:*")
set(PYTHON_HOMEPAGE https://www.python.org/)
set(PYTHON_NAME Python)
set(PYTHON_LICENSE SPDX:Python-2.0)
set(PYTHON_COPYRIGHT "Copyright (c) 2001-2021 Python Software Foundation. All rights reserved.")
set(PYTHON_COPYRIGHT "Copyright (c) 2001-2023 Python Software Foundation. All rights reserved.")
# Python bundles pip wheel, and does not track CVEs from it. Add an explicit CPE
# identifier for pip, so that cve_check can detect vulnerabilities in it.
@@ -390,11 +375,11 @@ set(PYTHON_COPYRIGHT "Copyright (c) 2001-2021 Python Software Foundation. All ri
set(PYTHON_PIP_VERSION 24.0)
set(PYTHON_PIP_CPE "cpe:2.3:a:pypa:pip:${PYTHON_PIP_VERSION}:*:*:*:*:*:*:*")
set(TBB_YEAR 2020)
set(TBB_YEAR 2021)
set(TBB_NAME oneTBB)
set(TBB_VERSION ${TBB_YEAR}_U3)
set(TBB_URI https://github.com/oneapi-src/oneTBB/archive/${TBB_VERSION}.tar.gz)
set(TBB_HASH 55ec8df6eae5ed6364a47f0e671e460c)
set(TBB_VERSION v2021.13.0)
set(TBB_URI https://github.com/uxlfoundation/oneTBB/archive/refs/tags/${TBB_VERSION}.tar.gz)
set(TBB_HASH f287cd007240a838286ff13e7deaee12)
set(TBB_HASH_TYPE MD5)
set(TBB_FILE oneTBB-${TBB_VERSION}.tar.gz)
set(TBB_CPE "cpe:2.3:a:intel:threading_building_blocks:${TBB_YEAR}:*:*:*:*:*:*:*")
@@ -402,10 +387,20 @@ set(TBB_HOMEPAGE https://software.intel.com/en-us/oneapi/onetbb)
set(TBB_LICENSE SPDX:Apache-2.0)
set(TBB_COPYRIGHT "Copyright (c) 2005-2020 Intel Corporation")
set(OPENVDB_VERSION 11.0.0)
set(NANOBIND_VERSION v2.1.0)
set(NANOBIND_NAME NanoBind)
set(NANOBIND_URI https://github.com/wjakob/nanobind/archive/refs/tags/${NANOBIND_VERSION}.tar.gz)
set(NANOBIND_HASH 363e96957741869bb16ff983c042e72f)
set(NANOBIND_HASH_TYPE MD5)
set(NANOBIND_FILE nanobind-${NANOBIND_VERSION}.tar.gz)
set(NANOBIND_HOMEPAGE https://github.com/wjakob/nanobind)
set(NANOBIND_LICENSE SPDX:BSD-3-Clause)
set(NANOBIND_COPYRIGHT "2023, Wenzel Jakob")
set(OPENVDB_VERSION 12.0.0)
set(OPENVDB_NAME OpenVDB)
set(OPENVDB_URI https://github.com/AcademySoftwareFoundation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HASH 025f4fc4db58419341a4991f1a16174a)
set(OPENVDB_HASH c5cd16784b6b42aaa956b574042f374d)
set(OPENVDB_HASH_TYPE MD5)
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
set(OPENVDB_HOMEPAGE http://www.openvdb.org/)
@@ -427,7 +422,7 @@ set(CERTIFI_VERSION 2021.10.8)
# Needed by: Some of Blender's add-ons (to support convenient interaction with online services).
set(REQUESTS_VERSION 2.27.1)
# Needed by: Python's `numpy` module (used by some add-ons).
set(CYTHON_VERSION 0.29.30)
set(CYTHON_VERSION 3.0.11)
# Needed by: Python scripts that read `.blend` files, as files may use Z-standard compression.
# The version of the ZSTD library used to build the Python package should match ZSTD_VERSION
# defined below. At this time of writing, 0.17.0 was already released,
@@ -440,10 +435,10 @@ set(PYCODESTYLE_VERSION 2.12.1)
# Build system for other packages (not used by Blender at run-time).
set(MESON_VERSION 0.63.0)
set(NUMPY_VERSION 1.24.3)
set(NUMPY_SHORT_VERSION 1.24)
set(NUMPY_VERSION 1.26.4)
set(NUMPY_SHORT_VERSION 1.26)
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz)
set(NUMPY_HASH 89e5e2e78407032290ae6acf6dcaea46)
set(NUMPY_HASH 19550cbe7bedd96a928da9d4ad69509d)
set(NUMPY_HASH_TYPE MD5)
set(NUMPY_FILE numpy-${NUMPY_VERSION}.tar.gz)
set(NUMPY_CPE "cpe:2.3:a:numpy:numpy:${NUMPY_VERSION}:*:*:*:*:*:*:*")
@@ -652,9 +647,9 @@ Copyright (C) 2009-2013 Facebook, Inc. All rights reserved.
Copyright (C) 2013 Jason Evans <jasone@canonware.com>.
]=])
set(XML2_VERSION 2.12.3)
set(XML2_URI https://download.gnome.org/sources/libxml2/2.12/libxml2-${XML2_VERSION}.tar.xz)
set(XML2_HASH 13871e7cf2137b4b9b9da753ffef538c)
set(XML2_VERSION 2.13.5)
set(XML2_URI https://download.gnome.org/sources/libxml2/2.13/libxml2-${XML2_VERSION}.tar.xz)
set(XML2_HASH 0b919be8edff97ade9c946e1a83bdecd)
set(XML2_HASH_TYPE MD5)
set(XML2_FILE libxml2-${XML2_VERSION}.tar.xz)
set(XML2_CPE "cpe:2.3:a:xmlsoft:libxml2:${XML2_VERSION}:*:*:*:*:*:*:*")
@@ -681,10 +676,10 @@ set(PYSTRING_HOMEPAGE https://github.com/imageworks/pystring)
set(PYSTRING_LICENSE SPDX:BSD-3-Clause)
set(PYSTRING_COPYRIGHT "Copyright (c) 2008-2010, Sony Pictures Imageworks Inc; All rights reserved.")
set(EXPAT_VERSION 2_5_0)
set(EXPAT_VERSION_DOTS 2.5.0)
set(EXPAT_VERSION 2_6_4)
set(EXPAT_VERSION_DOTS 2.6.4)
set(EXPAT_URI https://github.com/libexpat/libexpat/archive/R_${EXPAT_VERSION}.tar.gz)
set(EXPAT_HASH d375fa3571c0abb945873f5061a8f2e2)
set(EXPAT_HASH f2f8d61e2bd71d1118e1258ed9f4c0b7)
set(EXPAT_HASH_TYPE MD5)
set(EXPAT_FILE libexpat-${EXPAT_VERSION}.tar.gz)
set(EXPAT_HOMEPAGE https://github.com/libexpat/libexpat/)
@@ -799,10 +794,10 @@ set(EMBREE_HOMEPAGE https://github.com/embree/embree)
set(EMBREE_LICENSE SPDX:Apache-2.0)
set(EMBREE_COPYRIGHT "Copyright 2009-2020 Intel Corporation")
set(USD_VERSION 24.05)
set(USD_VERSION 25.02)
set(USD_NAME USD)
set(USD_URI https://github.com/PixarAnimationStudios/OpenUSD/archive/v${USD_VERSION}.tar.gz)
set(USD_HASH 44a5b976a76588b485a652f08a55e91f)
set(USD_HASH 76ee61270e67002ddb2fc76dda6a498d)
set(USD_HASH_TYPE MD5)
set(USD_FILE usd-v${USD_VERSION}.tar.gz)
set(USD_HOMEPAGE https://openusd.org/)
@@ -815,10 +810,10 @@ This product includes software developed at:
Pixar (http://www.pixar.com/).
]=])
set(MATERIALX_VERSION 1.38.8)
set(MATERIALX_VERSION 1.39.2)
set(MATERIALX_NAME MaterialX)
set(MATERIALX_URI https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v${MATERIALX_VERSION}.tar.gz)
set(MATERIALX_HASH fad8f4e19305fb2ee920cbff638f3560)
set(MATERIALX_HASH e3e413755f525aec96c60af631753044)
set(MATERIALX_HASH_TYPE MD5)
set(MATERIALX_FILE materialx-v${MATERIALX_VERSION}.tar.gz)
set(MATERIALX_HOMEPAGE https://github.com/AcademySoftwareFoundation/MaterialX)
@@ -964,9 +959,9 @@ set(ISPC_HASH_TYPE MD5)
set(ISPC_FILE ispc-${ISPC_VERSION}.tar.gz)
set(ISPC_DEPSBUILDTIMEONLY "Blender ships the produced artifact, but doesn't ship/link with any binary")
set(GMP_VERSION 6.2.1)
set(GMP_VERSION 6.3.0)
set(GMP_URI https://gmplib.org/download/gmp/gmp-${GMP_VERSION}.tar.xz)
set(GMP_HASH 0b82665c4a92fd2ade7440c13fcaa42b)
set(GMP_HASH 956dc04e864001a9c22429f761f2c283)
set(GMP_HASH_TYPE MD5)
set(GMP_FILE gmp-${GMP_VERSION}.tar.xz)
set(GMP_CPE "cpe:2.3:a:gmplib:gmp:${GMP_VERSION}:*:*:*:*:*:*:*")
@@ -1100,8 +1095,7 @@ set(ICDLOADER_LICENSE SPDX:Apache-2.0)
set(ICDLOADER_COPYRIGHT " Copyright (c) 2020 The Khronos Group Inc.")
# Source sycl/cmake/modules/AddBoostMp11Headers.cmake
# Using external MP11 here, getting AddBoostMp11Headers.cmake to recognize
# our copy in boost directly was more trouble than it was worth.
# Using external MP11 here so we don't have to pull in all of Boost.
set(MP11_VERSION 863d8b8d2b20f2acd0b5870f23e553df9ce90e6c)
set(MP11_URI https://github.com/boostorg/mp11/archive/${MP11_VERSION}.tar.gz)
set(MP11_HASH 525692267abb8086bb9cc2fe81fb96d73ac645dfa6825cb5114686aafe244e9f)

View File

@@ -4,8 +4,6 @@ graph[autosize = false, size = "25.7,8.3!", resolution = 300];
external_alembic -- external_imath;
external_blosc -- external_zlib;
external_blosc -- external_pthreads;
external_boost -- external_python;
external_boost -- external_numpy;
external_dpcpp -- external_python;
external_dpcpp -- external_python_site_packages;
external_dpcpp -- external_vcintrinsics;
@@ -66,7 +64,6 @@ graph[autosize = false, size = "25.7,8.3!", resolution = 300];
external_openimageio -- external_openexr;
external_openimageio -- external_imath;
external_openimageio -- external_jpeg;
external_openimageio -- external_boost;
external_openimageio -- external_tiff;
external_openimageio -- external_pugixml;
external_openimageio -- external_fmt;
@@ -77,10 +74,8 @@ graph[autosize = false, size = "25.7,8.3!", resolution = 300];
external_openpgl -- external_tbb;
external_opensubdiv -- external_tbb;
openvdb -- external_tbb;
openvdb -- external_boost;
openvdb -- external_zlib;
openvdb -- external_blosc;
external_osl -- external_boost;
external_osl -- ll;
external_osl -- external_openexr;
external_osl -- external_zlib;
@@ -103,7 +98,6 @@ graph[autosize = false, size = "25.7,8.3!", resolution = 300];
external_theora -- external_ogg;
external_tiff -- external_zlib;
external_usd -- external_tbb;
external_usd -- external_boost;
external_usd -- external_opensubdiv;
external_vorbis -- external_ogg;
external_wayland -- external_expat;

View File

@@ -1,28 +0,0 @@
--- a/boost/python//detail/wrap_python.hpp 2022-12-09 19:16:17
+++ b/boost/python//detail/wrap_python.hpp 2022-12-09 19:18:08
@@ -206,7 +206,8 @@
#ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
# undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
-# define _DEBUG
+// BLENDER: TBB expects this to have a value.
+# define _DEBUG 1
# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
# undef _CRT_NOFORCE_MANIFEST
--- a/boost/config/stdlib/libcpp.hpp 2022-08-03 22:47:07.000000000 -0400
+++ b/boost/config/stdlib/libcpp.hpp 2022-09-16 22:16:17.044119011 -0400
@@ -168,4 +168,13 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
+#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 15000
+//
+// Unary function is now deprecated in C++11 and later:
+//
+#if __cplusplus >= 201103L
+#define BOOST_NO_CXX98_FUNCTION_BASE
+#endif
+#endif
+
// --- end ---

View File

@@ -14,9 +14,9 @@ diff -Naur gmp-6.2.1-clean/Makefile.in gmp-6.2.1-dirty/Makefile.in
--- gmp-6.2.1-clean/Makefile.in 2020-11-14 18:45:16.000000000 +0000
+++ gmp-6.2.1-dirty/Makefile.in 2023-01-24 13:06:47.691201700 +0000
@@ -572,7 +572,7 @@
LIBGMPXX_LT_CURRENT = 10
LIBGMPXX_LT_REVISION = 1
LIBGMPXX_LT_AGE = 6
LIBGMPXX_LT_CURRENT = 11
LIBGMPXX_LT_REVISION = 0
LIBGMPXX_LT_AGE = 7
-SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune
@@ -48,19 +48,3 @@ diff -Naur gmp-6.2.1-clean/gmp-h.in gmp-6.2.1-dirty/gmp-h.in
#endif
/* Recent enough Sun C compilers want "inline" */
diff -Naur gmp-6.2.1-clean/mpz/inp_raw.c gmp-6.2.1-dirty/mpz/inp_raw.c
--- gmp-6.2.1-clean/mpz/inp_raw.c 2020-11-14 18:45:09.000000000 +0000
+++ gmp-6.2.1-dirty/mpz/inp_raw.c 2023-01-24 10:24:26.379294800 +0000
@@ -88,8 +88,11 @@
abs_csize = ABS (csize);
+ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
+ return 0; /* Bit size overflows */
+
/* round up to a multiple of limbs */
- abs_xsize = BITS_TO_LIMBS (abs_csize*8);
+ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
if (abs_xsize != 0)
{

View File

@@ -1,28 +0,0 @@
diff --git a/src/include/OpenImageIO/simd.h b/src/include/OpenImageIO/simd.h
index f888b29fe..e0cdebdc1 100644
--- a/src/include/OpenImageIO/simd.h
+++ b/src/include/OpenImageIO/simd.h
@@ -46,10 +46,6 @@
#include <OpenImageIO/detail/fmt.h>
-// Without SSE, we need to fall back on Imath for matrix44 invert
-#if !OIIO_SIMD_SSE
-# include <OpenImageIO/Imath.h>
-#endif
//////////////////////////////////////////////////////////////////////////
@@ -279,6 +275,12 @@
#endif
+// Without SSE, we need to fall back on Imath for matrix44 invert
+#if !OIIO_SIMD_SSE
+# include <OpenImageIO/Imath.h>
+#endif
+
+
OIIO_NAMESPACE_BEGIN
namespace simd {

View File

@@ -1,174 +0,0 @@
diff --git a/src/doc/builtinplugins.rst b/src/doc/builtinplugins.rst
index 1654105918..9ad185ce21 100644
--- a/src/doc/builtinplugins.rst
+++ b/src/doc/builtinplugins.rst
@@ -1964,7 +1964,7 @@ Lab or duotone modes.
**Custom I/O Overrides**
-PSD output supports the "custom I/O" feature via the special ``"oiio:ioproxy"``
+PSD input supports the "custom I/O" feature via the special ``"oiio:ioproxy"``
attributes (see Sections :ref:`sec-imageoutput-ioproxy` and
:ref:`sec-imageinput-ioproxy`) as well as the `set_ioproxy()` methods.
diff --git a/src/psd.imageio/psdinput.cpp b/src/psd.imageio/psdinput.cpp
index e3972d087f..fd472385bb 100644
--- a/src/psd.imageio/psdinput.cpp
+++ b/src/psd.imageio/psdinput.cpp
@@ -1890,6 +1890,8 @@ PSDInput::load_image_data()
// setup some generic properties and read any RLE lengths
// Image Data Section has RLE lengths for all channels stored first
for (ChannelInfo& channel_info : m_image_data.channel_info) {
+ channel_info.width = m_header.width;
+ channel_info.height = m_header.height;
channel_info.compression = compression;
channel_info.channel_id = id++;
channel_info.data_length = row_length * m_header.height;
@@ -2045,39 +2047,39 @@ PSDInput::read_channel_row(ChannelInfo& channel_info, uint32_t row, char* data)
case 16: swap_endian((uint16_t*)data, channel_info.width); break;
case 32: swap_endian((uint32_t*)data, channel_info.width); break;
}
- break;
- case Compression_RLE: {
- if (!ioseek(channel_info.row_pos[row]))
- return false;
- uint32_t rle_length = channel_info.rle_lengths[row];
- char* rle_buffer;
- OIIO_ALLOCATE_STACK_OR_HEAP(rle_buffer, char, rle_length);
- if (!ioread(rle_buffer, rle_length)
- || !decompress_packbits(rle_buffer, data, rle_length,
- channel_info.row_length))
- return false;
- } break;
- case Compression_ZIP: {
- OIIO_ASSERT(channel_info.decompressed_data.size()
- == static_cast<uint64_t>(channel_info.width)
- * channel_info.height * (m_header.depth / 8));
- // We simply copy over the row into destination
- uint64_t row_index = static_cast<uint64_t>(row) * channel_info.width
- * (m_header.depth / 8);
- std::memcpy(data, channel_info.decompressed_data.data() + row_index,
- channel_info.row_length);
- } break;
- case Compression_ZIP_Predict: {
- OIIO_ASSERT(channel_info.decompressed_data.size()
- == static_cast<uint64_t>(channel_info.width)
- * channel_info.height * (m_header.depth / 8));
- // We simply copy over the row into destination
- uint64_t row_index = static_cast<uint64_t>(row) * channel_info.width
- * (m_header.depth / 8);
- std::memcpy(data, channel_info.decompressed_data.data() + row_index,
- channel_info.row_length);
- } break;
}
+ break;
+ case Compression_RLE: {
+ if (!ioseek(channel_info.row_pos[row]))
+ return false;
+ uint32_t rle_length = channel_info.rle_lengths[row];
+ char* rle_buffer;
+ OIIO_ALLOCATE_STACK_OR_HEAP(rle_buffer, char, rle_length);
+ if (!ioread(rle_buffer, rle_length)
+ || !decompress_packbits(rle_buffer, data, rle_length,
+ channel_info.row_length))
+ return false;
+ } break;
+ case Compression_ZIP: {
+ OIIO_ASSERT(channel_info.decompressed_data.size()
+ == static_cast<uint64_t>(channel_info.width)
+ * channel_info.height * (m_header.depth / 8));
+ // We simply copy over the row into destination
+ uint64_t row_index = static_cast<uint64_t>(row) * channel_info.width
+ * (m_header.depth / 8);
+ std::memcpy(data, channel_info.decompressed_data.data() + row_index,
+ channel_info.row_length);
+ } break;
+ case Compression_ZIP_Predict: {
+ OIIO_ASSERT(channel_info.decompressed_data.size()
+ == static_cast<uint64_t>(channel_info.width)
+ * channel_info.height * (m_header.depth / 8));
+ // We simply copy over the row into destination
+ uint64_t row_index = static_cast<uint64_t>(row) * channel_info.width
+ * (m_header.depth / 8);
+ std::memcpy(data, channel_info.decompressed_data.data() + row_index,
+ channel_info.row_length);
+ } break;
}
return true;
diff --git a/testsuite/psd-colormodes/ref/out.txt b/testsuite/psd-colormodes/ref/out.txt
index b521061822..0cc89d8f3b 100644
--- a/testsuite/psd-colormodes/ref/out.txt
+++ b/testsuite/psd-colormodes/ref/out.txt
@@ -22,7 +22,7 @@ Comparing "pattern2-8-rgb.psd.tif" and "ref/pattern2.tif"
PASS
Comparing "pattern2-16-rgb.psd.tif" and "ref/pattern2.tif"
PASS
-Comparing "pattern2-8-cmyk.psd.tif" and "ref/pattern2-cmyk.tif"
+Comparing "pattern2-8-cmyk.psd.tif" and "ref/pattern2-8-cmyk.psd.tif"
PASS
Comparing "pattern2-16-cmyk.psd.tif" and "ref/pattern2-16-cmyk.psd.tif"
PASS
@@ -30,7 +30,7 @@ Comparing "pattern2-8-multichannel.psd.tif" and "ref/pattern2.tif"
PASS
Comparing "pattern2-16-multichannel.psd.tif" and "ref/pattern2.tif"
PASS
-Comparing "pattern2-8-grayscale.psd.tif" and "ref/pattern2-gray.tif"
+Comparing "pattern2-8-grayscale.psd.tif" and "ref/pattern2-8-grayscale.psd.tif"
PASS
Comparing "pattern2-16-grayscale.psd.tif" and "ref/pattern2-16-grayscale.psd.tif"
PASS
diff --git a/testsuite/psd-colormodes/ref/pattern2-16-cmyk.psd.tif b/testsuite/psd-colormodes/ref/pattern2-16-cmyk.psd.tif
index d01cca324e..f6e8c9f458 100644
Binary files a/testsuite/psd-colormodes/ref/pattern2-16-cmyk.psd.tif and b/testsuite/psd-colormodes/ref/pattern2-16-cmyk.psd.tif differ
diff --git a/testsuite/psd-colormodes/ref/pattern2-16-grayscale.psd.tif b/testsuite/psd-colormodes/ref/pattern2-16-grayscale.psd.tif
index db88e52ad2..1943c31f05 100644
Binary files a/testsuite/psd-colormodes/ref/pattern2-16-grayscale.psd.tif and b/testsuite/psd-colormodes/ref/pattern2-16-grayscale.psd.tif differ
diff --git a/testsuite/psd-colormodes/ref/pattern2-cmyk.tif b/testsuite/psd-colormodes/ref/pattern2-8-cmyk.psd.tif
similarity index 100%
rename from testsuite/psd-colormodes/ref/pattern2-cmyk.tif
rename to testsuite/psd-colormodes/ref/pattern2-8-cmyk.psd.tif
diff --git a/testsuite/psd-colormodes/ref/pattern2-gray.tif b/testsuite/psd-colormodes/ref/pattern2-8-grayscale.psd.tif
similarity index 100%
rename from testsuite/psd-colormodes/ref/pattern2-gray.tif
rename to testsuite/psd-colormodes/ref/pattern2-8-grayscale.psd.tif
diff --git a/testsuite/psd/ref/out.txt b/testsuite/psd/ref/out.txt
index 7c0319d6a0..047d6a6281 100644
--- a/testsuite/psd/ref/out.txt
+++ b/testsuite/psd/ref/out.txt
@@ -584,7 +584,7 @@ Reading ../oiio-images/psd_rgb_8.psd
stRef:originalDocumentID: "E146B3E37A92795EE3EA6577040DE6D5"
Reading ../oiio-images/psd_rgb_16.psd
../oiio-images/psd_rgb_16.psd : 320 x 240, 3 channel, uint16 psd
- SHA-1: 591F6850EB0B548DF2CE7177661440CB812E5C31
+ SHA-1: E42334B0F0684E3C3BF9125F2920B07C44C17B11
channel list: R, G, B
Artist: "Daniel Wyatt"
DateTime: "2007-01-18T15:49:21"
@@ -655,7 +655,7 @@ Reading ../oiio-images/psd_rgb_16.psd
stRef:originalDocumentID: "E146B3E37A92795EE3EA6577040DE6D5"
Reading ../oiio-images/psd_rgb_32.psd
../oiio-images/psd_rgb_32.psd : 320 x 240, 3 channel, float psd
- SHA-1: B7F8CE4B4259A92AA13333EA8112C3E37C6BAB39
+ SHA-1: 63CF8F7B010D24EFD3C41F51C16D8D285FE07313
channel list: R, G, B
Artist: "Daniel Wyatt"
DateTime: "2007-01-18T15:49:21"
@@ -1459,7 +1459,7 @@ Reading src/Layers_16bit_RGB.psd
src/Layers_16bit_RGB.psd : 48 x 27, 3 channel, uint16 psd
4 subimages: 48x27 [u16,u16,u16], 48x27 [u16,u16,u16,u16], 48x27 [u16,u16,u16,u16], 48x27 [u16,u16,u16,u16]
subimage 0: 48 x 27, 3 channel, uint16 psd
- SHA-1: 22EAC1FF517BCCEA8EBA31AB240C11518EE42424
+ SHA-1: 0228B2F3AA493695E9653E1C32D303022DDEFAE4
channel list: R, G, B
DateTime: "2024-03-06T15:22:40+01:00"
ICCProfile: 0, 0, 12, 72, 76, 105, 110, 111, 2, 16, 0, 0, 109, 110, 116, 114, ... [3144 x uint8]
@@ -1653,7 +1653,7 @@ Reading src/Layers_32bit_RGB.psd
src/Layers_32bit_RGB.psd : 48 x 27, 3 channel, float psd
4 subimages: 48x27 [f,f,f], 48x27 [f,f,f,f], 48x27 [f,f,f,f], 48x27 [f,f,f,f]
subimage 0: 48 x 27, 3 channel, float psd
- SHA-1: 90D05324071E32026D22E44FA9EF027C80D97308
+ SHA-1: C9C84C45C64884BD4D6F1B1E91CCA6744EA3C06C
channel list: R, G, B
DateTime: "2024-03-06T15:22:40+01:00"
ICCProfile: 0, 0, 2, 56, 108, 99, 109, 115, 4, 48, 0, 0, 109, 110, 116, 114, ... [568 x uint8]

View File

@@ -1,78 +0,0 @@
diff -Naur oiio-2.4.15.0/src/cmake/modules/FindWebP.cmake external_openimageio/src/cmake/modules/FindWebP.cmake
--- oiio-2.4.15.0/src/cmake/modules/FindWebP.cmake 2023-09-01 10:48:29.000000000 -0600
+++ external_openimageio/src/cmake/modules/FindWebP.cmake 2023-09-21 14:47:19.366083900 -0600
@@ -25,15 +25,30 @@
ENV WEBP_INCLUDE_PATH
DOC "The directory where Webp headers reside")
-find_library (WEBP_LIBRARY webp
+find_library (WEBP_LIBRARY
+ NAMES
+ webp
+ libwebp
HINTS
${WEBP_LIBRARY_PATH}
ENV WEBP_LIBRARY_PATH)
-find_library (WEBPDEMUX_LIBRARY webpdemux
+find_library (WEBPDEMUX_LIBRARY
+ NAMES
+ webpdemux
+ libwebpdemux
+ HINTS
+ ${WEBP_LIBRARY_PATH}
+ ENV WEBP_LIBRARY_PATH)
+# New in WebP 1.3
+find_library (WEBP_SHARPYUV_LIBRARY
+ NAMES
+ sharpyuv
+ libsharpyuv
HINTS
${WEBP_LIBRARY_PATH}
ENV WEBP_LIBRARY_PATH)
+
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (WebP
REQUIRED_VARS WEBP_INCLUDE_DIR
@@ -42,7 +57,7 @@
if (WebP_FOUND)
set (WEBP_INCLUDES "${WEBP_INCLUDE_DIR}")
- set (WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY})
+ set (WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBP_SHARPYUV_LIBRARY})
if (NOT TARGET WebP::webp)
add_library(WebP::webp UNKNOWN IMPORTED)
@@ -58,10 +73,18 @@
set_property(TARGET WebP::webpdemux APPEND PROPERTY
IMPORTED_LOCATION ${WEBPDEMUX_LIBRARY})
endif ()
+ if (WEBP_SHARPYUV_LIBRARY AND NOT TARGET WebP::sharpyuv)
+ add_library(WebP::sharpyuv UNKNOWN IMPORTED)
+ set_target_properties(WebP::sharpyuv PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES ${WEBP_INCLUDES})
+ set_property(TARGET WebP::sharpyuv APPEND PROPERTY
+ IMPORTED_LOCATION ${WEBP_SHARPYUV_LIBRARY})
+ endif ()
endif ()
mark_as_advanced (
WEBP_INCLUDE_DIR
WEBP_LIBRARY
WEBPDEMUX_LIBRARY
+ WEBP_SHARPYUV_LIBRARY
)
diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt
index ccf1146..c646e99 100644
--- a/src/webp.imageio/CMakeLists.txt
+++ b/src/webp.imageio/CMakeLists.txt
@@ -4,7 +4,7 @@
if (WebP_FOUND)
add_oiio_plugin (webpinput.cpp webpoutput.cpp
- LINK_LIBRARIES WebP::webp WebP::webpdemux
+ LINK_LIBRARIES WebP::webp WebP::webpdemux WebP::sharpyuv
DEFINITIONS "-DUSE_WEBP=1")
else ()
message (STATUS "WebP plugin will not be built")

View File

@@ -14,10 +14,10 @@ diff -Naur orig/src/cmake/compiler.cmake external_openimageio/src/cmake/compiler
--- orig/src/cmake/compiler.cmake 2020-05-10 21:43:52 -0600
+++ external_openimageio/src/cmake/compiler.cmake 2020-05-13 17:02:54 -0600
@@ -188,6 +189,7 @@
add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
add_definitions (-D_SCL_SECURE_NO_WARNINGS)
add_definitions (-DJAS_WIN_MSVC_BUILD)
+ add_definitions (-DOPJ_STATIC)
add_compile_definitions (_CRT_NONSTDC_NO_WARNINGS)
add_compile_definitions (_SCL_SECURE_NO_WARNINGS)
add_compile_definitions (JAS_WIN_MSVC_BUILD)
+ add_compile_definitions (OPJ_STATIC)
endif (MSVC)
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"

View File

@@ -1,15 +1,23 @@
diff -Naur openvdb-8.0.0/openvdb/openvdb/CMakeLists.txt openvdb/openvdb/openvdb/CMakeLists.txt
--- openvdb-8.0.0/openvdb/openvdb/CMakeLists.txt 2020-12-24 10:13:14 -0700
+++ openvdb/openvdb/openvdb/CMakeLists.txt 2021-02-05 11:18:33 -0700
@@ -146,6 +148,7 @@
Boost::disable_autolinking # add -DBOOST_ALL_NO_LIB
)
diff -Naur openvdb-12.0.0/openvdb/openvdb/CMakeLists.txt openvdb/openvdb/openvdb/CMakeLists.txt
--- openvdb-12.0.0/openvdb/openvdb/CMakeLists.txt 2024-10-31 16:59:05.000000000 -0700
+++ openvdb/openvdb/openvdb/CMakeLists.txt 2024-12-11 08:47:05.635327200 -0800
@@ -148,6 +148,15 @@
endif()
+ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -DOPENVDB_OPENEXR_STATICLIB)
endif()
if(USE_EXR)
@@ -379,7 +382,12 @@
+add_compile_definitions(
+ #Blender: prevent implicit TBB linkage
+ __TBB_NO_IMPLICIT_LINKAGE
+ #Blender: OpenEXR is static
+ OPENVDB_OPENEXR_STATICLIB
+ #Blender: Link the debug python libs rather than the release ones
+ $<$<CONFIG:Debug>:Py_DEBUG>
+)
+
if(USE_BLOSC)
# Find Blosc libraries
find_package(Blosc ${MINIMUM_BLOSC_VERSION} REQUIRED)
@@ -608,7 +617,12 @@
# imported targets.
if(OPENVDB_CORE_SHARED)
@@ -23,9 +31,23 @@ diff -Naur openvdb-8.0.0/openvdb/openvdb/CMakeLists.txt openvdb/openvdb/openvdb/
endif()
if(OPENVDB_CORE_STATIC)
diff -Naur openvdb-8.0.0/openvdb/openvdb/version.rc.in openvdb/openvdb/openvdb/version.rc.in
--- openvdb-8.0.0/openvdb/openvdb/version.rc.in 1969-12-31 17:00:00 -0700
+++ openvdb/openvdb/openvdb/version.rc.in 2021-02-05 11:18:33 -0700
diff -Naur openvdb-12.0.0/openvdb/openvdb/python/CMakeLists.txt openvdb/openvdb/openvdb/python/CMakeLists.txt
--- openvdb-12.0.0/openvdb/openvdb/python/CMakeLists.txt 2024-10-31 16:59:05.000000000 -0700
+++ openvdb/openvdb/openvdb/python/CMakeLists.txt 2024-12-11 09:02:05.377733900 -0800
@@ -22,7 +22,9 @@
option(OPENVDB_BUILD_PYTHON_UNITTESTS [=[
"Include the OpenVDB Python unit test. Requires a python interpreter]=]
${OPENVDB_BUILD_UNITTESTS})
-
+#blender: prevent double _d for the python module
+set(CMAKE_DEBUG_POSTFIX "")
+add_compile_definitions($<$<CONFIG:Debug>:Py_DEBUG> __TBB_NO_IMPLICIT_LINKAGE)
#########################################################################
message(STATUS "----------------------------------------------------")
diff -Naur openvdb-12.0.0/openvdb/openvdb/version.rc.in openvdb/openvdb/openvdb/version.rc.in
--- openvdb-12.0.0/openvdb/openvdb/version.rc.in 1969-12-31 16:00:00.000000000 -0800
+++ openvdb/openvdb/openvdb/version.rc.in 2024-12-11 08:47:05.697536200 -0800
@@ -0,0 +1,48 @@
+#include <winver.h>
+

View File

@@ -1,81 +0,0 @@
diff --git a/openvdb/openvdb/python/pyGrid.h b/openvdb/openvdb/python/pyGrid.h
index 9249eaf6d..f4c859110 100644
--- a/openvdb/openvdb/python/pyGrid.h
+++ b/openvdb/openvdb/python/pyGrid.h
@@ -322,7 +322,7 @@ copyToArray(GridType&, const py::object&, py::object)
#else // if defined(PY_OPENVDB_USE_NUMPY)
-using ArrayDimVec = std::vector<ssize_t>;
+using ArrayDimVec = std::vector<Py_ssize_t>;
// ID numbers for supported value types
enum class DtId { NONE, FLOAT, DOUBLE, BOOL, INT16, INT32, INT64, UINT32, UINT64/*, HALF*/ };
@@ -768,12 +768,12 @@ template<typename GridType>
inline typename GridType::Ptr
meshToLevelSet(py::array_t<float> pointsObj, py::array_t<Index32> trianglesObj, py::array_t<Index32> quadsObj, math::Transform::Ptr xform, float halfWidth)
{
- auto validate2DArray = [](py::array array, ssize_t N) {
+ auto validate2DArray = [](py::array array, Py_ssize_t N) {
if (array.ndim() != 2 || array.shape(1) != N) {
std::ostringstream os;
os << "Expected a 2-dimensional numpy.ndarray with shape(1) = "<< N;
os << ", found " << array.ndim() << "-dimensional array with shape = (";
- for (ssize_t i = 0; i < array.ndim(); ++i) {
+ for (Py_ssize_t i = 0; i < array.ndim(); ++i) {
os << array.shape(i);
if (i != array.ndim() - 1)
os << ", ";
@@ -826,12 +826,12 @@ volumeToQuadMesh(const GridType& grid, double isovalue)
std::vector<Vec4I> quads;
tools::volumeToMesh(grid, points, quads, isovalue);
- std::vector<ssize_t> shape = { static_cast<ssize_t>(points.size()), 3 };
- std::vector<ssize_t> strides = { 3 * static_cast<ssize_t>(sizeof(float)), static_cast<ssize_t>(sizeof(float))};
+ std::vector<Py_ssize_t> shape = { static_cast<Py_ssize_t>(points.size()), 3 };
+ std::vector<Py_ssize_t> strides = { 3 * static_cast<Py_ssize_t>(sizeof(float)), static_cast<Py_ssize_t>(sizeof(float))};
py::array_t<float> pointArrayObj(py::buffer_info(points.data(), sizeof(float), py::format_descriptor<float>::format(), 2, shape, strides));
- shape = { static_cast<ssize_t>(quads.size()), 4 };
- strides = { 4 * static_cast<ssize_t>(sizeof(Index32)), static_cast<ssize_t>(sizeof(Index32))};
+ shape = { static_cast<Py_ssize_t>(quads.size()), 4 };
+ strides = { 4 * static_cast<Py_ssize_t>(sizeof(Index32)), static_cast<Py_ssize_t>(sizeof(Index32))};
py::array_t<Index32> quadArrayObj(py::buffer_info(quads.data(), sizeof(Index32), py::format_descriptor<Index32>::format(), 2, shape, strides));
return std::make_tuple(pointArrayObj, quadArrayObj);
@@ -857,18 +857,18 @@ volumeToMesh(const GridType& grid, double isovalue, double adaptivity)
// Create a deep copy of the array (because the point vector will be destroyed
// when this function returns).
- std::vector<ssize_t> shape = { static_cast<ssize_t>(points.size()), 3 };
- std::vector<ssize_t> strides = { 3 * static_cast<ssize_t>(sizeof(float)), static_cast<ssize_t>(sizeof(float))};
+ std::vector<Py_ssize_t> shape = { static_cast<Py_ssize_t>(points.size()), 3 };
+ std::vector<Py_ssize_t> strides = { 3 * static_cast<Py_ssize_t>(sizeof(float)), static_cast<Py_ssize_t>(sizeof(float))};
py::buffer_info pointInfo(points.data(), sizeof(float), py::format_descriptor<float>::format(), 2, shape, strides);
py::array_t<float> pointArray(pointInfo);
- shape = { static_cast<ssize_t>(triangles.size()), 3 };
- strides = { 3 * static_cast<ssize_t>(sizeof(Index32)), static_cast<ssize_t>(sizeof(Index32))};
+ shape = { static_cast<Py_ssize_t>(triangles.size()), 3 };
+ strides = { 3 * static_cast<Py_ssize_t>(sizeof(Index32)), static_cast<Py_ssize_t>(sizeof(Index32))};
py::buffer_info triangleInfo(triangles.data(), sizeof(Index32), py::format_descriptor<Index32>::format(), 2, shape, strides);
py::array_t<Index32> triangleArray(triangleInfo);
- shape = { static_cast<ssize_t>(quads.size()), 4 };
- strides = { 4 * static_cast<ssize_t>(sizeof(Index32)), static_cast<ssize_t>(sizeof(Index32))};
+ shape = { static_cast<Py_ssize_t>(quads.size()), 4 };
+ strides = { 4 * static_cast<Py_ssize_t>(sizeof(Index32)), static_cast<Py_ssize_t>(sizeof(Index32))};
py::buffer_info quadInfo(quads.data(), sizeof(Index32), py::format_descriptor<Index32>::format(), 2, shape, strides);
py::array_t<Index32> quadArray(quadInfo);
@@ -1590,8 +1590,8 @@ exportGrid(py::module_ m)
&pyGrid::meshToLevelSet<GridType>,
py::arg("points"),
#ifdef PY_OPENVDB_USE_NUMPY
- py::arg("triangles")=py::array_t<Index32>({ 0, 3 }, { 3 * static_cast<ssize_t>(sizeof(Index32)), static_cast<ssize_t>(sizeof(Index32))} ),
- py::arg("quads")=py::array_t<Index32>({ 0, 4 }, { 4 * static_cast<ssize_t>(sizeof(Index32)), static_cast<ssize_t>(sizeof(Index32))} ),
+ py::arg("triangles")=py::array_t<Index32>({ 0, 3 }, { 3 * static_cast<Py_ssize_t>(sizeof(Index32)), static_cast<Py_ssize_t>(sizeof(Index32))} ),
+ py::arg("quads")=py::array_t<Index32>({ 0, 4 }, { 4 * static_cast<Py_ssize_t>(sizeof(Index32)), static_cast<Py_ssize_t>(sizeof(Index32))} ),
#else
py::arg("triangles")=std::vector<Index32>(),
py::arg("quads")=std::vector<Index32>(),

View File

@@ -1,21 +0,0 @@
diff --git a/openvdb/openvdb/math/Half.h b/openvdb/openvdb/math/Half.h
index b8045ba441..ba72b0e6df 100644
--- a/openvdb/openvdb/math/Half.h
+++ b/openvdb/openvdb/math/Half.h
@@ -342,8 +342,14 @@ imath_half_to_float (imath_half_bits_t h)
// other compilers may provide count-leading-zeros primitives,
// but we need the community to inform us of the variants
uint32_t lc;
-# if defined(_MSC_VER) && (_M_IX86 || _M_X64)
- lc = __lzcnt (hexpmant);
+# if defined(_MSC_VER)
+ // The direct intrinsic for this is __lznct, but that is not supported
+ // on older x86_64 hardware or ARM. Instead uses the bsr instruction
+ // and one additional subtraction. This assumes hexpmant != 0, for 0
+ // bsr and lznct would behave differently.
+ unsigned long bsr;
+ _BitScanReverse (&bsr, hexpmant);
+ lc = (31 - bsr);
# elif defined(__GNUC__) || defined(__clang__)
lc = (uint32_t) __builtin_clz (hexpmant);
# else

View File

@@ -0,0 +1,44 @@
diff --git a/nanovdb/nanovdb/tools/GridBuilder.h b/nanovdb/nanovdb/tools/GridBuilder.h
index 30385661d0..428215ba65 100644
--- a/nanovdb/nanovdb/tools/GridBuilder.h
+++ b/nanovdb/nanovdb/tools/GridBuilder.h
@@ -1158,7 +1158,7 @@ struct LeafNode
ValueIterator& operator=(const ValueIterator&) = default;
ValueType operator*() const { NANOVDB_ASSERT(*this); return mParent->mValues[mPos];}
Coord getCoord() const { NANOVDB_ASSERT(*this); return mParent->offsetToGlobalCoord(mPos);}
- bool isActive() const { NANOVDB_ASSERT(*this); return mParent->isActive(mPos);}
+ bool isActive() const { NANOVDB_ASSERT(*this); return mParent->mValueMask.isOn(mPos);}
operator bool() const {return mPos < SIZE;}
ValueIterator& operator++() {++mPos; return *this;}
ValueIterator operator++(int) {
diff --git a/openvdb/openvdb/tree/NodeManager.h b/openvdb/openvdb/tree/NodeManager.h
index 27a3f82012..1023c00748 100644
--- a/openvdb/openvdb/tree/NodeManager.h
+++ b/openvdb/openvdb/tree/NodeManager.h
@@ -328,7 +328,7 @@ class NodeList
void operator()(const NodeRange& range) const
{
for (typename NodeRange::Iterator it = range.begin(); it; ++it) {
- OpT::template eval(mNodeOp, it);
+ OpT::eval(mNodeOp, it);
}
}
const NodeOp mNodeOp;
@@ -348,7 +348,7 @@ class NodeList
void operator()(const NodeRange& range) const
{
for (typename NodeRange::Iterator it = range.begin(); it; ++it) {
- OpT::template eval(mNodeOp, it);
+ OpT::eval(mNodeOp, it);
}
}
const NodeOp& mNodeOp;
@@ -373,7 +373,7 @@ class NodeList
void operator()(const NodeRange& range)
{
for (typename NodeRange::Iterator it = range.begin(); it; ++it) {
- OpT::template eval(*mNodeOp, it);
+ OpT::eval(*mNodeOp, it);
}
}
void join(const NodeReducer& other)

View File

@@ -0,0 +1,395 @@
diff --git a/src/ogg.c b/src/ogg.c
index 529941af8..e2d679d41 100644
--- a/src/ogg.c
+++ b/src/ogg.c
@@ -211,12 +211,16 @@ ogg_read_first_page (SF_PRIVATE *psf, OGG_PRIVATE *odata)
int
ogg_write_page (SF_PRIVATE *psf, ogg_page *page)
-{ int bytes ;
+{ int n ;
- bytes = psf_fwrite (page->header, 1, page->header_len, psf) ;
- bytes += psf_fwrite (page->body, 1, page->body_len, psf) ;
+ n = psf_fwrite (page->header, 1, page->header_len, psf) ;
+ if (n == page->header_len)
+ n += psf_fwrite (page->body, 1, page->body_len, psf) ;
- return bytes == page->header_len + page->body_len ;
+ if (n != page->body_len + page->header_len)
+ return -1 ;
+
+ return n ;
} /* ogg_write_page */
sf_count_t
diff --git a/src/ogg_opus.c b/src/ogg_opus.c
index 511653ecc..e01224b99 100644
--- a/src/ogg_opus.c
+++ b/src/ogg_opus.c
@@ -827,15 +827,16 @@ ogg_opus_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
/* The first page MUST only contain the header, so flush it out now */
ogg_stream_packetin (&odata->ostream, &op) ;
- for ( ; (nn = ogg_stream_flush (&odata->ostream, &odata->opage)) ; )
- { if (! (nn = ogg_write_page (psf, &odata->opage)))
+ while (ogg_stream_flush (&odata->ostream, &odata->opage))
+ { nn = ogg_write_page (psf, &odata->opage) ;
+ if (nn < 0)
{ psf_log_printf (psf, "Opus : Failed to write header!\n") ;
if (psf->error)
return psf->error ;
return SFE_INTERNAL ;
} ;
psf->dataoffset += nn ;
- }
+ } ;
/*
** Metadata Tags (manditory)
@@ -850,15 +851,16 @@ ogg_opus_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
vorbiscomment_write_tags (psf, &op, &opustags_ident, opus_get_version_string (), - (OGG_OPUS_COMMENT_PAD)) ;
op.packetno = 2 ;
ogg_stream_packetin (&odata->ostream, &op) ;
- for ( ; (nn = ogg_stream_flush (&odata->ostream, &odata->opage)) ; )
- { if (! (nn = ogg_write_page (psf, &odata->opage)))
+ while (ogg_stream_flush (&odata->ostream, &odata->opage))
+ { nn = ogg_write_page (psf, &odata->opage) ;
+ if (nn < 0)
{ psf_log_printf (psf, "Opus : Failed to write comments!\n") ;
if (psf->error)
return psf->error ;
return SFE_INTERNAL ;
} ;
psf->dataoffset += nn ;
- }
+ } ;
return 0 ;
} /* ogg_opus_write_header */
@@ -1132,7 +1134,8 @@ ogg_opus_write_out (SF_PRIVATE *psf, OGG_PRIVATE *odata, OPUS_PRIVATE *oopus)
if (nbytes > 0)
{ oopus->u.encode.last_segments -= ogg_page_segments (&odata->opage) ;
oopus->pg_pos = oopus->pkt_pos ;
- ogg_write_page (psf, &odata->opage) ;
+ if (ogg_write_page (psf, &odata->opage) < 0)
+ return -1 ;
}
else
break ;
diff --git a/src/ogg_vorbis.c b/src/ogg_vorbis.c
index add123966..fae252ca0 100644
--- a/src/ogg_vorbis.c
+++ b/src/ogg_vorbis.c
@@ -82,28 +82,6 @@
/* How many seconds in the future to not bother bisection searching for. */
#define VORBIS_SEEK_THRESHOLD 2
-typedef int convert_func (SF_PRIVATE *psf, int, void *, int, int, float **) ;
-
-static int vorbis_read_header (SF_PRIVATE *psf) ;
-static int vorbis_write_header (SF_PRIVATE *psf, int calc_length) ;
-static int vorbis_close (SF_PRIVATE *psf) ;
-static int vorbis_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
-static int vorbis_byterate (SF_PRIVATE *psf) ;
-static int vorbis_calculate_granulepos (SF_PRIVATE *psf, uint64_t *gp_out) ;
-static int vorbis_skip (SF_PRIVATE *psf, uint64_t target_gp) ;
-static int vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) ;
-static sf_count_t vorbis_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
-static sf_count_t vorbis_read_s (SF_PRIVATE *psf, short *ptr, sf_count_t len) ;
-static sf_count_t vorbis_read_i (SF_PRIVATE *psf, int *ptr, sf_count_t len) ;
-static sf_count_t vorbis_read_f (SF_PRIVATE *psf, float *ptr, sf_count_t len) ;
-static sf_count_t vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t len) ;
-static sf_count_t vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len) ;
-static sf_count_t vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len) ;
-static sf_count_t vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ;
-static sf_count_t vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ;
-static sf_count_t vorbis_read_sample (SF_PRIVATE *psf, void *ptr, sf_count_t lens, convert_func *transfn) ;
-static int vorbis_rnull (SF_PRIVATE *psf, int samples, void *vptr, int off , int channels, float **pcm) ;
-
typedef struct
{ int id ;
const char *name ;
@@ -145,6 +123,45 @@ typedef struct
sf_count_t last_page ;
} VORBIS_PRIVATE ;
+typedef int convert_func (SF_PRIVATE *psf, int, void *, int, int, float **) ;
+
+static int vorbis_read_header (SF_PRIVATE *psf) ;
+static int vorbis_write_header (SF_PRIVATE *psf, int calc_length) ;
+static int vorbis_close (SF_PRIVATE *psf) ;
+static int vorbis_command (SF_PRIVATE *psf, int command, void *data, int datasize) ;
+static int vorbis_byterate (SF_PRIVATE *psf) ;
+static int vorbis_calculate_granulepos (SF_PRIVATE *psf, uint64_t *gp_out) ;
+static int vorbis_skip (SF_PRIVATE *psf, uint64_t target_gp) ;
+static int vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp) ;
+static sf_count_t vorbis_seek (SF_PRIVATE *psf, int mode, sf_count_t offset) ;
+static sf_count_t vorbis_read_s (SF_PRIVATE *psf, short *ptr, sf_count_t len) ;
+static sf_count_t vorbis_read_i (SF_PRIVATE *psf, int *ptr, sf_count_t len) ;
+static sf_count_t vorbis_read_f (SF_PRIVATE *psf, float *ptr, sf_count_t len) ;
+static sf_count_t vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t len) ;
+static sf_count_t vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t len) ;
+static sf_count_t vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t len) ;
+static sf_count_t vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t len) ;
+static sf_count_t vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t len) ;
+static sf_count_t vorbis_read_sample (SF_PRIVATE *psf, void *ptr, sf_count_t lens, convert_func *transfn) ;
+static int vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata, int in_frames) ;
+static int vorbis_rnull (SF_PRIVATE *psf, int samples, void *vptr, int off , int channels, float **pcm) ;
+static void vorbis_log_error (SF_PRIVATE *psf, int error) ;
+
+
+static void
+vorbis_log_error(SF_PRIVATE *psf, int error) {
+ switch (error)
+ { case 0: return;
+ case OV_EIMPL: psf->error = SFE_UNIMPLEMENTED ; break ;
+ case OV_ENOTVORBIS: psf->error = SFE_MALFORMED_FILE ; break ;
+ case OV_EBADHEADER: psf->error = SFE_MALFORMED_FILE ; break ;
+ case OV_EVERSION: psf->error = SFE_UNSUPPORTED_ENCODING ; break ;
+ case OV_EFAULT:
+ case OV_EINVAL:
+ default: psf->error = SFE_INTERNAL ;
+ } ;
+} ;
+
static int
vorbis_read_header (SF_PRIVATE *psf)
{ OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
@@ -380,7 +397,6 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
{ ogg_packet header ;
ogg_packet header_comm ;
ogg_packet header_code ;
- int result ;
vorbis_analysis_headerout (&vdata->vdsp, &vdata->vcomment, &header, &header_comm, &header_code) ;
ogg_stream_packetin (&odata->ostream, &header) ; /* automatically placed in its own page */
@@ -390,9 +406,9 @@ vorbis_write_header (SF_PRIVATE *psf, int UNUSED (calc_length))
/* This ensures the actual
* audio data will start on a new page, as per spec
*/
- while ((result = ogg_stream_flush (&odata->ostream, &odata->opage)) != 0)
- { ogg_write_page (psf, &odata->opage) ;
- } ;
+ while (ogg_stream_flush (&odata->ostream, &odata->opage))
+ if (ogg_write_page (psf, &odata->opage) < 0)
+ return -1 ;
}
return 0 ;
@@ -402,6 +418,7 @@ static int
vorbis_close (SF_PRIVATE *psf)
{ OGG_PRIVATE* odata = psf->container_data ;
VORBIS_PRIVATE *vdata = psf->codec_data ;
+ int ret = 0 ;
if (odata == NULL || vdata == NULL)
return 0 ;
@@ -412,34 +429,14 @@ vorbis_close (SF_PRIVATE *psf)
if (psf->file.mode == SFM_WRITE)
{
if (psf->write_current <= 0)
- vorbis_write_header (psf, 0) ;
-
- vorbis_analysis_wrote (&vdata->vdsp, 0) ;
- while (vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock) == 1)
- {
+ ret = vorbis_write_header (psf, 0) ;
- /* analysis, assume we want to use bitrate management */
- vorbis_analysis (&vdata->vblock, NULL) ;
- vorbis_bitrate_addblock (&vdata->vblock) ;
-
- while (vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket))
- { /* weld the packet into the bitstream */
- ogg_stream_packetin (&odata->ostream, &odata->opacket) ;
-
- /* write out pages (if any) */
- while (!odata->eos)
- { int result = ogg_stream_pageout (&odata->ostream, &odata->opage) ;
- if (result == 0) break ;
- ogg_write_page (psf, &odata->opage) ;
-
- /* this could be set above, but for illustrative purposes, I do
- it here (to show that vorbis does know where the stream ends) */
-
- if (ogg_page_eos (&odata->opage)) odata->eos = 1 ;
- }
- }
- }
- }
+ if (ret == 0)
+ { /* A write of zero samples tells Vorbis the stream is done and to
+ flush. */
+ ret = vorbis_write_samples (psf, odata, vdata, 0) ;
+ } ;
+ } ;
/* ogg_page and ogg_packet structs always point to storage in
libvorbis. They are never freed or manipulated directly */
@@ -449,7 +446,7 @@ vorbis_close (SF_PRIVATE *psf)
vorbis_comment_clear (&vdata->vcomment) ;
vorbis_info_clear (&vdata->vinfo) ;
- return 0 ;
+ return ret ;
} /* vorbis_close */
int
@@ -688,33 +685,40 @@ vorbis_read_d (SF_PRIVATE *psf, double *ptr, sf_count_t lens)
/*==============================================================================
*/
-static void
+static int
vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata, int in_frames)
-{
- vorbis_analysis_wrote (&vdata->vdsp, in_frames) ;
+{ int ret ;
+
+ if ((ret = vorbis_analysis_wrote (&vdata->vdsp, in_frames)) != 0)
+ return ret ;
/*
** Vorbis does some data preanalysis, then divvies up blocks for
** more involved (potentially parallel) processing. Get a single
** block for encoding now.
*/
- while (vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock) == 1)
+ while ((ret = vorbis_analysis_blockout (&vdata->vdsp, &vdata->vblock)) == 1)
{
/* analysis, assume we want to use bitrate management */
- vorbis_analysis (&vdata->vblock, NULL) ;
- vorbis_bitrate_addblock (&vdata->vblock) ;
+ if ((ret = vorbis_analysis (&vdata->vblock, NULL)) != 0)
+ return ret ;
+ if ((ret = vorbis_bitrate_addblock (&vdata->vblock)) != 0)
+ return ret ;
- while (vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket))
+ while ((ret = vorbis_bitrate_flushpacket (&vdata->vdsp, &odata->opacket)) == 1)
{
/* weld the packet into the bitstream */
- ogg_stream_packetin (&odata->ostream, &odata->opacket) ;
+ if ((ret = ogg_stream_packetin (&odata->ostream, &odata->opacket)) != 0)
+ return ret ;
/* write out pages (if any) */
while (!odata->eos)
- { int result = ogg_stream_pageout (&odata->ostream, &odata->opage) ;
- if (result == 0)
+ { ret = ogg_stream_pageout (&odata->ostream, &odata->opage) ;
+ if (ret == 0)
break ;
- ogg_write_page (psf, &odata->opage) ;
+
+ if (ogg_write_page (psf, &odata->opage) < 0)
+ return -1 ;
/* This could be set above, but for illustrative purposes, I do
** it here (to show that vorbis does know where the stream ends) */
@@ -722,16 +726,22 @@ vorbis_write_samples (SF_PRIVATE *psf, OGG_PRIVATE *odata, VORBIS_PRIVATE *vdata
odata->eos = 1 ;
} ;
} ;
+ if (ret != 0)
+ return ret ;
} ;
+ if (ret != 0)
+ return ret ;
vdata->gp += in_frames ;
+
+ return 0 ;
} /* vorbis_write_data */
static sf_count_t
vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t lens)
{
- int i, m, j = 0 ;
+ int i, m, j = 0, ret ;
OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
int in_frames = lens / psf->sf.channels ;
@@ -740,14 +750,17 @@ vorbis_write_s (SF_PRIVATE *psf, const short *ptr, sf_count_t lens)
for (m = 0 ; m < psf->sf.channels ; m++)
buffer [m][i] = (float) (ptr [j++]) / 32767.0f ;
- vorbis_write_samples (psf, odata, vdata, in_frames) ;
+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)))
+ { vorbis_log_error (psf, ret) ;
+ return 0 ;
+ } ;
return lens ;
} /* vorbis_write_s */
static sf_count_t
vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t lens)
-{ int i, m, j = 0 ;
+{ int i, m, j = 0, ret ;
OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
int in_frames = lens / psf->sf.channels ;
@@ -756,14 +769,17 @@ vorbis_write_i (SF_PRIVATE *psf, const int *ptr, sf_count_t lens)
for (m = 0 ; m < psf->sf.channels ; m++)
buffer [m][i] = (float) (ptr [j++]) / 2147483647.0f ;
- vorbis_write_samples (psf, odata, vdata, in_frames) ;
+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)))
+ { vorbis_log_error (psf, ret) ;
+ return 0 ;
+ } ;
return lens ;
} /* vorbis_write_i */
static sf_count_t
vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t lens)
-{ int i, m, j = 0 ;
+{ int i, m, j = 0, ret ;
OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
int in_frames = lens / psf->sf.channels ;
@@ -772,14 +788,17 @@ vorbis_write_f (SF_PRIVATE *psf, const float *ptr, sf_count_t lens)
for (m = 0 ; m < psf->sf.channels ; m++)
buffer [m][i] = ptr [j++] ;
- vorbis_write_samples (psf, odata, vdata, in_frames) ;
+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)) != 0)
+ { vorbis_log_error (psf, ret) ;
+ return 0 ;
+ } ;
return lens ;
} /* vorbis_write_f */
static sf_count_t
vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t lens)
-{ int i, m, j = 0 ;
+{ int i, m, j = 0, ret ;
OGG_PRIVATE *odata = (OGG_PRIVATE *) psf->container_data ;
VORBIS_PRIVATE *vdata = (VORBIS_PRIVATE *) psf->codec_data ;
int in_frames = lens / psf->sf.channels ;
@@ -788,7 +807,10 @@ vorbis_write_d (SF_PRIVATE *psf, const double *ptr, sf_count_t lens)
for (m = 0 ; m < psf->sf.channels ; m++)
buffer [m][i] = (float) ptr [j++] ;
- vorbis_write_samples (psf, odata, vdata, in_frames) ;
+ if ((ret = vorbis_write_samples (psf, odata, vdata, in_frames)) != 0)
+ { vorbis_log_error (psf, ret) ;
+ return 0 ;
+ } ;
return lens ;
} /* vorbis_write_d */
@@ -884,7 +906,7 @@ vorbis_seek_trysearch (SF_PRIVATE *psf, uint64_t target_gp)
return 0 ;
/* Search for a position a half large-block before our target. As Vorbis is
- ** lapped, every sample position come from two blocks, the "left" half of
+ ** lapped, every sample position comes from two blocks, the "left" half of
** one block and the "right" half of the previous block. The granule
** position of an Ogg page of a Vorbis stream is the sample offset of the
** last finished sample in the stream that can be decoded from a page. A

View File

@@ -1,637 +0,0 @@
diff --git a/include/tbb/machine/msvc_armv8.h b/include/tbb/machine/msvc_armv8.h
new file mode 100644
index 00000000..13d56678
--- /dev/null
+++ b/include/tbb/machine/msvc_armv8.h
@@ -0,0 +1,167 @@
+/*
+ Copyright (c) 2005-2020 Intel Corporation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+#if !defined(__TBB_machine_H) || defined(__TBB_msvc_armv8_H)
+#error Do not #include this internal file directly; use public TBB headers instead.
+#endif
+
+#define __TBB_msvc_armv8_H
+
+#include <intrin.h>
+#include <float.h>
+
+#define __TBB_WORDSIZE 8
+
+#define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED
+
+#if defined(TBB_WIN32_USE_CL_BUILTINS)
+// We can test this on _M_IX86
+#pragma intrinsic(_ReadWriteBarrier)
+#pragma intrinsic(_mm_mfence)
+#define __TBB_compiler_fence() _ReadWriteBarrier()
+#define __TBB_full_memory_fence() _mm_mfence()
+#define __TBB_control_consistency_helper() __TBB_compiler_fence()
+#define __TBB_acquire_consistency_helper() __TBB_compiler_fence()
+#define __TBB_release_consistency_helper() __TBB_compiler_fence()
+#else
+//Now __dmb(_ARM_BARRIER_SY) is used for both compiler and memory fences
+//This might be changed later after testing
+#define __TBB_compiler_fence() __dmb(_ARM64_BARRIER_SY)
+#define __TBB_full_memory_fence() __dmb(_ARM64_BARRIER_SY)
+#define __TBB_control_consistency_helper() __TBB_compiler_fence()
+#define __TBB_acquire_consistency_helper() __TBB_full_memory_fence()
+#define __TBB_release_consistency_helper() __TBB_full_memory_fence()
+#endif
+
+//--------------------------------------------------
+// Compare and swap
+//--------------------------------------------------
+
+/**
+ * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr
+ * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand
+ * @param value value to assign *ptr to if *ptr==comparand
+ * @param comparand value to compare with *ptr
+ * @return value originally in memory at ptr, regardless of success
+*/
+
+#define __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(S,T,F) \
+inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \
+ return _InterlockedCompareExchange##F(reinterpret_cast<volatile T *>(ptr),value,comparand); \
+} \
+
+#define __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(S,T,F) \
+inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \
+ return _InterlockedExchangeAdd##F(reinterpret_cast<volatile T *>(ptr),value); \
+} \
+
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(1,char,8)
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(2,short,16)
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(4,long,)
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(8,__int64,64)
+__TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(4,long,)
+#if defined(TBB_WIN32_USE_CL_BUILTINS)
+// No _InterlockedExchangeAdd64 intrinsic on _M_IX86
+#define __TBB_64BIT_ATOMICS 0
+#else
+__TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(8,__int64,64)
+#endif
+
+inline void __TBB_machine_pause (int32_t delay )
+{
+ while(delay>0)
+ {
+ __TBB_compiler_fence();
+ delay--;
+ }
+}
+
+// API to retrieve/update FPU control setting
+#define __TBB_CPU_CTL_ENV_PRESENT 1
+
+namespace tbb {
+namespace internal {
+
+template <typename T, size_t S>
+struct machine_load_store_relaxed {
+ static inline T load ( const volatile T& location ) {
+ const T value = location;
+
+ /*
+ * An extra memory barrier is required for errata #761319
+ * Please see http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a
+ */
+ __TBB_acquire_consistency_helper();
+ return value;
+ }
+
+ static inline void store ( volatile T& location, T value ) {
+ location = value;
+ }
+};
+
+class cpu_ctl_env {
+private:
+ unsigned int my_ctl;
+public:
+ bool operator!=( const cpu_ctl_env& ctl ) const { return my_ctl != ctl.my_ctl; }
+ void get_env() { my_ctl = _control87(0, 0); }
+ void set_env() const { _control87( my_ctl, ~0U ); }
+};
+
+} // namespace internal
+} // namespaces tbb
+
+// Machine specific atomic operations
+#define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C)
+#define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C)
+#define __TBB_Pause(V) __TBB_machine_pause(V)
+
+// Use generics for some things
+#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1
+#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1
+#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1
+#define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1
+#define __TBB_USE_GENERIC_FETCH_STORE 1
+#define __TBB_USE_GENERIC_DWORD_LOAD_STORE 0
+#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1
+
+#if defined(TBB_WIN32_USE_CL_BUILTINS)
+#if !__TBB_WIN8UI_SUPPORT
+extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void );
+#define __TBB_Yield() SwitchToThread()
+#else
+#include<thread>
+#define __TBB_Yield() std::this_thread::yield()
+#endif
+#else
+#define __TBB_Yield() __yield()
+#endif
+
+// Machine specific atomic operations
+#define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V)
+#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V)
+
+template <typename T1,typename T2>
+inline void __TBB_machine_OR( T1 *operand, T2 addend ) {
+ _InterlockedOr((long volatile *)operand, (long)addend);
+}
+
+template <typename T1,typename T2>
+inline void __TBB_machine_AND( T1 *operand, T2 addend ) {
+ _InterlockedAnd((long volatile *)operand, (long)addend);
+}
+
diff --git a/include/tbb/tbb_config.h b/include/tbb/tbb_config.h
index 7a8d06a0..80b4e3a6 100644
--- a/include/tbb/tbb_config.h
+++ b/include/tbb/tbb_config.h
@@ -209,10 +209,10 @@
#elif __clang__
/** TODO: these options need to be rechecked **/
#define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __has_feature(__cxx_variadic_templates__)
- #define __TBB_CPP11_RVALUE_REF_PRESENT (__has_feature(__cxx_rvalue_references__) && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40500))
+ #define __TBB_CPP11_RVALUE_REF_PRESENT (__has_feature(__cxx_rvalue_references__) && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40500 || _MSC_VER >= 1700))
#define __TBB_IMPLICIT_MOVE_PRESENT __has_feature(cxx_implicit_moves)
/** TODO: extend exception_ptr related conditions to cover libstdc++ **/
- #define __TBB_EXCEPTION_PTR_PRESENT (__cplusplus >= 201103L && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40600))
+ #define __TBB_EXCEPTION_PTR_PRESENT (__cplusplus >= 201103L && (_LIBCPP_VERSION || __TBB_GLIBCXX_VERSION >= 40600 || _MSC_VER >= 1600))
#define __TBB_STATIC_ASSERT_PRESENT __has_feature(__cxx_static_assert__)
#if (__cplusplus >= 201103L && __has_include(<tuple>))
#define __TBB_CPP11_TUPLE_PRESENT 1
diff --git a/include/tbb/tbb_machine.h b/include/tbb/tbb_machine.h
index 9752be58..ebb98ec2 100644
--- a/include/tbb/tbb_machine.h
+++ b/include/tbb/tbb_machine.h
@@ -208,6 +208,8 @@ template<> struct atomic_selector<8> {
#include "machine/windows_intel64.h"
#elif defined(_M_ARM) || defined(__TBB_WIN32_USE_CL_BUILTINS)
#include "machine/msvc_armv7.h"
+ #elif defined(_M_ARM64)
+ #include "machine/msvc_armv8.h"
#endif
#ifdef _MANAGED
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
index bdb4ec29..7c363f4f 100644
--- a/src/tbb/tools_api/ittnotify_config.h
+++ b/src/tbb/tools_api/ittnotify_config.h
@@ -162,7 +162,7 @@
# define ITT_ARCH ITT_ARCH_IA32E
# elif defined _M_IA64 || defined __ia64__
# define ITT_ARCH ITT_ARCH_IA64
-# elif defined _M_ARM || defined __arm__
+# elif defined _M_ARM || defined _M_ARM64 || defined __arm__ || defined __arm64__
# define ITT_ARCH ITT_ARCH_ARM
# elif defined __powerpc64__
# define ITT_ARCH ITT_ARCH_PPC64
diff --git a/src/tbb/winarm64-tbb-export.def b/src/tbb/winarm64-tbb-export.def
new file mode 100644
index 00000000..813eb002
--- /dev/null
+++ b/src/tbb/winarm64-tbb-export.def
@@ -0,0 +1,21 @@
+; Copyright (c) 2005-2020 Intel Corporation
+; Copyright (c) 2022 Linaro Ltd.
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+EXPORTS
+
+#define __TBB_SYMBOL( sym ) sym
+#include "winarm64-tbb-export.lst"
+
+
diff --git a/src/tbb/winarm64-tbb-export.lst b/src/tbb/winarm64-tbb-export.lst
new file mode 100644
index 00000000..a25d545e
--- /dev/null
+++ b/src/tbb/winarm64-tbb-export.lst
@@ -0,0 +1,310 @@
+; Copyright (c) 2005-2020 Intel Corporation
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+#include "tbb/tbb_config.h"
+
+// cache_aligned_allocator.cpp
+__TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPEAX_K0PEAX@Z )
+__TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YA_KXZ )
+__TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPEAX@Z )
+__TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPEAX_K@Z )
+__TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPEAX@Z )
+__TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ )
+
+// task.cpp v3
+__TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
+__TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
+__TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
+__TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAEAVtask@3@_K@Z )
+__TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAEAVtask@4@@Z )
+__TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
+__TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
+__TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
+__TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAEAVtask@3@@Z )
+__TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AEAAXH@Z )
+__TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AEAA_JXZ )
+__TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QEBA_NXZ )
+__TBB_SYMBOL( ?note_affinity@task@tbb@@UEAAXG@Z )
+__TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AEAAXI@Z )
+__TBB_SYMBOL( ?self@task@tbb@@SAAEAV12@XZ )
+__TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QEAAXAEAVtask_list@2@@Z )
+__TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ )
+__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH_K@Z )
+__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH@Z )
+__TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QEAAXXZ )
+#if __TBB_SCHEDULER_OBSERVER
+__TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QEAAX_N@Z )
+#endif /* __TBB_SCHEDULER_OBSERVER */
+
+/* arena.cpp */
+__TBB_SYMBOL( ?internal_max_concurrency@task_arena_base@internal@interface7@tbb@@KAHPEBVtask_arena@34@@Z )
+__TBB_SYMBOL( ?internal_current_slot@task_arena_base@internal@interface7@tbb@@KAHXZ )
+__TBB_SYMBOL( ?internal_initialize@task_arena_base@internal@interface7@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?internal_terminate@task_arena_base@internal@interface7@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?internal_attach@task_arena_base@internal@interface7@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?internal_enqueue@task_arena_base@internal@interface7@tbb@@IEBAXAEAVtask@4@_J@Z )
+__TBB_SYMBOL( ?internal_execute@task_arena_base@internal@interface7@tbb@@IEBAXAEAVdelegate_base@234@@Z )
+__TBB_SYMBOL( ?internal_wait@task_arena_base@internal@interface7@tbb@@IEBAXXZ )
+#if __TBB_TASK_ISOLATION
+__TBB_SYMBOL( ?isolate_within_arena@internal@interface7@tbb@@YAXAEAVdelegate_base@123@_J@Z )
+#endif /* __TBB_TASK_ISOLATION */
+
+#if !TBB_NO_LEGACY
+// task_v2.cpp
+__TBB_SYMBOL( ?destroy@task@tbb@@QEAAXAEAV12@@Z )
+#endif
+
+// exception handling support
+#if __TBB_TASK_GROUP_CONTEXT
+__TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
+__TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
+__TBB_SYMBOL( ?change_group@task@tbb@@QEAAXAEAVtask_group_context@2@@Z )
+__TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QEBA_NXZ )
+__TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QEAA_NXZ )
+__TBB_SYMBOL( ?reset@task_group_context@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?capture_fp_settings@task_group_context@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?init@task_group_context@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ??1task_group_context@tbb@@QEAA@XZ )
+#if __TBB_TASK_PRIORITY
+__TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QEAAXW4priority_t@2@@Z )
+__TBB_SYMBOL( ?priority@task_group_context@tbb@@QEBA?AW4priority_t@2@XZ )
+#endif /* __TBB_TASK_PRIORITY */
+__TBB_SYMBOL( ?name@captured_exception@tbb@@UEBAPEBDXZ )
+__TBB_SYMBOL( ?what@captured_exception@tbb@@UEBAPEBDXZ )
+__TBB_SYMBOL( ??1captured_exception@tbb@@UEAA@XZ )
+__TBB_SYMBOL( ?move@captured_exception@tbb@@UEAAPEAV12@XZ )
+__TBB_SYMBOL( ?destroy@captured_exception@tbb@@UEAAXXZ )
+__TBB_SYMBOL( ?set@captured_exception@tbb@@QEAAXPEBD0@Z )
+__TBB_SYMBOL( ?clear@captured_exception@tbb@@QEAAXXZ )
+#endif /* __TBB_TASK_GROUP_CONTEXT */
+
+// Symbols for exceptions thrown from TBB
+__TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ )
+__TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z )
+__TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UEBAPEBDXZ )
+__TBB_SYMBOL( ?what@missing_wait@tbb@@UEBAPEBDXZ )
+__TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UEBAPEBDXZ )
+__TBB_SYMBOL( ?what@improper_lock@tbb@@UEBAPEBDXZ )
+__TBB_SYMBOL( ?what@user_abort@tbb@@UEBAPEBDXZ )
+
+// tbb_misc.cpp
+__TBB_SYMBOL( ?assertion_failure@tbb@@YAXPEBDH00@Z )
+__TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YA_KXZ )
+__TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPEBD@Z )
+__TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPEBDH00@ZP6AX0H00@Z@Z )
+__TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPEBDZZ )
+__TBB_SYMBOL( TBB_runtime_interface_version )
+
+// tbb_main.cpp
+__TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPEAXPEBX@Z )
+__TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPEAX0@Z )
+__TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPEAX@Z )
+__TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPEAXPEB_W@Z )
+__TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPEAXPEBX@Z )
+__TBB_SYMBOL( ?itt_make_task_group_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z )
+__TBB_SYMBOL( ?itt_metadata_str_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_KW4string_index@12@PEBD@Z )
+__TBB_SYMBOL( ?itt_relation_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_KW4itt_relation@12@12@Z )
+__TBB_SYMBOL( ?itt_task_begin_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z )
+__TBB_SYMBOL( ?itt_task_end_v7@internal@tbb@@YAXW4itt_domain_enum@12@@Z )
+__TBB_SYMBOL( ?itt_region_begin_v9@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z )
+__TBB_SYMBOL( ?itt_region_end_v9@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K@Z )
+
+
+// pipeline.cpp
+__TBB_SYMBOL( ??0pipeline@tbb@@QEAA@XZ )
+__TBB_SYMBOL( ??1filter@tbb@@UEAA@XZ )
+__TBB_SYMBOL( ??1pipeline@tbb@@UEAA@XZ )
+__TBB_SYMBOL( ??_7pipeline@tbb@@6B@ )
+__TBB_SYMBOL( ?add_filter@pipeline@tbb@@QEAAXAEAVfilter@2@@Z )
+__TBB_SYMBOL( ?clear@pipeline@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?inject_token@pipeline@tbb@@AEAAXAEAVtask@2@@Z )
+__TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_K@Z )
+#if __TBB_TASK_GROUP_CONTEXT
+__TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_KAEAVtask_group_context@2@@Z )
+#endif
+__TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ )
+__TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ )
+__TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IEAAXXZ )
+
+// queuing_rw_mutex.cpp
+__TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAAXAEAV23@_N@Z )
+__TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ )
+__TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ )
+__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NAEAV23@_N@Z )
+
+// reader_writer_lock.cpp
+__TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QEAA_NXZ )
+__TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QEAA_NXZ )
+__TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z )
+__TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z )
+__TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXXZ )
+
+#if !TBB_NO_LEGACY
+// spin_rw_mutex.cpp v2
+__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
+__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
+__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
+__TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
+__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
+__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
+__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
+__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
+__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
+#endif
+
+// spin_rw_mutex v3
+__TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
+__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
+__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
+__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
+
+// spin_mutex.cpp
+__TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AEAAXAEAV23@@Z )
+__TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AEAA_NAEAV23@@Z )
+
+// mutex.cpp
+__TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AEAAXAEAV23@@Z )
+__TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AEAA_NAEAV23@@Z )
+__TBB_SYMBOL( ?internal_construct@mutex@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AEAAXXZ )
+
+// recursive_mutex.cpp
+__TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AEAAXAEAV23@@Z )
+__TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AEAA_NAEAV23@@Z )
+__TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AEAAXXZ )
+
+// queuing_mutex.cpp
+__TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QEAAXAEAV23@@Z )
+__TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QEAA_NAEAV23@@Z )
+
+// critical_section.cpp
+__TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QEAAXXZ )
+
+#if !TBB_NO_LEGACY
+// concurrent_hash_map.cpp
+__TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QEBA_NXZ )
+
+// concurrent_queue.cpp v2
+__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IEAAXAEBV123@@Z )
+__TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IEBA_JXZ )
+__TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IEAA@_K@Z )
+__TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IEAA@AEBVconcurrent_queue_base@12@@Z )
+__TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MEAA@XZ )
+__TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IEAA@XZ )
+__TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IEAAXPEAX@Z )
+__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IEAA_NPEAX@Z )
+__TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IEAAXPEBX@Z )
+__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IEAA_NPEBX@Z )
+__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IEAAX_J_K@Z )
+#endif
+
+// concurrent_queue v3
+__TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@XZ )
+__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@@Z )
+__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@_K@Z )
+__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXAEBV123@@Z )
+__TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IEAA@_K@Z )
+__TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MEAA@XZ )
+__TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IEAAXPEAX@Z )
+__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEAX@Z )
+__TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IEAAXPEBX@Z )
+__TBB_SYMBOL( ?internal_push_move@concurrent_queue_base_v8@internal@tbb@@IEAAXPEBX@Z )
+__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEBX@Z )
+__TBB_SYMBOL( ?internal_push_move_if_not_full@concurrent_queue_base_v8@internal@tbb@@IEAA_NPEBX@Z )
+__TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IEBA_JXZ )
+__TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IEBA_NXZ )
+__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IEAAX_J_K@Z )
+__TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ )
+__TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IEBAXXZ )
+__TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IEAAXAEBV123@@Z )
+__TBB_SYMBOL( ?move_content@concurrent_queue_base_v8@internal@tbb@@IEAAXAEAV123@@Z )
+
+#if !TBB_NO_LEGACY
+// concurrent_vector.cpp v2
+__TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z )
+__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IEBA_KXZ )
+__TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IEAAXP6AXPEAX_K@Z_N@Z )
+__TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z )
+__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IEAA_K_K0P6AXPEAX0@Z@Z )
+__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IEAAX_K0P6AXPEAX0@Z@Z )
+__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IEAAPEAX_KAEA_K@Z )
+__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IEAAX_K00@Z )
+#endif
+
+// concurrent_vector v3
+__TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IEAA@XZ )
+__TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z )
+__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IEBA_KXZ )
+__TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IEAA_KP6AXPEAX_K@Z@Z )
+__TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z )
+__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z )
+__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IEAAX_K0P6AXPEAXPEBX0@Z2@Z )
+__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KAEA_K@Z )
+__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00@Z )
+__TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KPEAXP6AX10@ZP6AX1PEBX0@Z@Z )
+__TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IEAAXAEAV123@@Z )
+__TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IEBAX_K@Z )
+__TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00PEBXP6AXPEAX0@ZP6AX210@Z@Z )
+__TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z )
+
+// tbb_thread
+__TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QEAAXXZ )
+__TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AEAAXP6AIPEAX@Z0@Z )
+__TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPEAX_K@Z )
+__TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPEAX@Z )
+__TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ )
+__TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ )
+__TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXAEBVinterval_t@tick_count@2@@Z )
+__TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAEAVtbb_thread_v3@12@0@Z )
+__TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ )
+
+// condition_variable
+__TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
+__TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAEATcondvar_impl_t@123@PEAVmutex@3@PEBVinterval_t@tick_count@3@@Z )
+__TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
+__TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
+__TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
+
+
+// global parameter
+__TBB_SYMBOL( ?active_value@global_control@interface9@tbb@@CA_KH@Z )
+__TBB_SYMBOL( ?internal_create@global_control@interface9@tbb@@AEAAXXZ )
+__TBB_SYMBOL( ?internal_destroy@global_control@interface9@tbb@@AEAAXXZ )
+
+#undef __TBB_SYMBOL
diff --git a/src/tbbmalloc/TypeDefinitions.h b/src/tbbmalloc/TypeDefinitions.h
index aa6763b0..fffef73d 100644
--- a/src/tbbmalloc/TypeDefinitions.h
+++ b/src/tbbmalloc/TypeDefinitions.h
@@ -25,7 +25,7 @@
# define __ARCH_ipf 1
# elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support
# define __ARCH_x86_32 1
-# elif defined(_M_ARM)
+# elif defined(_M_ARM)||defined(_M_ARM64)
# define __ARCH_other 1
# else
# error Unknown processor architecture for Windows
diff --git a/src/tbbmalloc/winarm64-tbbmalloc-export.def b/src/tbbmalloc/winarm64-tbbmalloc-export.def
new file mode 100644
index 00000000..ec64b015
--- /dev/null
+++ b/src/tbbmalloc/winarm64-tbbmalloc-export.def
@@ -0,0 +1,46 @@
+; Copyright (c) 2005-2020 Intel Corporation
+; Copyright (c) 2022 Linaro Ltd
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+EXPORTS
+
+; frontend.cpp
+scalable_calloc
+scalable_free
+scalable_malloc
+scalable_realloc
+scalable_posix_memalign
+scalable_aligned_malloc
+scalable_aligned_realloc
+scalable_aligned_free
+scalable_msize
+scalable_allocation_mode
+scalable_allocation_command
+__TBB_malloc_safer_free
+__TBB_malloc_safer_realloc
+__TBB_malloc_safer_msize
+__TBB_malloc_safer_aligned_msize
+__TBB_malloc_safer_aligned_realloc
+?pool_create@rml@@YAPEAVMemoryPool@1@_JPEBUMemPoolPolicy@1@@Z
+?pool_create_v1@rml@@YA?AW4MemPoolError@1@_JPEBUMemPoolPolicy@1@PEAPEAVMemoryPool@1@@Z
+?pool_destroy@rml@@YA_NPEAVMemoryPool@1@@Z
+?pool_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K@Z
+?pool_free@rml@@YA_NPEAVMemoryPool@1@PEAX@Z
+?pool_reset@rml@@YA_NPEAVMemoryPool@1@@Z
+?pool_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K@Z
+?pool_aligned_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K2@Z
+?pool_aligned_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K1@Z
+?pool_identify@rml@@YAPEAVMemoryPool@1@PEAX@Z
+?pool_msize@rml@@YA_KPEAVMemoryPool@1@PEAX@Z
+
diff --git a/src/test/harness_fp.h b/src/test/harness_fp.h
index b007e2b8..f6d0066e 100644
--- a/src/test/harness_fp.h
+++ b/src/test/harness_fp.h
@@ -84,7 +84,7 @@ inline void SetSseMode ( int mode ) {
ctl.set_env();
}
-#elif defined(_M_ARM) || defined(__TBB_WIN32_USE_CL_BUILTINS)
+#elif defined(_M_ARM) || defined(_M_ARM64) || defined(__TBB_WIN32_USE_CL_BUILTINS)
const int NumSseModes = 1;
const int SseModes[NumSseModes] = { 0 };

View File

@@ -1,7 +1,8 @@
diff -Naur orig/src/tbbmalloc/proxy.cpp external_tbb/src/tbbmalloc/proxy.cpp
--- orig/src/tbbmalloc/proxy.cpp 2024-10-08 14:43:58 -0600
+++ external_tbb/src/tbbmalloc/proxy.cpp 2024-10-08 14:48:26 -0600
@@ -452,14 +452,12 @@
diff --git a/src/tbbmalloc_proxy/proxy.cpp b/src/tbbmalloc_proxy/proxy.cpp
index a6d3dea06f..954583ba5f 100644
--- a/src/tbbmalloc_proxy/proxy.cpp
+++ b/src/tbbmalloc_proxy/proxy.cpp
@@ -431,14 +431,12 @@ void __TBB_malloc__free_base(void *ptr)
const char* known_bytecodes[] = {
#if _WIN64
// "========================================================" - 56 symbols

View File

@@ -0,0 +1,70 @@
diff --git a/pxr/usd/usdMtlx/reader.cpp b/pxr/usd/usdMtlx/reader.cpp
index f04ab07ac1..aa4d1e65de 100644
--- a/pxr/usd/usdMtlx/reader.cpp
+++ b/pxr/usd/usdMtlx/reader.cpp
@@ -9,6 +9,7 @@
#include "pxr/usd/usdMtlx/reader.h"
#include "pxr/usd/usdMtlx/utils.h"
+#include "pxr/usd/usdGeom/metrics.h"
#include "pxr/usd/usdGeom/primvar.h"
#include "pxr/usd/usdGeom/primvarsAPI.h"
#include "pxr/usd/usdShade/material.h"
@@ -740,11 +741,11 @@ _NodeGraphBuilder::Build(ShaderNamesByOutputName* outputs)
return UsdPrim();
}
- const bool isInsideNodeGraph = _mtlxContainer->isA<mx::NodeGraph>();
+ const bool isExplicitNodeGraph = _mtlxContainer->isA<mx::NodeGraph>();
// Create the USD nodegraph.
UsdPrim usdPrim;
- if (isInsideNodeGraph) {
+ if (isExplicitNodeGraph) {
// Create the nodegraph.
auto usdNodeGraph = UsdShadeNodeGraph::Define(_usdStage, _usdPath);
if (!usdNodeGraph) {
@@ -769,7 +770,7 @@ _NodeGraphBuilder::Build(ShaderNamesByOutputName* outputs)
}
}
else {
- usdPrim = _usdStage->DefinePrim(_usdPath);
+ usdPrim = UsdShadeNodeGraph::Define(_usdStage, _usdPath).GetPrim();
}
// Build the graph of nodes.
@@ -783,19 +784,7 @@ _NodeGraphBuilder::Build(ShaderNamesByOutputName* outputs)
_AddNode(mtlxNode, usdPrim);
}
_ConnectNodes();
-
- if (isInsideNodeGraph) {
- _ConnectTerminals(_mtlxContainer, UsdShadeConnectableAPI(usdPrim));
- }
- else if (outputs) {
- // Collect the outputs on the existing shader nodes.
- for (mx::OutputPtr& mtlxOutput :
- _mtlxContainer->getChildrenOfType<mx::Output>()) {
- if (auto nodeName = _Attr(mtlxOutput, names.nodename)) {
- (*outputs)[_Name(mtlxOutput)] = TfToken(nodeName);
- }
- }
- }
+ _ConnectTerminals(_mtlxContainer, UsdShadeConnectableAPI(usdPrim));
return usdPrim;
}
@@ -2623,6 +2612,13 @@ UsdMtlxRead(
// Translate all materials.
ReadMaterials(mtlxDoc, context);
+ if (!mtlxDoc->getChildren().empty()) {
+ // This metadata is required to pass usdchecker
+ UsdGeomSetStageUpAxis(stage, UsdGeomGetFallbackUpAxis());
+ UsdGeomSetStageMetersPerUnit(stage, UsdGeomLinearUnits::centimeters);
+ stage->SetDefaultPrim(stage->GetPrimAtPath(internalPath));
+ }
+
// If there are no looks then we're done.
if (mtlxDoc->getLooks().empty()) {
return;

View File

@@ -0,0 +1,70 @@
commit 84c1a9f8e5a8c413dea56852894541f0cc28193b
Author: Brecht Van Lommel <brecht@blender.org>
Date: Tue Feb 4 23:33:50 2025 +0100
Fix Metal shader errors with MaterialX 1.39
* mx_microfacet.glsl uses functions from mx_math.metal, so the
latter must be included first.
* Defining atan(y, x) for GLSL compatibility conflicts with
mx_math.metal using ::atan(y_over_x). Work around this by tweaking
the definition.
* textureQueryLevels(u_envRadiance) does not take into account that
this texture is wrapped in a MetalTexture class.
Signed-off-by: Brecht Van Lommel <brecht@blender.org>
diff --git a/pxr/imaging/hdSt/materialXShaderGen.cpp b/pxr/imaging/hdSt/materialXShaderGen.cpp
index 58687a760..8345b6fb2 100644
--- a/pxr/imaging/hdSt/materialXShaderGen.cpp
+++ b/pxr/imaging/hdSt/materialXShaderGen.cpp
@@ -447,8 +447,17 @@ HdStMaterialXShaderGen<Base>::_EmitMxInitFunction(
emitLine("u_envIrradiance = HdGetSampler_domeLightFallback()", mxStage);
emitLine("u_envRadiance = HdGetSampler_domeLightFallback()", mxStage);
emitLine("#endif", mxStage, false);
+ emitLine("u_envRadianceMips = textureQueryLevels(u_envRadiance)", mxStage);
+ }
+ else {
+ if (std::is_same_v<Base, MaterialX::MslShaderGenerator>) {
+ // Msl has this wrapped in a MetalTexture class
+ emitLine("u_envRadianceMips = textureQueryLevels(u_envRadiance.tex)", mxStage);
+ }
+ else {
+ emitLine("u_envRadianceMips = textureQueryLevels(u_envRadiance)", mxStage);
+ }
}
- emitLine("u_envRadianceMips = textureQueryLevels(u_envRadiance)", mxStage);
Base::emitLineBreak(mxStage);
// Initialize MaterialX Texture samplers with HdGetSampler equivalents
@@ -1309,12 +1318,12 @@ HdStMaterialXShaderGenMsl::_EmitMxFunctions(
mx::GenContext& mxContext,
mx::ShaderStage& mxStage) const
{
- mx::ShaderGenerator::emitLibraryInclude(
- "pbrlib/" + mx::GlslShaderGenerator::TARGET
- + "/lib/mx_microfacet.glsl", mxContext, mxStage);
mx::ShaderGenerator::emitLibraryInclude(
"stdlib/" + mx::MslShaderGenerator::TARGET
+ "/lib/mx_math.metal", mxContext, mxStage);
+ mx::ShaderGenerator::emitLibraryInclude(
+ "pbrlib/" + mx::GlslShaderGenerator::TARGET
+ + "/lib/mx_microfacet.glsl", mxContext, mxStage);
_EmitConstantsUniformsAndTypeDefs(
mxContext, mxStage,_syntax->getConstantQualifier());
diff --git a/pxr/imaging/hgiMetal/shaderGenerator.mm b/pxr/imaging/hgiMetal/shaderGenerator.mm
index f1db1beb1..6ace76999 100644
--- a/pxr/imaging/hgiMetal/shaderGenerator.mm
+++ b/pxr/imaging/hgiMetal/shaderGenerator.mm
@@ -515,7 +515,9 @@ _ComputeHeader(id<MTLDevice> device, HgiShaderStage stage)
"template <typename T>\n"
"T mod(T y, T x) { return fmod(y, x); }\n\n"
"template <typename T>\n"
- "T atan(T y, T x) { return atan2(y, x); }\n\n"
+ "T atan(T y_over_x) { return ::atan(y_over_x); }\n\n"
+ "template <typename T>\n"
+ "T atan(T y, T x) { return ::atan2(y, x); }\n\n"
"template <typename T>\n"
"T bitfieldReverse(T x) { return reverse_bits(x); }\n\n"
"template <typename T>\n"

View File

@@ -0,0 +1,14 @@
diff --git a/pxr/usd/usd/crateFile.cpp b/pxr/usd/usd/crateFile.cpp
index 55c6d71e1..5d0fcbcfa 100644
--- a/pxr/usd/usd/crateFile.cpp
+++ b/pxr/usd/usd/crateFile.cpp
@@ -102,7 +102,8 @@ TF_REGISTRY_FUNCTION(TfType) {
TfType::Define<Usd_CrateFile::TimeSamples>();
}
-#define DEFAULT_NEW_VERSION "0.10.0"
+// BLENDER: Keep USD files forward compatible for longer.
+#define DEFAULT_NEW_VERSION "0.9.0"
TF_DEFINE_ENV_SETTING(
USD_WRITE_NEW_USDC_FILES_AS_VERSION, DEFAULT_NEW_VERSION,
"When writing new Usd Crate files, write them as this version. "

View File

@@ -1,46 +0,0 @@
From 4f05a62018ee5134843f7cefed826585f13a509b Mon Sep 17 00:00:00 2001
From: Dhruv Govil <dgovil2@apple.com>
Date: Mon, 3 Jun 2024 15:31:34 -0700
Subject: [PATCH] Fix shader compile bug when using EDF in Storm
Fixes
https://github.com/PixarAnimationStudios/OpenUSD/issues/3105
Thanks to Lee Kerley for the fix
---
pxr/imaging/hdSt/materialXShaderGen.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pxr/imaging/hdSt/materialXShaderGen.cpp b/pxr/imaging/hdSt/materialXShaderGen.cpp
index ca1806bf03..8b0e1a3a41 100644
--- a/pxr/imaging/hdSt/materialXShaderGen.cpp
+++ b/pxr/imaging/hdSt/materialXShaderGen.cpp
@@ -692,7 +692,6 @@ HdStMaterialXShaderGen<Base>::_EmitConstantsUniformsAndTypeDefs(
mxContext.getOptions().hwDirectionalAlbedoMethod)),
mxStage, false);
Base::emitLineBreak(mxStage);
- Base::emitTypeDefinitions(mxContext, mxStage);
// Add all constants and ensure that values are initialized
const mx::VariableBlock& constants = mxStage.getConstantBlock();
@@ -945,6 +944,10 @@ HdStMaterialXShaderGenGlsl::_EmitMxFunctions(
mx::ShaderGenerator::emitLibraryInclude(
"stdlib/" + mx::GlslShaderGenerator::TARGET
+ "/lib/mx_math.glsl", mxContext, mxStage);
+
+ // Add type definitions
+ emitTypeDefinitions(mxContext, mxStage);
+
_EmitConstantsUniformsAndTypeDefs(
mxContext, mxStage, _syntax->getConstantQualifier());
@@ -1106,6 +1109,9 @@ HdStMaterialXShaderGenMsl::_EmitGlslfxMetalShader(
addStageUniform(mx::HW::LIGHT_DATA, mx::Type::FLOAT,
"shadowOcclusion", mxStage);
+ // Add type definitions
+ emitTypeDefinitions(mxContext, mxStage);
+
// Add type definitions
emitConstantBufferDeclarations(mxContext, resourceBindingCtx, mxStage);

View File

@@ -0,0 +1,11 @@
--- a/cmake/defaults/Packages.cmake 2025-01-22 08:14:27
+++ b/cmake/defaults/Packages.cmake 2025-01-22 08:14:41
@@ -20,7 +20,7 @@
find_package(Threads REQUIRED)
set(PXR_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}")
-if((PXR_ENABLE_PYTHON_SUPPORT AND PXR_USE_BOOST_PYTHON) OR PXR_ENABLE_OPENVDB_SUPPORT)
+if(PXR_ENABLE_PYTHON_SUPPORT AND PXR_USE_BOOST_PYTHON)
# Find Boost package before getting any boost specific components as we need to
# disable boost-provided cmake config, based on the boost version found.
find_package(Boost REQUIRED)

View File

@@ -129,11 +129,10 @@ if %ERRORLEVEL% NEQ 0 (
set StatusFile=%BUILD_DIR%\%1_%2.log
set original_path=%path%
set oiio_paths=%Staging%\%BuildDir%%ARCH%R\Release\openimageio\bin
set boost_paths=%Staging%\%BuildDir%%ARCH%R\Release\boost\lib
set openexr_paths=%Staging%\%BuildDir%%ARCH%R\Release\openexr\bin
set imath_paths=%Staging%\%BuildDir%%ARCH%R\Release\imath\bin
set tbb_paths=%Staging%\%BuildDir%%ARCH%R\Release\tbb\bin
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%boost_paths%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
mkdir %STAGING%\%BuildDir%%ARCH%R
cd %Staging%\%BuildDir%%ARCH%R
echo %DATE% %TIME% : Start > %StatusFile%
@@ -150,11 +149,10 @@ cd %BUILD_DIR%
mkdir %STAGING%\%BuildDir%%ARCH%D
cd %Staging%\%BuildDir%%ARCH%D
set oiio_paths=%Staging%\%BuildDir%%ARCH%D\Debug\openimageio\bin
set boost_paths=%Staging%\%BuildDir%%ARCH%D\Debug\boost\lib
set openexr_paths=%Staging%\%BuildDir%%ARCH%D\Debug\openexr\bin
set imath_paths=%Staging%\%BuildDir%%ARCH%D\Debug\imath\bin
set tbb_paths=%Staging%\%BuildDir%%ARCH%D\Debug\tbb\bin
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%boost_paths%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
if "%dobuild%" == "1" (

View File

@@ -251,6 +251,17 @@ if(WITH_IMAGE_WEBP)
find_package(WebP REQUIRED)
endif()
# With Blender 4.4 libraries there is no more Boost. This code is only
# here until we can reasonably assume everyone has upgraded to them.
if(WITH_BOOST)
if(DEFINED LIBDIR AND NOT EXISTS "${LIBDIR}/boost")
set(WITH_BOOST OFF)
set(BOOST_LIBRARIES)
set(BOOST_PYTHON_LIBRARIES)
set(BOOST_INCLUDE_DIR)
endif()
endif()
if(WITH_BOOST)
set(Boost_NO_BOOST_CMAKE ON)
set(Boost_ROOT ${LIBDIR}/boost)

View File

@@ -464,6 +464,18 @@ if(WITH_MATERIALX)
endif()
add_bundled_libraries(materialx/lib)
# With Blender 4.4 libraries there is no more Boost. But Linux distros may have
# older versions of libs like USD with a header dependency on Boost, so can't
# remove this entirely yet.
if(WITH_BOOST)
if(DEFINED LIBDIR AND NOT EXISTS "${LIBDIR}/boost")
set(WITH_BOOST OFF)
set(BOOST_LIBRARIES)
set(BOOST_PYTHON_LIBRARIES)
set(BOOST_INCLUDE_DIR)
endif()
endif()
if(WITH_BOOST)
# uses in build instructions to override include and library variables
if(NOT BOOST_CUSTOM)

View File

@@ -99,7 +99,7 @@ endif()
list(APPEND PLATFORM_LINKLIBS
ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 Comctl32 version
advapi32 shfolder shell32 ole32 oleaut32 uuid psapi Dbghelp Shlwapi
pathcch Shcore Dwmapi Crypt32
pathcch Shcore Dwmapi Crypt32 Bcrypt
)
if(WITH_INPUT_IME)
@@ -652,30 +652,40 @@ if(WITH_PYTHON)
endif()
if(NOT WITH_WINDOWS_FIND_MODULES)
# even if boost is off, we still need to install the dlls when we use our lib folder since
# some of the other dependencies may need them. For this to work, BOOST_VERSION,
# BOOST_POSTFIX, and BOOST_DEBUG_POSTFIX need to be set.
set(BOOST ${LIBDIR}/boost)
set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(BOOST_LIBPATH ${BOOST}/lib)
set(BOOST_VERSION_HEADER ${BOOST_INCLUDE_DIR}/boost/version.hpp)
if(EXISTS ${BOOST_VERSION_HEADER})
file(STRINGS "${BOOST_VERSION_HEADER}" BOOST_LIB_VERSION REGEX "#define BOOST_LIB_VERSION ")
if(BOOST_LIB_VERSION MATCHES "#define BOOST_LIB_VERSION \"([0-9_]+)\"")
set(BOOST_VERSION "${CMAKE_MATCH_1}")
endif()
endif()
if(NOT BOOST_VERSION)
message(FATAL_ERROR "Unable to determine Boost version")
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
set(BOOST_POSTFIX "vc143-mt-a64-${BOOST_VERSION}")
set(BOOST_DEBUG_POSTFIX "vc143-mt-gyd-a64-${BOOST_VERSION}")
set(BOOST_PREFIX "")
# With Blender 4.4 libraries there is no more Boost. This code is only
# here until we can reasonably assume everyone has upgraded to them.
if(EXISTS "${LIBDIR}" AND NOT EXISTS "${BOOST}")
set(WITH_BOOST OFF)
set(BOOST_LIBRARIES)
set(BOOST_PYTHON_LIBRARIES)
set(BOOST_INCLUDE_DIR)
else()
set(BOOST_POSTFIX "vc142-mt-x64-${BOOST_VERSION}")
set(BOOST_DEBUG_POSTFIX "vc142-mt-gyd-x64-${BOOST_VERSION}")
set(BOOST_PREFIX "")
# For older libraries when boost is off, we still need to install the dlls when
# since some of the other dependencies may need them. For this to work, BOOST_VERSION,
# BOOST_POSTFIX, and BOOST_DEBUG_POSTFIX need to be set.
set(BOOST_VERSION_HEADER ${BOOST_INCLUDE_DIR}/boost/version.hpp)
if(EXISTS ${BOOST_VERSION_HEADER})
file(STRINGS "${BOOST_VERSION_HEADER}" BOOST_LIB_VERSION REGEX "#define BOOST_LIB_VERSION ")
if(BOOST_LIB_VERSION MATCHES "#define BOOST_LIB_VERSION \"([0-9_]+)\"")
set(BOOST_VERSION "${CMAKE_MATCH_1}")
endif()
endif()
if(NOT BOOST_VERSION)
message(FATAL_ERROR "Unable to determine Boost version")
endif()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
set(BOOST_POSTFIX "vc143-mt-a64-${BOOST_VERSION}")
set(BOOST_DEBUG_POSTFIX "vc143-mt-gyd-a64-${BOOST_VERSION}")
set(BOOST_PREFIX "")
else()
set(BOOST_POSTFIX "vc142-mt-x64-${BOOST_VERSION}")
set(BOOST_DEBUG_POSTFIX "vc142-mt-gyd-x64-${BOOST_VERSION}")
set(BOOST_PREFIX "")
endif()
endif()
endif()
@@ -910,10 +920,17 @@ endif()
if(WITH_TBB)
windows_find_package(TBB)
if(NOT TBB_FOUND)
set(TBB_LIBRARIES
optimized ${LIBDIR}/tbb/lib/tbb.lib
debug ${LIBDIR}/tbb/lib/tbb_debug.lib
)
if(EXISTS ${LIBDIR}/tbb/lib/tbb12.lib) # 4.4
set(TBB_LIBRARIES
optimized ${LIBDIR}/tbb/lib/tbb12.lib
debug ${LIBDIR}/tbb/lib/tbb12_debug.lib
)
else() # 4.3-
set(TBB_LIBRARIES
optimized ${LIBDIR}/tbb/lib/tbb.lib
debug ${LIBDIR}/tbb/lib/tbb_debug.lib
)
endif()
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
if(WITH_TBB_MALLOC_PROXY)

View File

@@ -558,6 +558,18 @@ if(WITH_OPENCOLORIO)
)
endif()
if(WIN32)
if(EXISTS ${LIBDIR}/osl/lib/python${PYTHON_VERSION}/site-packages/oslquery) # 4.4+
install(
DIRECTORY ${LIBDIR}/osl/lib/python${PYTHON_VERSION}/site-packages/oslquery
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
install(
DIRECTORY ${LIBDIR}/osl/lib/python${PYTHON_VERSION}_debug/site-packages/oslquery
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Debug
)
endif()
if(EXISTS ${LIBDIR}/osl/bin/oslquery.dll) # 4.1+
windows_install_shared_manifest(
FILES
@@ -576,25 +588,15 @@ if(WIN32)
DEBUG
)
endif()
if(EXISTS ${LIBDIR}/opencolorio/bin/opencolorio_2_2.dll) # 3.5
if(EXISTS ${LIBDIR}/opencolorio/bin/opencolorio_2_4.dll) # 4.4
windows_install_shared_manifest(
FILES ${LIBDIR}/opencolorio/bin/opencolorio_2_2.dll
FILES ${LIBDIR}/opencolorio/bin/opencolorio_2_4.dll
RELEASE
)
windows_install_shared_manifest(
FILES ${LIBDIR}/opencolorio/bin/opencolorio_d_2_2.dll
FILES ${LIBDIR}/opencolorio/bin/opencolorio_d_2_4.dll
DEBUG
)
install(
FILES ${LIBDIR}/opencolorio/lib/site-packages-debug/PyOpenColorIO_d.pyd
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Debug
)
install(
FILES ${LIBDIR}/opencolorio/lib/site-packages/PyOpenColorIO.pyd
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
endif()
if(EXISTS ${LIBDIR}/opencolorio/bin/opencolorio_2_3.dll) # 4.1
windows_install_shared_manifest(
@@ -605,17 +607,17 @@ if(WIN32)
FILES ${LIBDIR}/opencolorio/bin/opencolorio_d_2_3.dll
DEBUG
)
install(
DIRECTORY ${LIBDIR}/opencolorio/lib/site-packages-debug/PyOpenColorIO
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Debug
)
install(
DIRECTORY ${LIBDIR}/opencolorio/lib/site-packages/PyOpenColorIO
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
endif()
install(
DIRECTORY ${LIBDIR}/opencolorio/lib/site-packages-debug/PyOpenColorIO
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Debug
)
install(
DIRECTORY ${LIBDIR}/opencolorio/lib/site-packages/PyOpenColorIO
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
if(EXISTS ${LIBDIR}/OpenImageDenoise/bin/openimagedenoise.dll) # 4.0
windows_install_shared_manifest(
FILES
@@ -1238,7 +1240,8 @@ elseif(WIN32)
endif()
endif()
if(WITH_PYTHON_INSTALL)
# VFX libs are bundled with both Blender executable and Python module.
if(WITH_PYTHON_INSTALL OR WITH_PYTHON_MODULE)
# NOTE: as far as python is concerned `RelWithDebInfo`
# is not debug since its without debug flags.
@@ -1293,25 +1296,6 @@ elseif(WIN32)
CONFIGURATIONS Debug
)
if(WINDOWS_PYTHON_DEBUG)
install(
FILES
${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}.pdb
DESTINATION "."
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
install(
FILES
${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}_d.pdb
DESTINATION "."
CONFIGURATIONS Debug
)
endif()
endif()
# VFX libs are bundled with both Blender executable and Python module.
if(WITH_PYTHON_INSTALL OR WITH_PYTHON_MODULE)
# This will only exist for 3.5+.
if(EXISTS ${LIBDIR}/openimageio/lib/python${PYTHON_VERSION}/site-packages)
install(
@@ -1379,6 +1363,7 @@ elseif(WIN32)
set(_openvdb_arch amd64)
endif()
# 4.3
if(EXISTS ${LIBDIR}/openvdb/python/pyopenvdb_d.cp${_PYTHON_VERSION_NO_DOTS}-win_${_openvdb_arch}.pyd)
install(
FILES ${LIBDIR}/openvdb/python/pyopenvdb_d.cp${_PYTHON_VERSION_NO_DOTS}-win_${_openvdb_arch}.pyd
@@ -1391,7 +1376,19 @@ elseif(WIN32)
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
endif()
# 4.4
if(EXISTS ${LIBDIR}/openvdb/python/openvdb_d.cp${_PYTHON_VERSION_NO_DOTS}-win_${_openvdb_arch}.pyd)
install(
FILES ${LIBDIR}/openvdb/python/openvdb_d.cp${_PYTHON_VERSION_NO_DOTS}-win_${_openvdb_arch}.pyd
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Debug
)
install(
FILES ${LIBDIR}/openvdb/python/openvdb.cp${_PYTHON_VERSION_NO_DOTS}-win_${_openvdb_arch}.pyd
DESTINATION ${TARGETDIR_SITE_PACKAGES}
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
endif()
# MaterialX python bindings
install(
DIRECTORY ${LIBDIR}/materialx/python/Release/MaterialX
@@ -1411,6 +1408,24 @@ elseif(WIN32)
)
endif()
if(WITH_PYTHON_INSTALL)
if(WINDOWS_PYTHON_DEBUG)
install(
FILES
${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}.pdb
DESTINATION "."
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
)
install(
FILES
${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}/libs/python${_PYTHON_VERSION_NO_DOTS}_d.pdb
DESTINATION "."
CONFIGURATIONS Debug
)
endif()
endif()
endif()
# Filenames change slightly between FFMPEG versions check both 6.0 and fallback to 5.0
@@ -1438,16 +1453,29 @@ elseif(WIN32)
ALL
)
endif()
windows_install_shared_manifest(
FILES
${LIBDIR}/tbb/bin/tbb.dll
RELEASE
)
windows_install_shared_manifest(
FILES
${LIBDIR}/tbb/bin/tbb_debug.dll
DEBUG
)
if(EXISTS ${LIBDIR}/tbb/bin/tbb12.dll) # 4.4
windows_install_shared_manifest(
FILES
${LIBDIR}/tbb/bin/tbb12.dll
RELEASE
)
windows_install_shared_manifest(
FILES
${LIBDIR}/tbb/bin/tbb12_debug.dll
DEBUG
)
else()
windows_install_shared_manifest(
FILES
${LIBDIR}/tbb/bin/tbb.dll
RELEASE
)
windows_install_shared_manifest(
FILES
${LIBDIR}/tbb/bin/tbb_debug.dll
DEBUG
)
endif()
if(WITH_TBB_MALLOC_PROXY)
windows_install_shared_manifest(
FILES
@@ -1711,18 +1739,18 @@ if(WITH_PYTHON_MODULE AND LIBDIR AND NOT WIN32)
DIRECTORY ${LIBDIR}/python/lib/python${PYTHON_VERSION}/site-packages/PyOpenColorIO
DESTINATION ${TARGETDIR_SITE_PACKAGES})
install(
FILES ${LIBDIR}/python/lib/python${PYTHON_VERSION}/site-packages/oslquery.so
DIRECTORY ${LIBDIR}/python/lib/python${PYTHON_VERSION}/site-packages/oslquery
DESTINATION ${TARGETDIR_SITE_PACKAGES} OPTIONAL)
install(
DIRECTORY ${LIBDIR}/python/lib/python${PYTHON_VERSION}/site-packages/pxr
DESTINATION ${TARGETDIR_SITE_PACKAGES})
if(APPLE)
set(_pyopenvdb_filename pyopenvdb.cpython-${PYTHON_VERSION_NO_DOTS}-darwin.so)
set(_openvdb_filename openvdb.cpython-${PYTHON_VERSION_NO_DOTS}-darwin.so)
else()
set(_pyopenvdb_filename pyopenvdb.cpython-${PYTHON_VERSION_NO_DOTS}-${CMAKE_SYSTEM_PROCESSOR}-linux-gnu.so)
set(_openvdb_filename openvdb.cpython-${PYTHON_VERSION_NO_DOTS}-${CMAKE_SYSTEM_PROCESSOR}-linux-gnu.so)
endif()
install(
FILES ${LIBDIR}/python/lib/python${PYTHON_VERSION}/site-packages/${_pyopenvdb_filename}
FILES ${LIBDIR}/python/lib/python${PYTHON_VERSION}/site-packages/${_openvdb_filename}
DESTINATION ${TARGETDIR_SITE_PACKAGES})
endif()
@@ -1916,7 +1944,7 @@ if((DEFINED LIBDIR) AND TARGETDIR_LIB AND WITH_MATERIALX)
)
endif()
if(WIN32)
if(WIN32 AND EXISTS ${BOOST_LIBPATH})
set(BOOST_COMPONENTS atomic chrono date_time filesystem
iostreams locale program_options regex
serialization system thread wave wserialization

View File

@@ -16,4 +16,10 @@ from pxr import Usd
import MaterialX
import OpenImageIO
import PyOpenColorIO
import pyopenvdb
# Test both old and new names, remove when all 4.4 libs have landed.
try:
import pyopenvdb
except ModuleNotFoundError:
import openvdb
import oslquery

View File

@@ -34,7 +34,13 @@ from pxr import Usd
import MaterialX
import OpenImageIO
import PyOpenColorIO
import pyopenvdb
# Test both old and new names, remove when all 4.4 libs have landed.
try:
import pyopenvdb
except ModuleNotFoundError:
import openvdb
import oslquery
# Test modules in bundled Python standalone executable.
if app == "Blender":

View File

@@ -20,6 +20,8 @@ BLOCKLIST_ALL = [
"hair_instancer_uv.blend",
"principled_hair_directcoloring.blend",
"visibility_particles.blend",
# Temporarily blocked for 4.4 lib upgrade, due to PNG alpha minor difference.
"image_log_osl.blend",
]
# Blocklist that disables OSL specific tests for configurations that do not support OSL backend.