Compare commits
29 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07ce80652a | ||
|
|
f5a3fd00e0 | ||
|
|
0efef3a625 | ||
|
|
e384650dca | ||
|
|
e0d1abcfac | ||
|
|
b8ae07c43d | ||
|
|
d7db70a14d | ||
|
|
099d5a046b | ||
|
|
1165f5708e | ||
|
|
0a6b2117ff | ||
|
|
f168f46d3a | ||
|
|
d4e3de7a80 | ||
|
|
ba33ab88f9 | ||
|
|
a93ed447d6 | ||
|
|
f764fa904f | ||
|
|
099daf1d9a | ||
|
|
fb80c784af | ||
|
|
d7483c1c0d | ||
|
|
b5e913b0f3 | ||
|
|
1fe1ef6bbd | ||
|
|
ff3482cdbe | ||
|
|
d4a03cc10d | ||
|
|
97117864dd | ||
|
|
201f8d224f | ||
|
|
b804423325 | ||
|
|
1fef8f6c76 | ||
|
|
6172607253 | ||
|
|
734e75b372 | ||
|
|
c8eae5d8a6 |
14 changed files with 366 additions and 601 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -20,3 +20,7 @@
|
|||
/OpenUSD-25.05.tar.gz
|
||||
/OpenUSD-25.05.01.tar.gz
|
||||
/OpenUSD-25.08.tar.gz
|
||||
/OpenUSD-25.11.tar.gz
|
||||
/OpenUSD-26.03.tar.gz
|
||||
/OpenUSD-26.05.tar.gz
|
||||
/OpenUSD-26.08.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 483ce5b8e320e89016fff7b3480216ba94c032ff Mon Sep 17 00:00:00 2001
|
||||
From ee4e9b30e14133e35c23821d3dc7aa93df354a38 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Fri, 27 Oct 2023 12:56:58 -0400
|
||||
Subject: [PATCH] Downstream-only: add an SONAME version
|
||||
|
|
@ -33,14 +33,14 @@ built with -DPXR_BUILD_EXAMPLES=OFF, but it is.)
|
|||
---
|
||||
cmake/defaults/Version.cmake | 6 ++++++
|
||||
cmake/macros/Private.cmake | 1 +
|
||||
cmake/macros/Public.cmake | 1 +
|
||||
3 files changed, 8 insertions(+)
|
||||
cmake/macros/Public.cmake | 2 ++
|
||||
3 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/cmake/defaults/Version.cmake b/cmake/defaults/Version.cmake
|
||||
index 447c74e4d..a990f071b 100644
|
||||
index c31b5e8d9..fabb45397 100644
|
||||
--- a/cmake/defaults/Version.cmake
|
||||
+++ b/cmake/defaults/Version.cmake
|
||||
@@ -10,3 +10,9 @@ set(PXR_MINOR_VERSION "25")
|
||||
@@ -10,3 +10,9 @@ set(PXR_MINOR_VERSION "26")
|
||||
set(PXR_PATCH_VERSION "8") # NOTE: Must not have leading 0 for single digits
|
||||
|
||||
math(EXPR PXR_VERSION "${PXR_MAJOR_VERSION} * 10000 + ${PXR_MINOR_VERSION} * 100 + ${PXR_PATCH_VERSION}")
|
||||
|
|
@ -51,29 +51,37 @@ index 447c74e4d..a990f071b 100644
|
|||
+ "Downstream shared object version"
|
||||
+)
|
||||
diff --git a/cmake/macros/Private.cmake b/cmake/macros/Private.cmake
|
||||
index 6fe1134c1..06aecd083 100644
|
||||
index cddb4e095..5e4b4603a 100644
|
||||
--- a/cmake/macros/Private.cmake
|
||||
+++ b/cmake/macros/Private.cmake
|
||||
@@ -1372,6 +1372,7 @@ function(_pxr_library NAME)
|
||||
@@ -1355,6 +1355,7 @@ function(_pxr_library NAME)
|
||||
FOLDER "${folder}"
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
IMPORT_PREFIX "${args_PREFIX}"
|
||||
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
|
||||
PREFIX "${args_PREFIX}"
|
||||
SUFFIX "${args_SUFFIX}"
|
||||
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
|
||||
)
|
||||
|
||||
target_compile_definitions(${NAME}
|
||||
diff --git a/cmake/macros/Public.cmake b/cmake/macros/Public.cmake
|
||||
index 807cf7d83..7225af783 100644
|
||||
index 5f6a5456b..553b645ec 100644
|
||||
--- a/cmake/macros/Public.cmake
|
||||
+++ b/cmake/macros/Public.cmake
|
||||
@@ -1121,6 +1121,7 @@ function(pxr_toplevel_prologue)
|
||||
FOLDER "${folder}"
|
||||
@@ -415,6 +415,7 @@ function(pxr_library NAME)
|
||||
TYPE "${args_TYPE}"
|
||||
PREFIX "${prefix}"
|
||||
SUFFIX "${suffix}"
|
||||
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
|
||||
SUBDIR "${subdir}"
|
||||
CPPFILES "${args_CPPFILES};${${NAME}_CPPFILES}"
|
||||
PUBLIC_HEADERS "${args_PUBLIC_HEADERS};${${NAME}_PUBLIC_HEADERS}"
|
||||
@@ -1213,6 +1214,7 @@ function(pxr_toplevel_prologue)
|
||||
PREFIX "${libPrefix}"
|
||||
IMPORT_PREFIX "${libPrefix}"
|
||||
OUTPUT_NAME ${libName}
|
||||
+ SOVERSION ${PXR_DOWNSTREAM_SOVERSION}
|
||||
)
|
||||
_get_install_dir("lib" libInstallPrefix)
|
||||
install(
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 75d4451fa64e086edd9d621af681df13cebde5eb Mon Sep 17 00:00:00 2001
|
||||
From 817e23674f1b4ba62481c4e9794f0665a44d83f8 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Fri, 1 Aug 2025 08:47:41 -0400
|
||||
Subject: [PATCH] Downstream-only: use Valgrind macro instead of inline
|
||||
|
|
@ -13,7 +13,7 @@ on aarch64.
|
|||
1 file changed, 3 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/pxr/exec/vdf/executorDataVector.cpp b/pxr/exec/vdf/executorDataVector.cpp
|
||||
index 12f9e517e..7e5625678 100644
|
||||
index 96dacca06..7e5625678 100644
|
||||
--- a/pxr/exec/vdf/executorDataVector.cpp
|
||||
+++ b/pxr/exec/vdf/executorDataVector.cpp
|
||||
@@ -11,40 +11,18 @@
|
||||
|
|
@ -35,7 +35,7 @@ index 12f9e517e..7e5625678 100644
|
|||
static inline void
|
||||
Vdf_ExecutorDataVector_ValgrindMakeDefined(void *ptr, size_t size)
|
||||
{
|
||||
-#if defined(ARCH_OS_LINUX)
|
||||
-#if defined(ARCH_OS_LINUX) && defined(ARCH_CPU_INTEL)
|
||||
- // Pass a result and a pointer to some arguments via registers
|
||||
- volatile unsigned long long int result;
|
||||
- volatile unsigned long long int args[6] = {
|
||||
|
|
@ -61,5 +61,5 @@ index 12f9e517e..7e5625678 100644
|
|||
|
||||
Vdf_ExecutorDataVector::~Vdf_ExecutorDataVector()
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 23bda0e3337d7a27696a000a47eaf36840650c69 Mon Sep 17 00:00:00 2001
|
||||
From 2d851f23e912d8312f2ea6818963150a8c484138 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Wed, 28 Aug 2024 10:42:48 -0400
|
||||
Subject: [PATCH 1/6] Downstream-only: use the system double-conversion library
|
||||
|
|
@ -8,10 +8,10 @@ Subject: [PATCH 1/6] Downstream-only: use the system double-conversion library
|
|||
1 file changed, 3 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/pxr/base/tf/CMakeLists.txt b/pxr/base/tf/CMakeLists.txt
|
||||
index fade8d559..5d9272087 100644
|
||||
index 4294f2cb5..b45df65b8 100644
|
||||
--- a/pxr/base/tf/CMakeLists.txt
|
||||
+++ b/pxr/base/tf/CMakeLists.txt
|
||||
@@ -110,11 +110,14 @@ function(add_py_dll_link_test)
|
||||
@@ -105,11 +105,14 @@ function(add_py_dll_link_test)
|
||||
|
||||
endfunction()
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ index fade8d559..5d9272087 100644
|
|||
|
||||
PUBLIC_CLASSES
|
||||
anyUniquePtr
|
||||
@@ -278,14 +281,6 @@ pxr_library(tf
|
||||
@@ -276,14 +279,6 @@ pxr_library(tf
|
||||
|
||||
CPPFILES
|
||||
initConfig.cpp
|
||||
|
|
@ -42,5 +42,5 @@ index fade8d559..5d9272087 100644
|
|||
|
||||
PYMODULE_CPPFILES
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
110
0001-Replace-PyWeakref_GetObject-with-PyWeakref_GetRef.patch
Normal file
110
0001-Replace-PyWeakref_GetObject-with-PyWeakref_GetRef.patch
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
From f3e9600db6086e834c0503cdaf30b5ba7ed53ceb Mon Sep 17 00:00:00 2001
|
||||
From: Anonymous Coward <nobody@redhat.com>
|
||||
Date: Sun, 26 Jul 2026 16:13:18 +0200
|
||||
Subject: [PATCH] Replace PyWeakref_GetObject with PyWeakref_GetRef
|
||||
|
||||
PyWeakref_GetObject was removed in Python 3.15. Replace all four call
|
||||
sites with PyWeakref_GetRef, which returns a strong reference instead
|
||||
of a borrowed one, and adjust reference counting accordingly.
|
||||
|
||||
In Tf_PyIdHandle::Ptr(), return Py_None when the referent is dead to
|
||||
match the original behaviour (previously returned NULL erroneously).
|
||||
|
||||
In Tf_PyWeakObject::GetObject(), explicitly return a Python None object
|
||||
on failure, matching the original semantics exactly.
|
||||
|
||||
Fixes: https://github.com/PixarAnimationStudios/OpenUSD/issues/3966
|
||||
|
||||
Assisted-by: Claude Opus 4.6
|
||||
Reviewed-by: OpenUSD Maintainers <usd-maintainers@fedoraproject.org>
|
||||
---
|
||||
pxr/base/tf/pyFunction.h | 13 +++++++++----
|
||||
pxr/base/tf/pyIdentity.cpp | 10 +++++++++-
|
||||
pxr/base/tf/pyWeakObject.cpp | 12 +++++++++---
|
||||
3 files changed, 27 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/pxr/base/tf/pyFunction.h b/pxr/base/tf/pyFunction.h
|
||||
index 85af943b2..f77b5b71b 100644
|
||||
--- a/pxr/base/tf/pyFunction.h
|
||||
+++ b/pxr/base/tf/pyFunction.h
|
||||
@@ -49,11 +49,13 @@ struct TfPyFunctionFromPython<Ret (Args...)>
|
||||
using namespace pxr_boost::python;
|
||||
// Attempt to get the referenced callable object.
|
||||
TfPyLock lock;
|
||||
- object callable(handle<>(borrowed(PyWeakref_GetObject(weak.ptr()))));
|
||||
- if (TfPyIsNone(callable)) {
|
||||
+ PyObject *rawCallable = NULL;
|
||||
+ if (PyWeakref_GetRef(weak.ptr(), &rawCallable) <= 0) {
|
||||
TF_WARN("Tried to call an expired python callback");
|
||||
return Ret();
|
||||
}
|
||||
+ // PyWeakref_GetRef returns a strong reference; handle<> steals it.
|
||||
+ object callable{handle<>(rawCallable)};
|
||||
return TfPyCall<Ret>(callable)(args...);
|
||||
}
|
||||
};
|
||||
@@ -68,12 +70,15 @@ struct TfPyFunctionFromPython<Ret (Args...)>
|
||||
// Attempt to get the referenced self parameter, then build a new
|
||||
// instance method and call it.
|
||||
TfPyLock lock;
|
||||
- PyObject *self = PyWeakref_GetObject(weakSelf.ptr());
|
||||
- if (self == Py_None) {
|
||||
+ PyObject *self = NULL;
|
||||
+ if (PyWeakref_GetRef(weakSelf.ptr(), &self) <= 0) {
|
||||
TF_WARN("Tried to call a method on an expired python instance");
|
||||
return Ret();
|
||||
}
|
||||
+ // PyWeakref_GetRef returns a strong reference to self; PyMethod_New
|
||||
+ // takes its own reference, so release ours afterward.
|
||||
object method(handle<>(PyMethod_New(func.ptr(), self)));
|
||||
+ Py_DECREF(self);
|
||||
return TfPyCall<Ret>(method)(args...);
|
||||
}
|
||||
};
|
||||
diff --git a/pxr/base/tf/pyIdentity.cpp b/pxr/base/tf/pyIdentity.cpp
|
||||
index 5389d8f25..06b7f9b0c 100644
|
||||
--- a/pxr/base/tf/pyIdentity.cpp
|
||||
+++ b/pxr/base/tf/pyIdentity.cpp
|
||||
@@ -136,7 +136,15 @@ PyObject *
|
||||
Tf_PyIdHandle::Ptr() const {
|
||||
if (_weakRef) {
|
||||
TfPyLock lock;
|
||||
- return PyWeakref_GetObject(_weakRef);
|
||||
+ PyObject *obj = NULL;
|
||||
+ if (PyWeakref_GetRef(_weakRef, &obj) > 0) {
|
||||
+ // Return a borrowed-style reference: decrement so the caller
|
||||
+ // does not need to release. Safe because the GIL is held by
|
||||
+ // all callers.
|
||||
+ Py_DECREF(obj);
|
||||
+ return obj;
|
||||
+ }
|
||||
+ return Py_None; // dead referent → match original behaviour
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
diff --git a/pxr/base/tf/pyWeakObject.cpp b/pxr/base/tf/pyWeakObject.cpp
|
||||
index 8cfddc729..ecdd7f705 100644
|
||||
--- a/pxr/base/tf/pyWeakObject.cpp
|
||||
+++ b/pxr/base/tf/pyWeakObject.cpp
|
||||
@@ -115,9 +115,15 @@ Tf_PyWeakObject::GetOrCreate(pxr_boost::python::object const &obj)
|
||||
pxr_boost::python::object
|
||||
Tf_PyWeakObject::GetObject() const
|
||||
{
|
||||
- return pxr_boost::python::object
|
||||
- (pxr_boost::python::handle<>
|
||||
- (pxr_boost::python::borrowed(PyWeakref_GetObject(_weakRef.get()))));
|
||||
+ PyObject *obj = NULL;
|
||||
+ if (PyWeakref_GetRef(_weakRef.get(), &obj) > 0) {
|
||||
+ // PyWeakref_GetRef returns a strong reference; handle<> steals it.
|
||||
+ return pxr_boost::python::object(
|
||||
+ pxr_boost::python::handle<>(obj));
|
||||
+ }
|
||||
+ // Dead referent: return Py_None explicitly, as the original did.
|
||||
+ return pxr_boost::python::object(
|
||||
+ pxr_boost::python::handle<>(pxr_boost::python::borrowed(Py_None)));
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
2.55.0
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 3492a9fb0fccfe52ed5258e943381d48d28be3e5 Mon Sep 17 00:00:00 2001
|
||||
From 9fd6089b3e95bb882199ee359fbba83f7c4bb410 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Thu, 29 Aug 2024 13:30:18 -0400
|
||||
Subject: [PATCH 2/6] Downstream-only: use the system lz4 library
|
||||
|
|
@ -8,10 +8,10 @@ Subject: [PATCH 2/6] Downstream-only: use the system lz4 library
|
|||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pxr/base/tf/CMakeLists.txt b/pxr/base/tf/CMakeLists.txt
|
||||
index 5d9272087..c4130882c 100644
|
||||
index b45df65b8..5e6de96da 100644
|
||||
--- a/pxr/base/tf/CMakeLists.txt
|
||||
+++ b/pxr/base/tf/CMakeLists.txt
|
||||
@@ -111,6 +111,8 @@ function(add_py_dll_link_test)
|
||||
@@ -106,6 +106,8 @@ function(add_py_dll_link_test)
|
||||
endfunction()
|
||||
|
||||
find_library(double-conversion_LIBRARY NAMES double-conversion REQUIRED)
|
||||
|
|
@ -20,7 +20,7 @@ index 5d9272087..c4130882c 100644
|
|||
|
||||
pxr_library(tf
|
||||
LIBRARIES
|
||||
@@ -118,6 +120,10 @@ pxr_library(tf
|
||||
@@ -113,6 +115,10 @@ pxr_library(tf
|
||||
${WINLIBS}
|
||||
TBB::tbb
|
||||
${double-conversion_LIBRARY}
|
||||
|
|
@ -31,7 +31,7 @@ index 5d9272087..c4130882c 100644
|
|||
|
||||
PUBLIC_CLASSES
|
||||
anyUniquePtr
|
||||
@@ -281,7 +287,6 @@ pxr_library(tf
|
||||
@@ -279,7 +285,6 @@ pxr_library(tf
|
||||
|
||||
CPPFILES
|
||||
initConfig.cpp
|
||||
|
|
@ -40,5 +40,5 @@ index 5d9272087..c4130882c 100644
|
|||
PYMODULE_CPPFILES
|
||||
module.cpp
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
From 98f62852495fb2c86047eff532a3af2a5b88792b Mon Sep 17 00:00:00 2001
|
||||
From 73637a9bf67b3f7afe5070e5d56b07524e14a073 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Fri, 30 Aug 2024 09:32:08 -0400
|
||||
Subject: [PATCH 3/6] Downstream-only: use the system pugixml library
|
||||
|
||||
---
|
||||
.../renderman-26/plugin/rmanArgsParser/CMakeLists.txt | 6 +++---
|
||||
third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/third_party/renderman-26/plugin/rmanArgsParser/CMakeLists.txt b/third_party/renderman-26/plugin/rmanArgsParser/CMakeLists.txt
|
||||
diff --git a/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt b/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt
|
||||
index 244f27aa8..1e00413c4 100644
|
||||
--- a/third_party/renderman-26/plugin/rmanArgsParser/CMakeLists.txt
|
||||
+++ b/third_party/renderman-26/plugin/rmanArgsParser/CMakeLists.txt
|
||||
--- a/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt
|
||||
+++ b/third_party/renderman/plugin/rmanArgsParser/CMakeLists.txt
|
||||
@@ -1,6 +1,8 @@
|
||||
set(PXR_PREFIX "")
|
||||
set(PXR_PACKAGE rmanArgsParser)
|
||||
|
|
@ -35,5 +35,5 @@ index 244f27aa8..1e00413c4 100644
|
|||
PRIVATE_HEADERS
|
||||
api.h
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
From aa1063129297e469ddd709c7ee4d0406f9bae08f Mon Sep 17 00:00:00 2001
|
||||
From f331a476a66e41e93d83b7a2e438d3ee7f12ea32 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Sat, 31 Aug 2024 11:08:18 -0400
|
||||
Subject: [PATCH 4/6] Downstream-only: use the system rapidjson library
|
||||
|
||||
---
|
||||
pxr/base/js/CMakeLists.txt | 37 -------------------------------------
|
||||
1 file changed, 37 deletions(-)
|
||||
pxr/base/js/CMakeLists.txt | 40 --------------------------------------
|
||||
1 file changed, 40 deletions(-)
|
||||
|
||||
diff --git a/pxr/base/js/CMakeLists.txt b/pxr/base/js/CMakeLists.txt
|
||||
index d59dc1f6d..086d1bc48 100644
|
||||
index 8cbda8c52..ec8f3c249 100644
|
||||
--- a/pxr/base/js/CMakeLists.txt
|
||||
+++ b/pxr/base/js/CMakeLists.txt
|
||||
@@ -15,43 +15,6 @@ pxr_library(js
|
||||
@@ -15,46 +15,6 @@ pxr_library(js
|
||||
converter.h
|
||||
types.h
|
||||
|
||||
- PRIVATE_HEADERS
|
||||
- rapidjson/allocators.h
|
||||
- rapidjson/cursorstreamwrapper.h
|
||||
- rapidjson/document.h
|
||||
- rapidjson/encodedstream.h
|
||||
- rapidjson/encodings.h
|
||||
|
|
@ -26,6 +27,7 @@ index d59dc1f6d..086d1bc48 100644
|
|||
- rapidjson/filewritestream.h
|
||||
- rapidjson/fwd.h
|
||||
- rapidjson/internal/biginteger.h
|
||||
- rapidjson/internal/clzll.h
|
||||
- rapidjson/internal/diyfp.h
|
||||
- rapidjson/internal/dtoa.h
|
||||
- rapidjson/internal/ieee754.h
|
||||
|
|
@ -50,11 +52,12 @@ index d59dc1f6d..086d1bc48 100644
|
|||
- rapidjson/schema.h
|
||||
- rapidjson/stream.h
|
||||
- rapidjson/stringbuffer.h
|
||||
- rapidjson/uri.h
|
||||
- rapidjson/writer.h
|
||||
-
|
||||
DOXYGEN_FILES
|
||||
overview.dox
|
||||
)
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
From 4b1c527468f9c43e04a1ff773cec6a9f9ca0b5ae Mon Sep 17 00:00:00 2001
|
||||
From a537b44edabe942380d2e87ea7069bdf32b93dbc Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Sun, 1 Sep 2024 21:30:11 -0400
|
||||
Subject: [PATCH 5/6] Downstream-only: use the system libdeflate
|
||||
|
||||
---
|
||||
pxr/imaging/hio/CMakeLists.txt | 7 +++++++
|
||||
pxr/imaging/hio/OpenEXR/OpenEXRCore/compression.c | 3 +--
|
||||
pxr/imaging/hio/OpenEXR/OpenEXRCoreUnity.h | 12 ------------
|
||||
pxr/imaging/hio/CMakeLists.txt | 7 +++++++
|
||||
.../hioOpenEXR/OpenEXR/OpenEXRCore/compression.c | 3 +--
|
||||
.../plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h | 12 ------------
|
||||
3 files changed, 8 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/pxr/imaging/hio/CMakeLists.txt b/pxr/imaging/hio/CMakeLists.txt
|
||||
index 75e1e6298..09264c600 100644
|
||||
index e61fc7c54..7cfbe9d70 100644
|
||||
--- a/pxr/imaging/hio/CMakeLists.txt
|
||||
+++ b/pxr/imaging/hio/CMakeLists.txt
|
||||
@@ -1,6 +1,9 @@
|
||||
|
|
@ -34,10 +34,10 @@ index 75e1e6298..09264c600 100644
|
|||
|
||||
PUBLIC_CLASSES
|
||||
fieldTextureData
|
||||
diff --git a/pxr/imaging/hio/OpenEXR/OpenEXRCore/compression.c b/pxr/imaging/hio/OpenEXR/OpenEXRCore/compression.c
|
||||
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c
|
||||
index a672e833b..1d2eaea56 100644
|
||||
--- a/pxr/imaging/hio/OpenEXR/OpenEXRCore/compression.c
|
||||
+++ b/pxr/imaging/hio/OpenEXR/OpenEXRCore/compression.c
|
||||
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c
|
||||
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/compression.c
|
||||
@@ -8,8 +8,7 @@
|
||||
#include "internal_memory.h"
|
||||
#include "internal_structs.h"
|
||||
|
|
@ -48,10 +48,10 @@ index a672e833b..1d2eaea56 100644
|
|||
|
||||
#if ( \
|
||||
LIBDEFLATE_VERSION_MAJOR > 1 || \
|
||||
diff --git a/pxr/imaging/hio/OpenEXR/OpenEXRCoreUnity.h b/pxr/imaging/hio/OpenEXR/OpenEXRCoreUnity.h
|
||||
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h
|
||||
index 7481a346e..71bdde9cc 100644
|
||||
--- a/pxr/imaging/hio/OpenEXR/OpenEXRCoreUnity.h
|
||||
+++ b/pxr/imaging/hio/OpenEXR/OpenEXRCoreUnity.h
|
||||
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h
|
||||
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCoreUnity.h
|
||||
@@ -8,18 +8,6 @@
|
||||
|
||||
#include "OpenEXRCore/openexr_config.h"
|
||||
|
|
@ -72,5 +72,5 @@ index 7481a346e..71bdde9cc 100644
|
|||
|
||||
#include "OpenEXRCore/attributes.c"
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 8ebd20bf9e0e945457215dba1d56a25408f860a6 Mon Sep 17 00:00:00 2001
|
||||
From f2a3615238a691e11a4029c33498e7f21a34fff9 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Wed, 4 Sep 2024 11:09:47 -0400
|
||||
Subject: [PATCH 6/6] Downstream-only: use the system libavif
|
||||
|
|
@ -9,7 +9,7 @@ Subject: [PATCH 6/6] Downstream-only: use the system libavif
|
|||
2 files changed, 7 insertions(+), 189 deletions(-)
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hioAvif/AVIFImage.cpp b/pxr/imaging/plugin/hioAvif/AVIFImage.cpp
|
||||
index 81549fb54..d2dfb1bcd 100644
|
||||
index b56369ee5..c6fcb4a6c 100644
|
||||
--- a/pxr/imaging/plugin/hioAvif/AVIFImage.cpp
|
||||
+++ b/pxr/imaging/plugin/hioAvif/AVIFImage.cpp
|
||||
@@ -30,7 +30,7 @@ ARCH_PRAGMA_UNUSED_FUNCTION
|
||||
|
|
@ -19,10 +19,10 @@ index 81549fb54..d2dfb1bcd 100644
|
|||
-#include "pxr/imaging/plugin/hioAvif/AVIF/src/avif/avif.h"
|
||||
+#include <avif/avif.h>
|
||||
|
||||
#if defined(PXR_STATIC)
|
||||
# define HIOAVIF_API
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hioAvif/CMakeLists.txt b/pxr/imaging/plugin/hioAvif/CMakeLists.txt
|
||||
index f4eaeea15..7f1680eaf 100644
|
||||
index 1ac2683f6..7d583c137 100644
|
||||
--- a/pxr/imaging/plugin/hioAvif/CMakeLists.txt
|
||||
+++ b/pxr/imaging/plugin/hioAvif/CMakeLists.txt
|
||||
@@ -1,6 +1,9 @@
|
||||
|
|
@ -237,5 +237,5 @@ index f4eaeea15..7f1680eaf 100644
|
|||
|
||||
RESOURCE_FILES
|
||||
--
|
||||
2.50.1
|
||||
2.55.0
|
||||
|
||||
|
|
|
|||
510
2313.patch
510
2313.patch
|
|
@ -1,510 +0,0 @@
|
|||
From 97de29467ef3ee2e9f9952b7158f9cbad51dac2a Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Thu, 23 Feb 2023 14:17:02 -0700
|
||||
Subject: [PATCH 1/7] build_usd.py: wrap the TBB_ROOT parameter value in double
|
||||
quotes when building Embree
|
||||
|
||||
This ensures that slash characters are properly escaped on Windows.
|
||||
---
|
||||
build_scripts/build_usd.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py
|
||||
index 40f6c3296c..ec1a268d78 100644
|
||||
--- a/build_scripts/build_usd.py
|
||||
+++ b/build_scripts/build_usd.py
|
||||
@@ -1587,7 +1587,7 @@ def InstallMaterialX(context, force, buildArgs):
|
||||
def InstallEmbree(context, force, buildArgs):
|
||||
with CurrentWorkingDirectory(DownloadURL(EMBREE_URL, context, force)):
|
||||
extraArgs = [
|
||||
- '-DTBB_ROOT={instDir}'.format(instDir=context.instDir),
|
||||
+ '-DTBB_ROOT="{instDir}"'.format(instDir=context.instDir),
|
||||
'-DEMBREE_TUTORIALS=OFF',
|
||||
'-DEMBREE_ISPC_SUPPORT=OFF'
|
||||
]
|
||||
|
||||
From 2679ca564baca476ff7beee448b6d6a85b91a339 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Thu, 23 Feb 2023 12:20:39 -0700
|
||||
Subject: [PATCH 2/7] FindEmbree.cmake: add support for finding Embree versions
|
||||
3 or 4
|
||||
|
||||
---
|
||||
cmake/modules/FindEmbree.cmake | 41 +++++++++++++++++++++-------------
|
||||
1 file changed, 26 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/cmake/modules/FindEmbree.cmake b/cmake/modules/FindEmbree.cmake
|
||||
index cd52f6b7f5..4c4ff1cdb2 100644
|
||||
--- a/cmake/modules/FindEmbree.cmake
|
||||
+++ b/cmake/modules/FindEmbree.cmake
|
||||
@@ -19,12 +19,30 @@
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
+find_path(EMBREE_INCLUDE_DIR
|
||||
+ embree4/rtcore.h
|
||||
+ embree3/rtcore.h
|
||||
+HINTS
|
||||
+ "${EMBREE_LOCATION}/include"
|
||||
+ "$ENV{EMBREE_LOCATION}/include"
|
||||
+DOC
|
||||
+ "Embree headers path"
|
||||
+)
|
||||
+
|
||||
+if (EMBREE_INCLUDE_DIR AND EXISTS "${EMBREE_INCLUDE_DIR}/embree4/rtcore.h")
|
||||
+ set(EMBREE_VERSIONED_LIBRARY_NAME "embree4")
|
||||
+ set(EMBREE_VERSION_HEADER_FILE_NAME "rtcore_config.h")
|
||||
+else()
|
||||
+ set(EMBREE_VERSIONED_LIBRARY_NAME "embree3")
|
||||
+ set(EMBREE_VERSION_HEADER_FILE_NAME "rtcore_version.h")
|
||||
+endif()
|
||||
+
|
||||
if (APPLE)
|
||||
- set (EMBREE_LIB_NAME libembree3.dylib)
|
||||
+ set (EMBREE_LIB_NAME "lib${EMBREE_VERSIONED_LIBRARY_NAME}.dylib")
|
||||
elseif (UNIX)
|
||||
- set (EMBREE_LIB_NAME libembree3.so)
|
||||
+ set (EMBREE_LIB_NAME "lib${EMBREE_VERSIONED_LIBRARY_NAME}.so")
|
||||
elseif (WIN32)
|
||||
- set (EMBREE_LIB_NAME embree3.lib)
|
||||
+ set (EMBREE_LIB_NAME "${EMBREE_VERSIONED_LIBRARY_NAME}.lib")
|
||||
endif()
|
||||
|
||||
find_library(EMBREE_LIBRARY
|
||||
@@ -38,21 +56,14 @@ find_library(EMBREE_LIBRARY
|
||||
"Embree library path"
|
||||
)
|
||||
|
||||
-find_path(EMBREE_INCLUDE_DIR
|
||||
- embree3/rtcore.h
|
||||
-HINTS
|
||||
- "${EMBREE_LOCATION}/include"
|
||||
- "$ENV{EMBREE_LOCATION}/include"
|
||||
-DOC
|
||||
- "Embree headers path"
|
||||
-)
|
||||
+set(EMBREE_VERSION_HEADER_FILE_PATH "${EMBREE_INCLUDE_DIR}/${EMBREE_VERSIONED_LIBRARY_NAME}/${EMBREE_VERSION_HEADER_FILE_NAME}")
|
||||
|
||||
-if (EMBREE_INCLUDE_DIR AND EXISTS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" )
|
||||
- file(STRINGS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_MAJOR.*$")
|
||||
+if (EMBREE_INCLUDE_DIR AND EXISTS "${EMBREE_VERSION_HEADER_FILE_PATH}")
|
||||
+ file(STRINGS "${EMBREE_VERSION_HEADER_FILE_PATH}" TMP REGEX "^#define RTC_VERSION_MAJOR.*$")
|
||||
string(REGEX MATCHALL "[0-9]+" MAJOR ${TMP})
|
||||
- file(STRINGS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_MINOR.*$")
|
||||
+ file(STRINGS "${EMBREE_VERSION_HEADER_FILE_PATH}" TMP REGEX "^#define RTC_VERSION_MINOR.*$")
|
||||
string(REGEX MATCHALL "[0-9]+" MINOR ${TMP})
|
||||
- file(STRINGS "${EMBREE_INCLUDE_DIR}/embree3/rtcore_version.h" TMP REGEX "^#define RTC_VERSION_PATCH.*$")
|
||||
+ file(STRINGS "${EMBREE_VERSION_HEADER_FILE_PATH}" TMP REGEX "^#define RTC_VERSION_PATCH.*$")
|
||||
string(REGEX MATCHALL "[0-9]+" PATCH ${TMP})
|
||||
|
||||
set (EMBREE_VERSION ${MAJOR}.${MINOR}.${PATCH})
|
||||
|
||||
From c3db8a5d3c7040433f845a99b5c1ff57e5003f31 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Thu, 16 Feb 2023 16:37:11 -0700
|
||||
Subject: [PATCH 3/7] hdEmbree: add support for building against Embree
|
||||
versions 3 or 4
|
||||
|
||||
This supports upgrading Embree to a major version 4 release, so it includes
|
||||
handling for the change in file paths between "embree3" and "embree4" and also
|
||||
accounts for a small change in API in version 4. RTCIntersectContext was
|
||||
renamed to RTCRayQueryContext, but it was also made part of the optional
|
||||
RTCIntersectArguments parameter to rtcIntersect and rtcOccluded functions.
|
||||
Since the context is not used by hdEmbree, it no longer needs to be provided.
|
||||
---
|
||||
pxr/imaging/plugin/hdEmbree/CMakeLists.txt | 6 ++++++
|
||||
pxr/imaging/plugin/hdEmbree/context.h | 6 +++++-
|
||||
pxr/imaging/plugin/hdEmbree/mesh.h | 9 +++++++--
|
||||
pxr/imaging/plugin/hdEmbree/meshSamplers.h | 9 +++++++--
|
||||
pxr/imaging/plugin/hdEmbree/pch.h | 6 ++++++
|
||||
pxr/imaging/plugin/hdEmbree/renderDelegate.h | 7 ++++++-
|
||||
pxr/imaging/plugin/hdEmbree/renderParam.h | 6 +++++-
|
||||
pxr/imaging/plugin/hdEmbree/renderer.cpp | 8 ++++++++
|
||||
pxr/imaging/plugin/hdEmbree/renderer.h | 9 +++++++--
|
||||
pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp | 7 ++++++-
|
||||
10 files changed, 63 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/CMakeLists.txt b/pxr/imaging/plugin/hdEmbree/CMakeLists.txt
|
||||
index 96ac989d6c..d843804a15 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/CMakeLists.txt
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/CMakeLists.txt
|
||||
@@ -11,6 +11,12 @@ if (NOT ${PXR_BUILD_GPU_SUPPORT})
|
||||
return()
|
||||
endif()
|
||||
|
||||
+if (EMBREE_VERSION VERSION_GREATER_EQUAL 4.0.0)
|
||||
+ add_definitions(-DPXR_EMBREE_MAJOR_VERSION=4)
|
||||
+else()
|
||||
+ add_definitions(-DPXR_EMBREE_MAJOR_VERSION=3)
|
||||
+endif()
|
||||
+
|
||||
pxr_plugin(hdEmbree
|
||||
LIBRARIES
|
||||
plug
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/context.h b/pxr/imaging/plugin/hdEmbree/context.h
|
||||
index 4165adb1e6..7e5c099b74 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/context.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/context.h
|
||||
@@ -14,7 +14,11 @@
|
||||
#include "pxr/base/gf/matrix4f.h"
|
||||
#include "pxr/base/vt/array.h"
|
||||
|
||||
-#include <embree3/rtcore.h>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/mesh.h b/pxr/imaging/plugin/hdEmbree/mesh.h
|
||||
index bbb006302f..a6f71f110f 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/mesh.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/mesh.h
|
||||
@@ -15,8 +15,13 @@
|
||||
|
||||
#include "pxr/imaging/plugin/hdEmbree/meshSamplers.h"
|
||||
|
||||
-#include <embree3/rtcore.h>
|
||||
-#include <embree3/rtcore_ray.h>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+ #include <embree4/rtcore_ray.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+ #include <embree3/rtcore_ray.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/meshSamplers.h b/pxr/imaging/plugin/hdEmbree/meshSamplers.h
|
||||
index c32c35fffa..51459a2ed4 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/meshSamplers.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/meshSamplers.h
|
||||
@@ -12,8 +12,13 @@
|
||||
#include "pxr/imaging/hd/meshUtil.h"
|
||||
#include "pxr/base/vt/types.h"
|
||||
|
||||
-#include <embree3/rtcore.h>
|
||||
-#include <embree3/rtcore_geometry.h>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+ #include <embree4/rtcore_geometry.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+ #include <embree3/rtcore_geometry.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
|
||||
#include <bitset>
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/pch.h b/pxr/imaging/plugin/hdEmbree/pch.h
|
||||
index 4e16a844d7..901e93859f 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/pch.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/pch.h
|
||||
@@ -76,9 +76,15 @@
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+#include <embree4/rtcore.h>
|
||||
+#include <embree4/rtcore_geometry.h>
|
||||
+#include <embree4/rtcore_ray.h>
|
||||
+#else
|
||||
#include <embree3/rtcore.h>
|
||||
#include <embree3/rtcore_geometry.h>
|
||||
#include <embree3/rtcore_ray.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
#ifdef PXR_PYTHON_SUPPORT_ENABLED
|
||||
#include "pxr/base/tf/pySafePython.h"
|
||||
#endif // PXR_PYTHON_SUPPORT_ENABLED
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/renderDelegate.h b/pxr/imaging/plugin/hdEmbree/renderDelegate.h
|
||||
index 1d8694daa6..826d020e04 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/renderDelegate.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/renderDelegate.h
|
||||
@@ -13,8 +13,13 @@
|
||||
#include "pxr/imaging/plugin/hdEmbree/renderer.h"
|
||||
#include "pxr/base/tf/staticTokens.h"
|
||||
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+
|
||||
#include <mutex>
|
||||
-#include <embree3/rtcore.h>
|
||||
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/renderParam.h b/pxr/imaging/plugin/hdEmbree/renderParam.h
|
||||
index 206a7458bc..af94ef10a4 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/renderParam.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/renderParam.h
|
||||
@@ -11,7 +11,11 @@
|
||||
#include "pxr/imaging/hd/renderDelegate.h"
|
||||
#include "pxr/imaging/hd/renderThread.h"
|
||||
|
||||
-#include <embree3/rtcore.h>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
|
||||
PXR_NAMESPACE_OPEN_SCOPE
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/renderer.cpp b/pxr/imaging/plugin/hdEmbree/renderer.cpp
|
||||
index cc8ddb0270..8cbf8d4959 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/renderer.cpp
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/renderer.cpp
|
||||
@@ -709,9 +709,13 @@ HdEmbreeRenderer::_TraceRay(unsigned int x, unsigned int y,
|
||||
rayHit.ray.flags = 0;
|
||||
_PopulateRayHit(&rayHit, origin, dir, 0.0f);
|
||||
{
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ rtcIntersect1(_scene, &rayHit);
|
||||
+#else
|
||||
RTCIntersectContext context;
|
||||
rtcInitIntersectContext(&context);
|
||||
rtcIntersect1(_scene, &context, &rayHit);
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
//
|
||||
// there is something odd about how this is used in Embree. Is it reversed
|
||||
// here and then when it it used in
|
||||
@@ -1047,9 +1051,13 @@ HdEmbreeRenderer::_ComputeAmbientOcclusion(GfVec3f const& position,
|
||||
shadow.flags = 0;
|
||||
_PopulateRay(&shadow, position, shadowDir, 0.001f);
|
||||
{
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ rtcOccluded1(_scene, &shadow);
|
||||
+#else
|
||||
RTCIntersectContext context;
|
||||
rtcInitIntersectContext(&context);
|
||||
rtcOccluded1(_scene,&context,&shadow);
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
}
|
||||
|
||||
// Record this AO ray's contribution to the occlusion factor: a
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/renderer.h b/pxr/imaging/plugin/hdEmbree/renderer.h
|
||||
index 2da9880848..913b83eccc 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/renderer.h
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/renderer.h
|
||||
@@ -15,8 +15,13 @@
|
||||
#include "pxr/base/gf/matrix4d.h"
|
||||
#include "pxr/base/gf/rect2i.h"
|
||||
|
||||
-#include <embree3/rtcore.h>
|
||||
-#include <embree3/rtcore_ray.h>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+ #include <embree4/rtcore_ray.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+ #include <embree3/rtcore_ray.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
|
||||
#include <random>
|
||||
#include <atomic>
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp b/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp
|
||||
index 02c2ca69f8..45370dfed0 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/testenv/testHdEmbree.cpp
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
#include "pxr/base/tf/errorMark.h"
|
||||
|
||||
-#include <embree3/rtcore.h>
|
||||
+#if defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+ #include <embree4/rtcore.h>
|
||||
+#else
|
||||
+ #include <embree3/rtcore.h>
|
||||
+#endif // defined(PXR_EMBREE_MAJOR_VERSION) && PXR_EMBREE_MAJOR_VERSION >= 4
|
||||
+
|
||||
#include <iostream>
|
||||
|
||||
PXR_NAMESPACE_USING_DIRECTIVE
|
||||
|
||||
From 9c67986d0a7e76babead0d1fdf5190f264c1a8b9 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Wed, 24 Jul 2024 10:07:44 -0400
|
||||
Subject: [PATCH 4/7] build_usd.py: update Embree URLs to reflect new home in
|
||||
the RenderKit GitHub organization
|
||||
|
||||
---
|
||||
build_scripts/build_usd.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py
|
||||
index ec1a268d78..afa4763c8d 100644
|
||||
--- a/build_scripts/build_usd.py
|
||||
+++ b/build_scripts/build_usd.py
|
||||
@@ -1580,9 +1580,9 @@ def InstallMaterialX(context, force, buildArgs):
|
||||
# For MacOS we use version 3.13.3 to include a fix from Intel
|
||||
# to build on Apple Silicon.
|
||||
if MacOS():
|
||||
- EMBREE_URL = "https://github.com/embree/embree/archive/v3.13.3.zip"
|
||||
+ EMBREE_URL = "https://github.com/RenderKit/embree/archive/v3.13.3.zip"
|
||||
else:
|
||||
- EMBREE_URL = "https://github.com/embree/embree/archive/v3.2.2.zip"
|
||||
+ EMBREE_URL = "https://github.com/RenderKit/embree/archive/v3.2.2.zip"
|
||||
|
||||
def InstallEmbree(context, force, buildArgs):
|
||||
with CurrentWorkingDirectory(DownloadURL(EMBREE_URL, context, force)):
|
||||
|
||||
From 0e3f0e8b595e74312c7fbd1b378a96d3b5e85723 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Thu, 23 Feb 2023 12:25:24 -0700
|
||||
Subject: [PATCH 5/7] build_usd.py: add an option to choose Embree 3 or Embree
|
||||
4
|
||||
|
||||
The new --embree-major-version option can be given to build_usd.py to select
|
||||
between Embree 3 or Embree 4. By default, Embree 3 is still used, preserving
|
||||
the existing behavior.
|
||||
---
|
||||
build_scripts/build_usd.py | 31 ++++++++++++++++++++++++-------
|
||||
1 file changed, 24 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py
|
||||
index afa4763c8d..f932c85b5d 100644
|
||||
--- a/build_scripts/build_usd.py
|
||||
+++ b/build_scripts/build_usd.py
|
||||
@@ -1577,14 +1577,19 @@ def InstallMaterialX(context, force, buildArgs):
|
||||
|
||||
############################################################
|
||||
# Embree
|
||||
-# For MacOS we use version 3.13.3 to include a fix from Intel
|
||||
-# to build on Apple Silicon.
|
||||
-if MacOS():
|
||||
- EMBREE_URL = "https://github.com/RenderKit/embree/archive/v3.13.3.zip"
|
||||
-else:
|
||||
- EMBREE_URL = "https://github.com/RenderKit/embree/archive/v3.2.2.zip"
|
||||
+
|
||||
+EMBREE_DEFAULT_MAJOR_VERSION = 3
|
||||
|
||||
def InstallEmbree(context, force, buildArgs):
|
||||
+ if context.embreeMajorVersion >= 4:
|
||||
+ EMBREE_URL = "https://github.com/RenderKit/embree/archive/refs/tags/v4.4.0.zip"
|
||||
+ elif MacOS():
|
||||
+ # For MacOS we use version 3.13.3 to include a fix from Intel
|
||||
+ # to build on Apple Silicon.
|
||||
+ EMBREE_URL = "https://github.com/RenderKit/embree/archive/refs/tags/v3.13.3.zip"
|
||||
+ else:
|
||||
+ EMBREE_URL = "https://github.com/RenderKit/embree/archive/refs/tags/v3.2.2.zip"
|
||||
+
|
||||
with CurrentWorkingDirectory(DownloadURL(EMBREE_URL, context, force)):
|
||||
extraArgs = [
|
||||
'-DTBB_ROOT="{instDir}"'.format(instDir=context.instDir),
|
||||
@@ -1601,7 +1606,9 @@ def InstallEmbree(context, force, buildArgs):
|
||||
|
||||
RunCMake(context, force, extraArgs)
|
||||
|
||||
-EMBREE = Dependency("Embree", InstallEmbree, "include/embree3/rtcore.h")
|
||||
+EMBREE = Dependency("Embree", InstallEmbree,
|
||||
+ "include/embree3/rtcore.h",
|
||||
+ "include/embree4/rtcore.h")
|
||||
|
||||
############################################################
|
||||
# AnimX
|
||||
@@ -2121,6 +2128,12 @@ def InstallUSD(context, force, buildArgs):
|
||||
help="Build Embree sample imaging plugin")
|
||||
subgroup.add_argument("--no-embree", dest="build_embree", action="store_false",
|
||||
help="Do not build Embree sample imaging plugin (default)")
|
||||
+group.add_argument("--embree-major-version",
|
||||
+ default=EMBREE_DEFAULT_MAJOR_VERSION, type=int,
|
||||
+ choices=[3, 4],
|
||||
+ help=(
|
||||
+ "The major version of Embree to build "
|
||||
+ "(default: {})").format(EMBREE_DEFAULT_MAJOR_VERSION))
|
||||
subgroup = group.add_mutually_exclusive_group()
|
||||
subgroup.add_argument("--prman", dest="build_prman", action="store_true",
|
||||
default=False,
|
||||
@@ -2342,6 +2355,7 @@ def __init__(self, args):
|
||||
|
||||
# - Imaging plugins
|
||||
self.buildEmbree = self.buildImaging and args.build_embree
|
||||
+ self.embreeMajorVersion = args.embree_major_version
|
||||
self.buildPrman = self.buildImaging and args.build_prman
|
||||
self.prmanLocation = (os.path.abspath(args.prman_location)
|
||||
if args.prman_location else None)
|
||||
@@ -2656,6 +2670,7 @@ def _JoinVersion(v):
|
||||
OpenImageIO support: {buildOIIO}
|
||||
OpenColorIO support: {buildOCIO}
|
||||
Embree support: {buildEmbree}
|
||||
+ Embree major version: {embreeMajorVersion}
|
||||
PRMan support: {buildPrman}
|
||||
Vulkan support: {enableVulkan}
|
||||
UsdImaging {buildUsdImaging}
|
||||
@@ -2738,6 +2753,8 @@ def FormatBuildArguments(buildArgs):
|
||||
buildOIIO=("On" if context.buildOIIO else "Off"),
|
||||
buildOCIO=("On" if context.buildOCIO else "Off"),
|
||||
buildEmbree=("On" if context.buildEmbree else "Off"),
|
||||
+ embreeMajorVersion=(context.embreeMajorVersion if context.buildEmbree
|
||||
+ else "N/A"),
|
||||
buildPrman=("On" if context.buildPrman else "Off"),
|
||||
buildUsdImaging=("On" if context.buildUsdImaging else "Off"),
|
||||
buildUsdview=("On" if context.buildUsdview else "Off"),
|
||||
|
||||
From c96c972bc116e46bef477493b86b535f9b115545 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Thu, 12 Jun 2025 17:46:43 -0400
|
||||
Subject: [PATCH 6/7] hdEmbree: use a header common between TBB and oneTBB in
|
||||
limits workaround
|
||||
|
||||
The TBB header that provides version definitions moved between TBB
|
||||
(tbb_stddef.h) and oneTBB (version.h), so we use the lowest level
|
||||
header that is available at the same path in both and let it bring in
|
||||
the definitions. This allows the hdEmbree plugin to be built with
|
||||
oneTBB when used in combination with Embree 4.
|
||||
---
|
||||
pxr/imaging/plugin/hdEmbree/renderer.cpp | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hdEmbree/renderer.cpp b/pxr/imaging/plugin/hdEmbree/renderer.cpp
|
||||
index 8cbf8d4959..381bed73e5 100644
|
||||
--- a/pxr/imaging/plugin/hdEmbree/renderer.cpp
|
||||
+++ b/pxr/imaging/plugin/hdEmbree/renderer.cpp
|
||||
@@ -28,8 +28,13 @@
|
||||
// oneTBB as a min spec. This applies the "Work" thread limit to the
|
||||
// render thread if "Work" is using old TBB, but won't affect other "Work"
|
||||
// implementations. Note that it may affect Embree TBB usage as well.
|
||||
+//
|
||||
+// The header that provides version definitions moved between TBB
|
||||
+// (tbb_stddef.h) and oneTBB (version.h), so we use the lowest level header
|
||||
+// that is available at the same path in both and let it bring in the
|
||||
+// definitions.
|
||||
// -------------------------------------------------------------------------
|
||||
-#include <tbb/tbb_stddef.h>
|
||||
+#include <tbb/blocked_range.h>
|
||||
|
||||
#if TBB_INTERFACE_VERSION_MAJOR < 12
|
||||
|
||||
|
||||
From a464dc5dcc9a26f552a3ece42dab949ae03d35df Mon Sep 17 00:00:00 2001
|
||||
From: Matt Johnson <matt.johnson@epicgames.com>
|
||||
Date: Wed, 24 Jul 2024 10:17:27 -0400
|
||||
Subject: [PATCH 7/7] build_usd.py: allow oneTBB and Embree to be used together
|
||||
when Embree 4.x or later is selected
|
||||
|
||||
---
|
||||
build_scripts/build_usd.py | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/build_scripts/build_usd.py b/build_scripts/build_usd.py
|
||||
index f932c85b5d..949acadb42 100644
|
||||
--- a/build_scripts/build_usd.py
|
||||
+++ b/build_scripts/build_usd.py
|
||||
@@ -2473,9 +2473,10 @@ def ForceBuildDependency(self, dep):
|
||||
PrintError("Draco plugin can not be enabled for monolithic build on Windows")
|
||||
sys.exit(1)
|
||||
|
||||
-# The versions of Embree we currently support do not support oneTBB.
|
||||
-if context.buildOneTBB and context.buildEmbree:
|
||||
- PrintError("Embree support cannot be enabled when building against oneTBB")
|
||||
+# When building with both oneTBB and Embree, a 4.x version of Embree must be
|
||||
+# used.
|
||||
+if context.buildOneTBB and (context.buildEmbree and context.embreeMajorVersion < 4):
|
||||
+ PrintError("Embree 4.x or later must be selected when building against oneTBB")
|
||||
sys.exit(1)
|
||||
|
||||
# Windows ARM64 requires oneTBB. Since oneTBB is a non-standard option for the
|
||||
83
3903.patch
Normal file
83
3903.patch
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
From 3e51fb244dd264b09179999d29dc7c5afd7e71e3 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Tue, 2 Dec 2025 10:43:31 +0000
|
||||
Subject: [PATCH] Backport fixes for CVE-2025-64181 etc. in OpenEXRCore
|
||||
|
||||
---
|
||||
.../hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c | 20 ++++++++++++++++---
|
||||
.../OpenEXR/OpenEXRCore/internal_util.h | 4 ++--
|
||||
.../OpenEXR/OpenEXRCore/parse_header.c | 4 +++-
|
||||
3 files changed, 22 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c
|
||||
index cfe80b4cd68..e11209fe660 100644
|
||||
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c
|
||||
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/chunk.c
|
||||
@@ -1292,6 +1292,16 @@ exr_read_tile_chunk_info (
|
||||
return pctxt->report_error (
|
||||
pctxt, EXR_ERR_INVALID_ARGUMENT, "Invalid packed size of 0");
|
||||
|
||||
+ if (part->comp_type == EXR_COMPRESSION_NONE &&
|
||||
+ cinfo->packed_size != cinfo->unpacked_size)
|
||||
+ {
|
||||
+ return pctxt->print_error (
|
||||
+ pctxt,
|
||||
+ EXR_ERR_BAD_CHUNK_LEADER,
|
||||
+ "Mismatch between unpacked and packed size with uncompressed data: packed is %" PRIu64 "; unpacked is %" PRIu64,
|
||||
+ cinfo->packed_size, cinfo->unpacked_size);
|
||||
+ }
|
||||
+
|
||||
return EXR_ERR_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1350,11 +1360,15 @@ exr_read_chunk (
|
||||
rv = pctxt->do_read (
|
||||
pctxt, packed_data, toread, &dataoffset, &nread, rmode);
|
||||
|
||||
- if (rmode == EXR_ALLOW_SHORT_READ && nread < (int64_t) toread)
|
||||
+ if (rmode == EXR_ALLOW_SHORT_READ &&
|
||||
+ nread >= 0 &&
|
||||
+ nread < (int64_t) toread)
|
||||
+ {
|
||||
memset (
|
||||
((uint8_t*) packed_data) + nread,
|
||||
- 0,
|
||||
- toread - (uint64_t) (nread));
|
||||
+ 0,
|
||||
+ (size_t)(toread - (uint64_t)nread));
|
||||
+ }
|
||||
}
|
||||
else
|
||||
rv = EXR_ERR_SUCCESS;
|
||||
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h
|
||||
index 3c6f02786cc..e0fa3933d92 100644
|
||||
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h
|
||||
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/internal_util.h
|
||||
@@ -31,10 +31,10 @@ compute_sampled_height (int height, int y_sampling, int start_y)
|
||||
else
|
||||
start = start_y;
|
||||
end = start_y + height - 1;
|
||||
- end -= (end < 0) ? (-end % y_sampling) : (end % y_sampling);
|
||||
+ end -= (end < 0 ? -end : end) % y_sampling;
|
||||
|
||||
if (start > end)
|
||||
- nlines = 0;
|
||||
+ nlines = start == start_y ? 1 : 0;
|
||||
else
|
||||
nlines = (end - start) / y_sampling + 1;
|
||||
}
|
||||
diff --git a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c
|
||||
index d7230392693..8b6cf78cc59 100644
|
||||
--- a/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c
|
||||
+++ b/pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/parse_header.c
|
||||
@@ -2293,7 +2293,9 @@ internal_exr_compute_chunk_offset_size (struct _internal_exr_part* curpart)
|
||||
|
||||
w = (uint64_t) (((int64_t) dw.max.x) - ((int64_t) dw.min.x) + 1);
|
||||
|
||||
- if (curpart->tiles)
|
||||
+ if (curpart->storage_mode != EXR_STORAGE_SCANLINE &&
|
||||
+ curpart->storage_mode != EXR_STORAGE_DEEP_SCANLINE &&
|
||||
+ curpart->tiles)
|
||||
{
|
||||
const exr_attr_tiledesc_t* tiledesc = curpart->tiles->tiledesc;
|
||||
int64_t tilecount = 0;
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (OpenUSD-25.08.tar.gz) = fbe1e632473883e47f4bfeb16cab314bbbe8a7b404a5c071ca613bbf288526e505edd7a5edfdd9f85dd16da6d0d91fa0d4f8c783882094d3691f77685817fea6
|
||||
SHA512 (OpenUSD-26.08.tar.gz) = 82f7bb4f77b295be79cd36f591f242276d36c0d589b0fca383344c27e70daf7e29151bf587528bb2fc2b2a8b974387a253993ace3caf5f79ae70f9ebbc71cf1a
|
||||
|
|
|
|||
129
usd.spec
129
usd.spec
|
|
@ -2,15 +2,13 @@
|
|||
# package version, as a reminder of the need to rebuild dependent packages on
|
||||
# every update. See additional notes near the downstream ABI versioning patch.
|
||||
# It should be 0.MAJOR.MINOR without leading zeros, e.g. 22.03 → 0.22.3.
|
||||
%global downstream_so_version 0.25.8
|
||||
%global downstream_so_version 0.26.8
|
||||
|
||||
%bcond alembic 1
|
||||
%bcond draco 1
|
||||
%bcond embree 1
|
||||
%bcond jemalloc 0
|
||||
# Not yet packaged: https://github.com/AcademySoftwareFoundation/MaterialX
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2262694
|
||||
%bcond materialx 0
|
||||
%bcond materialx 1
|
||||
# Default "UNIX Makefiles" backend for CMake would also work fine; ninja is a
|
||||
# bit faster. We conditionalize it just in case there are backend-specific
|
||||
# issues in the future.
|
||||
|
|
@ -27,7 +25,7 @@
|
|||
%bcond test 0
|
||||
|
||||
Name: usd
|
||||
Version: 25.08
|
||||
Version: 26.08
|
||||
Release: %autorelease
|
||||
Summary: 3D VFX pipeline interchange file format
|
||||
|
||||
|
|
@ -35,12 +33,15 @@ Summary: 3D VFX pipeline interchange file format
|
|||
#
|
||||
# Apache-2.0:
|
||||
# - pxr/imaging/hgiVulkan/spirv_reflect.{cpp,h}
|
||||
# - pxr/imaging/plugin/hdEmbree/pxrPbrt/pbrtUtils.h
|
||||
# - pxr/imaging/plugin/hdEmbree/pxrIES/pxr-IES.patch
|
||||
# - pxr/imaging/plugin/hdEmbree/pxrIES/ies.{cpp,h}
|
||||
# BSD-3-Clause:
|
||||
# - pxr/base/gf/ilmbase_*
|
||||
# - pxr/base/js/rapidjson/msinttypes/ (removed in %%prep)
|
||||
# - pxr/base/tf/pxrCLI11/ (removed in %%prep)
|
||||
# - pxr/base/tf/pxrDoubleConversion/ (removed in %%prep)
|
||||
# - pxr/imaging/hio/OpenEXR/OpenEXRCore/
|
||||
# - pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/
|
||||
# - pxr/imaging/plugin/hioAvif/AVIF/src/src-libyuv/
|
||||
# BSD-2-Clause:
|
||||
# - pxr/base/tf/pxrLZ4/ (removed in %%prep)
|
||||
|
|
@ -58,14 +59,14 @@ Summary: 3D VFX pipeline interchange file format
|
|||
# - pxr/base/tf/pxrTslRobinMap/
|
||||
# - pxr/imaging/garch/khrplatform.h
|
||||
# - pxr/imaging/hgiVulkan/vk_mem_alloc.h
|
||||
# - pxr/imaging/hio/OpenEXR/deflate/ (removed in %%prep)
|
||||
# - third_party/renderman-26/plugin/rmanArgsParser/pugixml/ (removed in %%prep)
|
||||
# - pxr/imaging/plugin/hioOpenEXR/OpenEXR/deflate/ (removed in %%prep)
|
||||
# - third_party/renderman/plugin/rmanArgsParser/pugixml/ (removed in %%prep)
|
||||
# MIT OR Unlicense:
|
||||
# - pxr/imaging/hio/stb/
|
||||
# Pixar AND GPL-3.0-or-later WITH Bison-exception-2.2:
|
||||
# - pxr/usd/sdf/path.tab.{cpp,h}
|
||||
# - pxr/usd/sdf/textFileFormat.tab.{cpp,h}
|
||||
# - third_party/renderman-26/plugin/hdPrman/virtualStructConditionalGrammar.tab.{cpp,h}
|
||||
# - third_party/renderman/plugin/hdPrman/virtualStructConditionalGrammar.tab.{cpp,h}
|
||||
#
|
||||
# Additionally, the following would be listed above but are removed in %%prep:
|
||||
#
|
||||
|
|
@ -126,10 +127,6 @@ Source1: org.openusd.usdview.desktop
|
|||
# built with -DPXR_BUILD_EXAMPLES=OFF, but it is.)
|
||||
Patch: 0001-Downstream-only-add-an-SONAME-version.patch
|
||||
|
||||
# hdEmbree: add support for building against embree4
|
||||
# https://github.com/PixarAnimationStudios/USD/pull/2313
|
||||
Patch: %{forgeurl}/pull/2313.patch
|
||||
|
||||
# Downstream-only: use Valgrind macro instead of inline assembly
|
||||
#
|
||||
# Upstream already has a plan to make this change, but is waiting to be
|
||||
|
|
@ -151,6 +148,18 @@ Patch: 0005-Downstream-only-use-the-system-libdeflate.patch
|
|||
# Downstream-only: use the system libavif library
|
||||
Patch: 0006-Downstream-only-use-the-system-libavif.patch
|
||||
|
||||
# Backport fixes for CVE-2025-64181 etc. in OpenEXRCore
|
||||
# https://github.com/PixarAnimationStudios/OpenUSD/pull/3903
|
||||
Patch: %{forgeurl}/pull/3903.patch
|
||||
|
||||
# Replace PyWeakref_GetObject with PyWeakref_GetRef
|
||||
# Fixes RHBZ#2433881. This patch is LLM-generated and needs expert human
|
||||
# review, but it at least builds. See discussion in
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2433881.
|
||||
# Mentioned upstream in
|
||||
# https://github.com/PixarAnimationStudios/OpenUSD/issues/3966#issuecomment-5128542913.
|
||||
Patch: 0001-Replace-PyWeakref_GetObject-with-PyWeakref_GetRef.patch
|
||||
|
||||
# Base
|
||||
BuildRequires: gcc-c++
|
||||
|
||||
|
|
@ -167,6 +176,11 @@ BuildRequires: pkgconfig(dri)
|
|||
BuildRequires: hdf5-devel
|
||||
BuildRequires: cmake(OpenSubdiv)
|
||||
BuildRequires: pkgconfig(tbb)
|
||||
# This seems to be an indirect dependency, probably through OpenSubdiv.
|
||||
# Ideally, everything would take care of its own dependencies, and we wouldn’t
|
||||
# have to specify it directly, but we haven’t studied the problem closely
|
||||
# enough to propose a fix.
|
||||
BuildRequires: pkgconfig(OpenCL)
|
||||
# Unbundled:
|
||||
BuildRequires: cmake(double-conversion)
|
||||
BuildRequires: pkgconfig(liblz4)
|
||||
|
|
@ -199,6 +213,13 @@ BuildRequires: embree-devel
|
|||
BuildRequires: pkgconfig(jemalloc)
|
||||
%endif
|
||||
|
||||
%if %{with materialx}
|
||||
BuildRequires: cmake(materialx)
|
||||
BuildRequires: materialx-data
|
||||
BuildRequires: pkgconfig(xt)
|
||||
BuildRequires: python3-materialx
|
||||
%endif
|
||||
|
||||
%if %{with ocio}
|
||||
BuildRequires: cmake(OpenColorIO)
|
||||
%endif
|
||||
|
|
@ -217,7 +238,7 @@ BuildRequires: openvdb-devel
|
|||
%endif
|
||||
|
||||
%if %{with ptex}
|
||||
BuildRequires: pkgconfig(ptex)
|
||||
BuildRequires: cmake(ptex)
|
||||
%endif
|
||||
|
||||
# Header-only library: -static is for tracking per guidelines
|
||||
|
|
@ -234,12 +255,11 @@ BuildRequires: pkgconfig(ptex)
|
|||
# CVE-2023-45664
|
||||
# CVE-2023-45666
|
||||
# CVE-2023-45667
|
||||
BuildRequires: stb_image-devel >= 2.28^20231011gitbeebb24-12
|
||||
BuildRequires: stb_image-static
|
||||
BuildRequires: stb_image_write-devel >= 1.16
|
||||
BuildRequires: stb_image_write-static
|
||||
BuildRequires: stb_image_resize-devel >= 0.97
|
||||
BuildRequires: stb_image_resize-static
|
||||
# https://github.com/nothings/stb/issues/1860
|
||||
# https://github.com/nothings/stb/issues/1861
|
||||
BuildRequires: stb_image-static >= 2.30^20251025gitf1c79c0-2
|
||||
BuildRequires: stb_image_write-static >= 1.16
|
||||
BuildRequires: stb_image_resize-static >= 0.97
|
||||
|
||||
Requires: usd-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-usd%{?_isa} = %{version}-%{release}
|
||||
|
|
@ -250,7 +270,7 @@ Requires: python3-usd%{?_isa} = %{version}-%{release}
|
|||
#
|
||||
# Note that pxr/base/arch/assumptions.cpp explicitly tests the machine is not
|
||||
# big-endian, and pxr/base/arch/defines.h explicitly enforces x86_64 or ARM64.
|
||||
ExclusiveArch: aarch64 x86_64
|
||||
ExclusiveArch: %{arm64} %{x86_64}
|
||||
|
||||
%description
|
||||
Universal Scene Description (USD) is a time-sampled scene
|
||||
|
|
@ -280,8 +300,9 @@ Provides: bundled(ilmbase) = 2.5.3
|
|||
# Currently, Fedora’s PEGTL is too old:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1902427
|
||||
Provides: bundled(PEGTL) = 3.2.7
|
||||
# Version from pxr/imaging/hio/OpenEXR/OpenEXRCore/openexr_version.h
|
||||
# From pxr/imaging/hio/OpenEXR/README.md:
|
||||
# Version from
|
||||
# pxr/imaging/plugin/hioOpenEXR/OpenEXR/OpenEXRCore/openexr_version.h
|
||||
# From pxr/imaging/plugin/hioOpenEXR/OpenEXR/README.md:
|
||||
# A few changes are still in progress to upstreamed to the OpenEXR project,
|
||||
# but these are minor, and otherwise, almost all differences between the
|
||||
# interred OpenEXRCore and the official OpenEXR repo are consolidated to the
|
||||
|
|
@ -310,6 +331,39 @@ Provides: bundled(openexr) = 3.2.0
|
|||
# effort to remove the Boost dependency. While pxr_boost::python is derived
|
||||
# from boost::python, it is not intended to remain compatible with it.
|
||||
Provides: bundled(boost) = 1.85.0
|
||||
# From LICENSE.txt:
|
||||
# ===========================================================
|
||||
# PBRT (Sampling functions)
|
||||
# ============================================================
|
||||
# USD includes code derived from the pbrt-v4 library, retrieved from
|
||||
# https://github.com/mmp/pbrt-v4/tree/8c19f304558fd7681e2fef2c395a689d0106fb05, which was
|
||||
# provided subject to the unmodified Apache 2.0 license. For details, see
|
||||
# https://github.com/mmp/pbrt-v4/blob/8c19f304558fd7681e2fef2c395a689d0106fb05/LICENSE.txt
|
||||
#
|
||||
# The bundled routines in pxr/imaging/plugin/hdEmbree/pxrPbrt/pbrtUtils.h are
|
||||
# just a handful of small internal utility functions. It would not be
|
||||
# reasonable to add a dependency on the full pbrt ray tracer even if these were
|
||||
# exposed in a public API.
|
||||
Provides: bundled(pbrt-v4) = 4~20251208.8c19f30
|
||||
# From LICENSE.txt:
|
||||
# ============================================================
|
||||
# Cycles (IES reader)
|
||||
# ============================================================
|
||||
# USD includes classes from the Blender Foundation's Cycles project, retrieved from
|
||||
# https://projects.blender.org/blender/cycles/src/commit/0be21d452506ec90259b9063c28b5a6fc1cac6a1,
|
||||
# which was provided subject to the unmodified Apache 2.0 license. For details, see
|
||||
# https://projects.blender.org/blender/cycles/src/commit/0be21d452506ec90259b9063c28b5a6fc1cac6a1/LICENSE
|
||||
#
|
||||
# These are not a candidate for unbundling because they are internal utility
|
||||
# functions not available in the public API. There are also some minor
|
||||
# modifications for OpenUSD, documented in
|
||||
# pxr/imaging/plugin/hdEmbree/pxrIES/pxr-IES.patch.
|
||||
#
|
||||
# Is this commit a post-release snapshot of 4.5.0, or a pre-release snapshot of
|
||||
# 5.0.0? How can we tell? There doesn’t seem to be a project version number
|
||||
# embedded in the source tree. Since this commit hash is only two commits ahead
|
||||
# of the v4.5.0 tag, we consider it a 4.5.0 post-release.
|
||||
Provides: bundled(cycles) = 4.5.0^20251210.0be21d4
|
||||
|
||||
# We are currently able to unbundle these and use system libraries, but we
|
||||
# retain the virtual Provides, commented out, as documentation and in case we
|
||||
|
|
@ -322,7 +376,7 @@ Provides: bundled(boost) = 1.85.0
|
|||
# Version from: pxr/base/tf/pxrCLI11/README.md
|
||||
# Provides: bundled(cli11) = 2.3.1
|
||||
# Version from:
|
||||
# third_party/renderman-26/plugin/rmanArgsParser/pugixml/pugiconfig.hpp
|
||||
# third_party/renderman/plugin/rmanArgsParser/pugixml/pugiconfig.hpp
|
||||
# (header comment)
|
||||
# Provides: bundled(pugixml) = 1.9
|
||||
# Version from: pxr/base/js/rapidjson/rapidjson.h
|
||||
|
|
@ -331,7 +385,7 @@ Provides: bundled(boost) = 1.85.0
|
|||
# Version from: pxr/base/tf/pxrTslRobinMap/robin_growth_policy.h
|
||||
# (PXR_TSL_RH_VERSION_{MAJOR,MINOR,PATCH})
|
||||
# Provides: bundled(robin-map) = 1.3.0
|
||||
# Version from pxr/imaging/hio/OpenEXR/deflate/libdeflate.h
|
||||
# Version from pxr/imaging/plugin/hioOpenEXR/OpenEXR/deflate/libdeflate.h
|
||||
# Provides: bundled(libdeflate) = 1.18
|
||||
# Version from pxr/imaging/plugin/hioAvif/AVIF/src/avif/avif.h
|
||||
# We actually have a post-release snapshot of libavif, because
|
||||
|
|
@ -346,8 +400,8 @@ Provides: bundled(boost) = 1.85.0
|
|||
# https://chromium.googlesource.com/libyuv/libyuv and find the commit hash that
|
||||
# corresponds to a particular serial number.
|
||||
# LIBYUV_VERSION 1895 = commit a97746349b244efd54ab1eb0c0a7366717b33f39
|
||||
# Provides: bundled(libyuv) = 0^20240812gita977463
|
||||
# Version from pxr/imaging/plugin/hioAvif/aom/config/aom_version.h
|
||||
# Provides: bundled(libyuv) = 0^20240812.a977463
|
||||
# Version from pxr/imaging/plugin/hioAvif/config/aom_version.h
|
||||
# Provides: bundled(aom) = 3.0.0
|
||||
|
||||
%description libs
|
||||
|
|
@ -362,6 +416,11 @@ Requires: usd-libs%{?_isa} = %{version}-%{release}
|
|||
# Unbundled, and exposed in the API:
|
||||
Requires: cli11-devel cli11-static
|
||||
Requires: robin-map-devel robin-map-static
|
||||
# Needed by cmake config
|
||||
Requires: cmake(OpenSubdiv)
|
||||
%if %{with materialx}
|
||||
Requires: cmake(materialx)
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
This package contains the C++ header files and symbolic links to the shared
|
||||
|
|
@ -461,9 +520,9 @@ cat > pxr/base/tf/pxrCLI11/CLI11.h <<'EOF'
|
|||
namespace pxr_CLI = CLI;
|
||||
EOF
|
||||
# Remove the bundled copy of pugixml.
|
||||
find third_party/renderman-*/plugin/rmanArgsParser/pugixml/ \
|
||||
find third_party/renderman/plugin/rmanArgsParser/pugixml/ \
|
||||
-type f ! -name '*.hpp' -print -delete
|
||||
for hdr in third_party/renderman-*/plugin/rmanArgsParser/pugixml/*.hpp
|
||||
for hdr in third_party/renderman/plugin/rmanArgsParser/pugixml/*.hpp
|
||||
do
|
||||
cat > "${hdr}" <<EOF
|
||||
#include <$(basename "${hdr}")>
|
||||
|
|
@ -486,7 +545,7 @@ namespace pxr_tsl = tsl;
|
|||
EOF
|
||||
done
|
||||
# Remove the bundled copy of libdeflate.
|
||||
rm -rv pxr/imaging/hio/OpenEXR/deflate/
|
||||
rm -rv pxr/imaging/plugin/hioOpenEXR/OpenEXR/deflate/
|
||||
# Remove the bundled copies of libavif, along with the associated libaom and
|
||||
# the libyuv that is in the libavif sources.
|
||||
rm -rv pxr/imaging/plugin/hioAvif/aom/ \
|
||||
|
|
@ -567,7 +626,6 @@ extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1"
|
|||
-DPXR_BUILD_ALEMBIC_PLUGIN=%{expr:%{with alembic}?"ON":"OFF"} \
|
||||
-DPXR_BUILD_DRACO_PLUGIN=%{expr:%{with draco}?"ON":"OFF"} \
|
||||
-DPXR_BUILD_EMBREE_PLUGIN=%{expr:%{with embree}?"ON":"OFF"} \
|
||||
-DPXR_BUILD_MATERIALX_PLUGIN=%{expr:%{with materialx}?"ON":"OFF"} \
|
||||
-DPXR_BUILD_OPENCOLORIO_PLUGIN=%{expr:%{with ocio}?"ON":"OFF"} \
|
||||
-DPXR_BUILD_OPENIMAGEIO_PLUGIN=%{expr:%{with oiio}?"ON":"OFF"} \
|
||||
-DPXR_BUILD_PRMAN_PLUGIN=OFF \
|
||||
|
|
@ -577,6 +635,7 @@ extra_flags="${extra_flags-} -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1"
|
|||
-DPXR_ENABLE_PTEX_SUPPORT=%{expr:%{with ptex}?"ON":"OFF"} \
|
||||
-DPXR_ENABLE_OSL_SUPPORT=%{expr:%{with openshading}?"ON":"OFF"} \
|
||||
-DPXR_ENABLE_MALLOCHOOK_SUPPORT=OFF \
|
||||
-DPXR_ENABLE_MATERIALX_SUPPORT=%{expr:%{with materialx}?"ON":"OFF"} \
|
||||
-DPXR_ENABLE_PYTHON_SUPPORT=ON \
|
||||
\
|
||||
-DPXR_INSTALL_LOCATION="%{_libdir}/usd/plugin" \
|
||||
|
|
@ -642,6 +701,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.openusd.usdview.d
|
|||
%{_bindir}/hdGenSchema
|
||||
%{_bindir}/sdfdump
|
||||
%{_bindir}/sdffilter
|
||||
%if %{with materialx}
|
||||
%{_bindir}/usdBakeMaterialX
|
||||
%endif
|
||||
%{_bindir}/usdGenSchema
|
||||
%{_bindir}/usdInitSchema
|
||||
%{_bindir}/usdcat
|
||||
|
|
@ -660,6 +722,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.openusd.usdview.d
|
|||
%{_bindir}/usdstitch
|
||||
%{_bindir}/usdstitchclips
|
||||
%{_bindir}/usdtree
|
||||
%{_bindir}/usdupdatecrate
|
||||
%{_bindir}/usdzip
|
||||
%if %{with usdview}
|
||||
%{_datadir}/applications/org.openusd.usdview.desktop
|
||||
|
|
@ -670,6 +733,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.openusd.usdview.d
|
|||
%{_mandir}/man1/hdGenSchema.1*
|
||||
%{_mandir}/man1/sdfdump.1*
|
||||
%{_mandir}/man1/sdffilter.1*
|
||||
%if %{with materialx}
|
||||
%{_mandir}/man1/usdBakeMaterialX.1*
|
||||
%endif
|
||||
%{_mandir}/man1/usdGenSchema.1*
|
||||
%{_mandir}/man1/usdInitSchema.1*
|
||||
%{_mandir}/man1/usdcat.1*
|
||||
|
|
@ -688,6 +754,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.openusd.usdview.d
|
|||
%{_mandir}/man1/usdstitch.1*
|
||||
%{_mandir}/man1/usdstitchclips.1*
|
||||
%{_mandir}/man1/usdtree.1*
|
||||
%{_mandir}/man1/usdupdatecrate.1*
|
||||
%{_mandir}/man1/usdzip.1*
|
||||
%if %{with usdview}
|
||||
%{_mandir}/man1/testusdview.1*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue