Skip to content

Commit 2864f3d

Browse files
committed
Merge release v24.05
2 parents f941bce + 934d68d commit 2864f3d

File tree

1,080 files changed

+53208
-81907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,080 files changed

+53208
-81907
lines changed

BUILDING.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,15 @@ that depend on Metal, including:
118118

119119
##### Vulkan
120120

121+
Vulkan support for USD is currently experimental and disabled by default.
122+
121123
Building USD with Vulkan enabled requires the Vulkan SDK and glslang to
122-
be installed. The VULKAN_SDK environment variable must point to the
123-
location of the SDK. The glslang compiler headers must be locatable during
124-
the build process.
124+
be installed. If you wish to build a debug build on Windows, please make sure
125+
you have the optional component "Shader Toolchain Debug Symbols" installed as
126+
part of the Vulkan SDK.
127+
128+
The VULKAN_SDK environment variable must point to the location of the SDK. The
129+
glslang compiler headers must be locatable during the build process.
125130

126131
Support for Vulkan can optionally be enabled by specifying the cmake flag
127132
`PXR_ENABLE_VULKAN_SUPPORT=TRUE`.

CHANGELOG.md

Lines changed: 363 additions & 3 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ For example, the following will download, build, and install USD's dependencies,
126126
then build and install USD into `/path/to/my_usd_install_dir`.
127127

128128
```
129-
> python USD/build_scripts/build_usd.py /path/to/my_usd_install_dir
129+
> python OpenUSD/build_scripts/build_usd.py /path/to/my_usd_install_dir
130130
```
131131

132132
##### MacOS:
@@ -138,7 +138,7 @@ For example, the following will download, build, and install USD's dependencies,
138138
then build and install USD into `/path/to/my_usd_install_dir`.
139139

140140
```
141-
> python USD/build_scripts/build_usd.py /path/to/my_usd_install_dir
141+
> python OpenUSD/build_scripts/build_usd.py /path/to/my_usd_install_dir
142142
```
143143

144144
##### Windows:
@@ -153,7 +153,7 @@ For example, the following will download, build, and install USD's dependencies,
153153
then build and install USD into `C:\path\to\my_usd_install_dir`.
154154

155155
```
156-
C:\> python USD\build_scripts\build_usd.py "C:\path\to\my_usd_install_dir"
156+
C:\> python OpenUSD\build_scripts\build_usd.py "C:\path\to\my_usd_install_dir"
157157
```
158158

159159
#### 4. Try it out
@@ -162,7 +162,7 @@ Set the environment variables specified by the script when it finishes and
162162
launch `usdview` with a sample asset.
163163

164164
```
165-
> usdview USD/extras/usd/tutorials/convertingLayerFormats/Sphere.usda
165+
> usdview OpenUSD/extras/usd/tutorials/convertingLayerFormats/Sphere.usda
166166
```
167167

168168
Contributing

VERSIONS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Our test machines have the following software versions installed.
2727
| Qt for Python | PySide2 5.15.2.1 | PySide6 6.3.1 | PySide2 5.15.2.1 |
2828
| PyOpenGL | 3.1.5 | 3.1.5 | 3.1.5 |
2929
| Embree | 3.2.2 | 3.13.3 | 3.2.2 |
30-
| RenderMan | 24.4, 25.0 | 24.4, 25.0 | 24.4, 25.0 |
30+
| RenderMan | 25.3 | 25.3 | 25.3 |
3131
| Alembic | 1.8.5 | 1.8.5 | 1.8.5 |
3232
| OpenEXR | 3.1.11 | 3.1.11 | 3.1.11 |
33-
| MaterialX | 1.38.7 | 1.38.7 | 1.38.7 |
33+
| MaterialX | 1.38.8 | 1.38.8 | 1.38.8 |
3434
| Jinja2 | 2.0 | | |
3535
| Flex | 2.5.39 | | |
3636
| Bison | 2.4.1 | | |

azure-pypi-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ stages:
210210
$(PYTHON_INTERPRETER) build_scripts/build_usd.py --build-args USD,"-DPXR_PY_UNDEFINED_DYNAMIC_LOOKUP=ON -DPXR_BUILD_USD_TOOLS=OFF -DPXR_INSTALL_LOCATION=../pluginfo" --no-materialx --no-imaging --no-examples --no-tutorials --generator Xcode --build-target universal --build $HOME/USDgen/build --src $HOME/USDgen/src $HOME/USDinst -v
211211
displayName: 'Building USD'
212212
- bash: |
213-
$(PYTHON_INTERPRETER) -m pip install delocate wheel
213+
$(PYTHON_INTERPRETER) -m pip install delocate~=0.10.2 wheel
214214
displayName: 'Installing python packages'
215215
- bash: |
216216
mkdir ./packaging

build_scripts/build_usd.py

Lines changed: 28 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ def GetVisualStudioCompilerAndVersion():
135135

136136
msvcCompiler = which('cl')
137137
if msvcCompiler:
138-
# VisualStudioVersion environment variable should be set by the
138+
# VCToolsVersion environment variable should be set by the
139139
# Visual Studio Command Prompt.
140140
match = re.search(
141141
r"(\d+)\.(\d+)",
142-
os.environ.get("VisualStudioVersion", ""))
142+
os.environ.get("VCToolsVersion", ""))
143143
if match:
144144
return (msvcCompiler, tuple(int(v) for v in match.groups()))
145145
return None
@@ -154,16 +154,17 @@ def IsVisualStudioVersionOrGreater(desiredVersion):
154154
return version >= desiredVersion
155155
return False
156156

157+
# Helpers to determine the version of "Visual Studio" (also support the Build Tools) based
158+
# on the version of the MSVC compiler.
159+
# See MSVC++ versions table on https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B
157160
def IsVisualStudio2022OrGreater():
158-
VISUAL_STUDIO_2022_VERSION = (17, 0)
161+
VISUAL_STUDIO_2022_VERSION = (14, 30)
159162
return IsVisualStudioVersionOrGreater(VISUAL_STUDIO_2022_VERSION)
160-
161163
def IsVisualStudio2019OrGreater():
162-
VISUAL_STUDIO_2019_VERSION = (16, 0)
164+
VISUAL_STUDIO_2019_VERSION = (14, 20)
163165
return IsVisualStudioVersionOrGreater(VISUAL_STUDIO_2019_VERSION)
164-
165166
def IsVisualStudio2017OrGreater():
166-
VISUAL_STUDIO_2017_VERSION = (15, 0)
167+
VISUAL_STUDIO_2017_VERSION = (14, 1)
167168
return IsVisualStudioVersionOrGreater(VISUAL_STUDIO_2017_VERSION)
168169

169170
def GetPythonInfo(context):
@@ -283,8 +284,8 @@ def Run(cmd, logCommandOutput = True):
283284
if verbosity < 3:
284285
with open("log.txt", "r") as logfile:
285286
Print(logfile.read())
286-
raise RuntimeError("Failed to run '{cmd}'\nSee {log} for more details."
287-
.format(cmd=cmd, log=os.path.abspath("log.txt")))
287+
raise RuntimeError("Failed to run '{cmd}' in {path}.\nSee {log} for more details."
288+
.format(cmd=cmd, path=os.getcwd(), log=os.path.abspath("log.txt")))
288289

289290
@contextlib.contextmanager
290291
def CurrentWorkingDirectory(dir):
@@ -723,6 +724,9 @@ def InstallBoost_Helper(context, force, buildArgs):
723724
# However, there are some cases where a newer version is required.
724725
# - Building with Python 3.11 requires boost 1.82.0 or newer
725726
# (https://github.com/boostorg/python/commit/a218ba)
727+
# - Building on MacOS requires v1.82.0 or later for C++17 support starting
728+
# with Xcode 15. We choose to use this version for all MacOS builds for
729+
# simplicity."
726730
# - Building with Python 3.10 requires boost 1.76.0 or newer
727731
# (https://github.com/boostorg/python/commit/cbd2d9)
728732
# XXX: Due to a typo we've been using 1.78.0 in this case for a while.
@@ -733,14 +737,12 @@ def InstallBoost_Helper(context, force, buildArgs):
733737
# compatibility issues on Big Sur and Monterey.
734738
pyInfo = GetPythonInfo(context)
735739
pyVer = (int(pyInfo[3].split('.')[0]), int(pyInfo[3].split('.')[1]))
736-
if context.buildPython and pyVer >= (3, 11):
740+
if MacOS() or (context.buildPython and pyVer >= (3,11)):
737741
BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.zip"
738742
elif context.buildPython and pyVer >= (3, 10):
739743
BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
740744
elif IsVisualStudio2022OrGreater():
741745
BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
742-
elif MacOS():
743-
BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
744746
else:
745747
BOOST_URL = "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.zip"
746748

@@ -788,7 +790,7 @@ def InstallBoost_Helper(context, force, buildArgs):
788790
primaryArch, secondaryArch)
789791

790792
if macOSArch:
791-
bootstrapCmd += " cxxflags=\"{0}\" " \
793+
bootstrapCmd += " cxxflags=\"{0} -std=c++17 -stdlib=libc++\" " \
792794
" cflags=\"{0}\" " \
793795
" linkflags=\"{0}\"".format(macOSArch)
794796
bootstrapCmd += " --with-toolset=clang"
@@ -904,7 +906,7 @@ def InstallBoost_Helper(context, force, buildArgs):
904906
# https://github.com/boostorg/container/commit/79a75f470e75f35f5f2a91e10fcc67d03b0a2160
905907
b2_settings.append(f"define=BOOST_UNORDERED_HAVE_PIECEWISE_CONSTRUCT=0")
906908
if macOSArch:
907-
b2_settings.append("cxxflags=\"{0}\"".format(macOSArch))
909+
b2_settings.append("cxxflags=\"{0} -std=c++17 -stdlib=libc++\"".format(macOSArch))
908910
b2_settings.append("cflags=\"{0}\"".format(macOSArch))
909911
b2_settings.append("linkflags=\"{0}\"".format(macOSArch))
910912

@@ -952,7 +954,8 @@ def InstallBoost(context, force, buildArgs):
952954
TBB_URL = "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2020.3.zip"
953955
TBB_INTEL_URL = "https://github.com/oneapi-src/oneTBB/archive/refs/tags/2018_U1.zip"
954956
else:
955-
TBB_URL = "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2020.3.zip"
957+
# Use point release with fix https://github.com/oneapi-src/oneTBB/pull/833
958+
TBB_URL = "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2020.3.1.zip"
956959

957960
def InstallTBB(context, force, buildArgs):
958961
if Windows():
@@ -1354,36 +1357,18 @@ def InstallOpenSubdiv(context, force, buildArgs):
13541357
'-DNO_TESTS=ON',
13551358
'-DNO_GLEW=ON',
13561359
'-DNO_GLFW=ON',
1360+
'-DNO_PTEX=ON',
1361+
'-DNO_TBB=ON',
13571362
]
13581363

1359-
# If Ptex support is disabled in USD, disable support in OpenSubdiv
1360-
# as well. This ensures OSD doesn't accidentally pick up a Ptex
1361-
# library outside of our build.
1362-
if not context.enablePtex:
1363-
extraArgs.append('-DNO_PTEX=ON')
1364-
1365-
# NOTE: For now, we disable TBB in our OpenSubdiv build.
1366-
# This avoids an issue where OpenSubdiv will link against
1367-
# all TBB libraries it finds, including libtbbmalloc and
1368-
# libtbbmalloc_proxy. On Linux and MacOS, this has the
1369-
# unwanted effect of replacing the system allocator with
1370-
# tbbmalloc.
1371-
extraArgs.append('-DNO_TBB=ON')
1364+
# Use Metal for macOS and all Apple embedded systems.
1365+
if MacOS():
1366+
extraArgs.append('-DNO_OPENGL=ON')
13721367

13731368
# Add on any user-specified extra arguments.
13741369
extraArgs += buildArgs
13751370

1376-
# OpenSubdiv seems to error when building on windows w/ Ninja...
1377-
# ...so just use the default generator (ie, Visual Studio on Windows)
1378-
# until someone can sort it out
1379-
oldGenerator = context.cmakeGenerator
1380-
if oldGenerator == "Ninja" and Windows():
1381-
context.cmakeGenerator = None
1382-
1383-
try:
1384-
RunCMake(context, force, extraArgs)
1385-
finally:
1386-
context.cmakeGenerator = oldGenerator
1371+
RunCMake(context, force, extraArgs)
13871372

13881373
OPENSUBDIV = Dependency("OpenSubdiv", InstallOpenSubdiv,
13891374
"include/opensubdiv/version.h")
@@ -1491,19 +1476,10 @@ def InstallDraco(context, force, buildArgs):
14911476
############################################################
14921477
# MaterialX
14931478

1494-
MATERIALX_URL = "https://github.com/materialx/MaterialX/archive/v1.38.7.zip"
1479+
MATERIALX_URL = "https://github.com/materialx/MaterialX/archive/v1.38.8.zip"
14951480

14961481
def InstallMaterialX(context, force, buildArgs):
14971482
with CurrentWorkingDirectory(DownloadURL(MATERIALX_URL, context, force)):
1498-
# MaterialX 1.38.7 fails to build on windows using VS2017 because of a
1499-
# missing header include, following patch fixes the same. This patch
1500-
# should be removed when underlying issue is resolved.
1501-
# https://github.com/AcademySoftwareFoundation/MaterialX/issues/1401
1502-
if IsVisualStudio2017OrGreater() and not IsVisualStudio2019OrGreater():
1503-
PatchFile("source\\MaterialXGenMsl\\MslShaderGenerator.cpp",
1504-
[("#include <MaterialXGenMsl/MslShaderGenerator.h>",
1505-
"#include <cctype>\n" +
1506-
"#include <MaterialXGenMsl/MslShaderGenerator.h>")])
15071483
cmakeOptions = ['-DMATERIALX_BUILD_SHARED_LIBS=ON',
15081484
'-DMATERIALX_BUILD_TESTS=OFF'
15091485
]
@@ -1543,9 +1519,9 @@ def InstallEmbree(context, force, buildArgs):
15431519
############################################################
15441520
# AnimX
15451521

1546-
# This GitHub project has no releases, so we take the latest.
1547-
# As of 2023, there have been no commits since 2018.
1548-
ANIMX_URL = "https://github.com/Autodesk/animx/archive/refs/heads/master.zip"
1522+
# This GitHub project has no releases, so we fixed on the latest commit as of
1523+
# 2024-02-06 - 5db8ee4, which was committed on 2018-11-05
1524+
ANIMX_URL = "https://github.com/Autodesk/animx/archive/5db8ee416d5fa7050357f498d4dcfaa6ff3f7738.zip"
15491525

15501526
def InstallAnimX(context, force, buildArgs):
15511527
with CurrentWorkingDirectory(DownloadURL(ANIMX_URL, context, force)):

cmake/defaults/Options.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,29 @@ option(PXR_PREFER_SAFETY_OVER_SPEED
5454
"Enable certain checks designed to avoid crashes or out-of-bounds memory reads with malformed input files. These checks may negatively impact performance."
5555
ON)
5656

57+
if(APPLE)
58+
# Cross Compilation detection as defined in CMake docs
59+
# Required to be handled here so it can configure options later on
60+
# https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-visionos-or-watchos
61+
# Note: All these SDKs may not be supported by OpenUSD, but are all listed here for future proofing
62+
set(PXR_APPLE_EMBEDDED OFF)
63+
if (CMAKE_SYSTEM_NAME MATCHES "iOS"
64+
OR CMAKE_SYSTEM_NAME MATCHES "tvOS"
65+
OR CMAKE_SYSTEM_NAME MATCHES "visionOS"
66+
OR CMAKE_SYSTEM_NAME MATCHES "watchOS")
67+
set(PXR_APPLE_EMBEDDED ON)
68+
if(${PXR_BUILD_USD_TOOLS})
69+
MESSAGE(STATUS "Setting PXR_BUILD_USD_TOOLS=OFF because they are not supported on Apple embedded platforms")
70+
set(PXR_BUILD_USD_TOOLS OFF)
71+
endif()
72+
if (${PXR_BUILD_IMAGING})
73+
MESSAGE(STATUS "Setting PXR_BUILD_USD_IMAGING=OFF because it is not supported on Apple embedded platforms")
74+
set(PXR_BUILD_IMAGING OFF)
75+
endif ()
76+
endif ()
77+
endif()
78+
79+
5780
# Determine GFX api
5881
# Metal only valid on Apple platforms
5982
set(pxr_enable_metal "OFF")

cmake/defaults/Packages.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,18 +243,22 @@ if (PXR_BUILD_IMAGING)
243243
add_definitions(-DPXR_METAL_SUPPORT_ENABLED)
244244
endif()
245245
if (PXR_ENABLE_VULKAN_SUPPORT)
246+
message(STATUS "Enabling experimental feature Vulkan support")
246247
if (EXISTS $ENV{VULKAN_SDK})
247248
# Prioritize the VULKAN_SDK includes and packages before any system
248249
# installed headers. This is to prevent linking against older SDKs
249250
# that may be installed by the OS.
250251
# XXX This is fixed in cmake 3.18+
251-
include_directories(BEFORE SYSTEM $ENV{VULKAN_SDK} $ENV{VULKAN_SDK}/include $ENV{VULKAN_SDK}/lib)
252-
set(ENV{PATH} "$ENV{VULKAN_SDK}:$ENV{VULKAN_SDK}/include:$ENV{VULKAN_SDK}/lib:$ENV{PATH}")
252+
include_directories(BEFORE SYSTEM $ENV{VULKAN_SDK} $ENV{VULKAN_SDK}/include $ENV{VULKAN_SDK}/lib $ENV{VULKAN_SDK}/source)
253+
set(ENV{PATH} "$ENV{VULKAN_SDK}:$ENV{VULKAN_SDK}/include:$ENV{VULKAN_SDK}/lib:$ENV{VULKAN_SDK}/source:$ENV{PATH}")
253254
find_package(Vulkan REQUIRED)
254255
list(APPEND VULKAN_LIBS Vulkan::Vulkan)
255256

256257
# Find the extra vulkan libraries we need
257258
set(EXTRA_VULKAN_LIBS shaderc_combined)
259+
if (WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
260+
set(EXTRA_VULKAN_LIBS shaderc_combinedd)
261+
endif()
258262
foreach(EXTRA_LIBRARY ${EXTRA_VULKAN_LIBS})
259263
find_library("${EXTRA_LIBRARY}_PATH" NAMES "${EXTRA_LIBRARY}" PATHS $ENV{VULKAN_SDK}/lib)
260264
list(APPEND VULKAN_LIBS "${${EXTRA_LIBRARY}_PATH}")
@@ -357,4 +361,4 @@ if(REQUIRES_Imath)
357361
endif()
358362
endif()
359363

360-
set(BUILD_SHARED_LIBS "${build_shared_libs}")
364+
set(BUILD_SHARED_LIBS "${build_shared_libs}")

cmake/defaults/Version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
# Versioning information
2525
set(PXR_MAJOR_VERSION "0")
2626
set(PXR_MINOR_VERSION "24")
27-
set(PXR_PATCH_VERSION "3") # NOTE: Must not have leading 0 for single digits
27+
set(PXR_PATCH_VERSION "5") # NOTE: Must not have leading 0 for single digits
2828

2929
math(EXPR PXR_VERSION "${PXR_MAJOR_VERSION} * 10000 + ${PXR_MINOR_VERSION} * 100 + ${PXR_PATCH_VERSION}")

0 commit comments

Comments
 (0)