From a923a34de19cc83a9a687995de7203e64a4a5b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 9 Feb 2021 10:38:41 +0100 Subject: =?UTF-8?q?CMake/Deps:=20upgrade=20USD=2020.05=20=E2=86=92=2021.02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit USD version 21.02 includes two of the changes Blender used to patch in, which have now been removed from `usd.diff`. Unfortunately 21.02 introduces another issue where LZ4 symbols are accidentally exported, causing linker errors. Fortunately these symbols are only used for resting, so I added a patch hunk that simply removes their `extern "C"` declaration. The LZ4 linker issue has been reported upstream at https://github.com/PixarAnimationStudios/USD/issues/1447. Reviewed By: sebbas, mont29 Differential Revision: https://developer.blender.org/D10367 --- build_files/build_environment/cmake/versions.cmake | 4 +- build_files/build_environment/patches/usd.diff | 58 ++++++++++------------ 2 files changed, 28 insertions(+), 34 deletions(-) (limited to 'build_files') diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 8eff4c3180d..4a879c793a1 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -297,9 +297,9 @@ set(EMBREE_VERSION 3.10.0) set(EMBREE_URI https://github.com/embree/embree/archive/v${EMBREE_VERSION}.zip) set(EMBREE_HASH 4bbe29e7eaa46417efc75fc5f1e8eb87) -set(USD_VERSION 20.05) +set(USD_VERSION 21.02) set(USD_URI https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz) -set(USD_HASH 6d679e739e7f65725d9c029e37dda9fc) +set(USD_HASH 1dd1e2092d085ed393c1f7c450a4155a) set(OIDN_VERSION 1.3.0) set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz) diff --git a/build_files/build_environment/patches/usd.diff b/build_files/build_environment/patches/usd.diff index 27b4955f849..42527a4f443 100644 --- a/build_files/build_environment/patches/usd.diff +++ b/build_files/build_environment/patches/usd.diff @@ -26,36 +26,30 @@ diff -Naur external_usd_base/cmake/macros/Public.cmake external_usd/cmake/macros endforeach() foreach(lib ${PXR_OBJECT_LIBS}) set(objects "${objects};\$") - -diff --git a/pxr/base/arch/align.h b/pxr/base/arch/align.h -index f3cabf4..ebc8a69 100644 ---- a/pxr/base/arch/align.h -+++ b/pxr/base/arch/align.h -@@ -77,7 +77,11 @@ ArchAlignMemory(void *base) - /// The size of a CPU cache line on the current processor architecture in bytes. - /// - /// \hideinitializer -+#if defined(ARCH_OS_DARWIN) && defined(ARCH_CPU_ARM) -+#define ARCH_CACHE_LINE_SIZE 128 -+#else - #define ARCH_CACHE_LINE_SIZE 64 -+#endif +diff -ru USD-20.11/pxr/base/tf/pxrLZ4/lz4.cpp external_usd/pxr/base/tf/pxrLZ4/lz4.cpp +--- USD-20.11/pxr/base/tf/pxrLZ4/lz4.cpp 2020-10-14 19:25:19.000000000 +0100 ++++ external_usd/pxr/base/tf/pxrLZ4/lz4.cpp 2021-02-09 09:28:51.496190085 +0000 +@@ -614,6 +614,15 @@ + /*-************************************ + * Internal Definitions used in Tests + **************************************/ ++ ++/******************************************************************* ++ * Disabled in Blender. The BLOSC library also exposes these ++ * functions, and this causes 'duplicate symbol' linker errors. ++ * ++ * This problem has been reported upstream at ++ * https://github.com/PixarAnimationStudios/USD/issues/1447 ++ * ++ ******************************************************************* + #if defined (__cplusplus) + extern "C" { + #endif +@@ -627,6 +636,7 @@ + #if defined (__cplusplus) + } + #endif ++********************************************************************/ - ///@} - -diff --git a/pxr/base/arch/math.h b/pxr/base/arch/math.h -index 3e66c37..64a052c 100644 ---- a/pxr/base/arch/math.h -+++ b/pxr/base/arch/math.h -@@ -42,7 +42,7 @@ PXR_NAMESPACE_OPEN_SCOPE - /// \addtogroup group_arch_Math - ///@{ - --#if defined (ARCH_CPU_INTEL) || defined(doxygen) -+#if defined (ARCH_CPU_INTEL) || defined(ARCH_CPU_ARM) || defined(doxygen) - - /// This is the smallest value e such that 1+e^2 == 1, using floats. - /// True for all IEEE754 chipsets. - - - + /*-****************************** + * Compression functions -- cgit v1.2.3