Skip to content

Commit 2c09a0b

Browse files
authored
Merge branch 'PixarAnimationStudios:dev' into dev
2 parents 8d7d999 + 8843f3b commit 2c09a0b

File tree

728 files changed

+18620
-28815
lines changed

Some content is hidden

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

728 files changed

+18620
-28815
lines changed

CHANGELOG.md

Lines changed: 702 additions & 4 deletions
Large diffs are not rendered by default.

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ add_subdirectory(pxr)
4545
add_subdirectory(extras)
4646

4747
if (PXR_BUILD_PRMAN_PLUGIN)
48-
set(prmanPluginPath "third_party/renderman-${RENDERMAN_VERSION_MAJOR}")
48+
set(prmanPluginPath "third_party/renderman")
4949

5050
get_filename_component(prmanPluginAbsPath "${prmanPluginPath}" ABSOLUTE)
5151
if (EXISTS "${prmanPluginAbsPath}")
5252
add_subdirectory("${prmanPluginPath}")
5353
else()
54-
message(FATAL_ERROR "No RenderMan plugin available for "
55-
"RenderMan ${RENDERMAN_VERSION_MAJOR}")
54+
message(FATAL_ERROR "No RenderMan plugin not found at "
55+
"${prmanPluginAbsPath}. Check client mapping")
5656
endif()
5757
endif()
5858

VERSIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ 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 | 4.3.3 | 4.3.3 | 4.3.3 |
30-
| RenderMan | 25.3 | 25.3 | 25.3 |
30+
| RenderMan | 26.3, 27.0 | 26.3, 27.0 | 26.3, 27.0 |
3131
| Alembic | 1.8.5 | 1.8.5 | 1.8.5 |
3232
| OpenEXR | 3.1.13 | 3.1.13 | 3.1.13 |
3333
| MaterialX | 1.39.3 | 1.39.3 | 1.39.3 |

build_scripts/build_usd.py

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,34 @@ def MacOS():
7575
if MacOS():
7676
import apple_utils
7777

78+
# WASM specific defines and helpers
79+
TARGET_WASM='wasm'
80+
TARGET_WASM64='wasm64'
81+
82+
# determines flags based on 32 / 64 bit wasm build target
83+
def GetWasmCompilerFlags(buildTarget):
84+
compileFlags = '-pthread --use-port=zlib'
85+
linkerFlags = '-pthread'
86+
87+
if buildTarget == TARGET_WASM64:
88+
compileFlags += ' -sMEMORY64=1'
89+
linkerFlags += ' -sMEMORY64=1'
90+
91+
return (compileFlags, linkerFlags)
92+
7893
def GetBuildTargetDefault():
7994
if MacOS():
8095
return apple_utils.GetBuildTargetDefault()
8196
else:
8297
return ''
8398

84-
TARGET_WASM='wasm'
85-
8699
def GetBuildTargets():
87100
if MacOS():
88-
return apple_utils.GetBuildTargets() + [TARGET_WASM]
101+
return apple_utils.GetBuildTargets() + [TARGET_WASM, TARGET_WASM64]
89102
elif Linux():
90-
return [TARGET_WASM]
103+
return [TARGET_WASM, TARGET_WASM64]
91104
elif Windows():
92-
return [TARGET_WASM]
105+
return [TARGET_WASM, TARGET_WASM64]
93106
else:
94107
return []
95108

@@ -1007,7 +1020,16 @@ def InstallOneTBB(context, force, buildArgs):
10071020
with CurrentWorkingDirectory(DownloadURL(ONETBB_URL, context, force)):
10081021
cmakeOptions = ['-DTBB_TEST=OFF', '-DTBB_STRICT=OFF']
10091022
if context.targetWasm:
1010-
cmakeOptions += ['-DBUILD_SHARED_LIBS=OFF', '-DCMAKE_CXX_FLAGS="-pthread"']
1023+
compileFlags, _ = GetWasmCompilerFlags(context.buildTarget)
1024+
1025+
# Note: Emscripten toolchain file will check presence of
1026+
# '-sMEMORY64=1' in 'CMAKE_C_FLAGS' to determine if a
1027+
# 64 bit build is to be performed
1028+
cmakeOptions += [
1029+
'-DBUILD_SHARED_LIBS=OFF',
1030+
'-DCMAKE_CXX_FLAGS="{}"'.format(compileFlags),
1031+
'-DCMAKE_C_FLAGS="{}"'.format(compileFlags)
1032+
]
10111033

10121034
cmakeOptions += buildArgs
10131035
RunCMake(context, force, cmakeOptions)
@@ -1196,6 +1218,9 @@ def InstallJPEG(context, force, buildArgs):
11961218
extraJPEGArgs = buildArgs
11971219
if not which("nasm"):
11981220
extraJPEGArgs.append("-DWITH_SIMD=FALSE")
1221+
1222+
# For compatibility with CMake 4+
1223+
extraJPEGArgs.append("-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
11991224

12001225
RunCMake(context, force, extraJPEGArgs)
12011226
return os.getcwd()
@@ -1230,6 +1255,10 @@ def InstallTIFF(context, force, buildArgs):
12301255
else:
12311256
extraArgs = []
12321257
extraArgs += buildArgs
1258+
1259+
# For compatibility with CMake 4+
1260+
extraArgs.append("-DCMAKE_POLICY_VERSION_MINIMUM=3.5")
1261+
12331262
RunCMake(context, force, extraArgs)
12341263

12351264
TIFF = Dependency("TIFF", InstallTIFF, "include/tiff.h")
@@ -1467,10 +1496,15 @@ def InstallOpenSubdiv(context, force, buildArgs):
14671496
'-DNO_PTEX=ON',
14681497
'-DNO_TBB=ON',
14691498
]
1499+
# Note: Emscripten toolchain file will check presence of
1500+
# '-sMEMORY64=1' in 'CMAKE_C_FLAGS' to determine if a
1501+
# 64 bit build is to be performed
14701502
if context.targetWasm:
1503+
compileFlags, _ = GetWasmCompilerFlags(context.buildTarget)
1504+
14711505
extraArgs.append('-DBUILD_SHARED_LIB=OFF')
1472-
extraArgs.append('-DCMAKE_CXX_FLAGS="-pthread"')
1473-
extraArgs.append('-DCMAKE_C_FLAGS="-pthread"')
1506+
extraArgs.append('-DCMAKE_CXX_FLAGS="{}"'.format(compileFlags))
1507+
extraArgs.append('-DCMAKE_C_FLAGS="{}"'.format(compileFlags))
14741508
extraArgs.append('-DNO_METAL=ON')
14751509

14761510
# Use Metal for macOS and all Apple embedded systems.
@@ -1885,6 +1919,12 @@ def InstallUSD(context, force, buildArgs):
18851919

18861920
extraArgs.append('-DBUILD_SHARED_LIBS=OFF')
18871921

1922+
compileFlags, linkFlags = GetWasmCompilerFlags(context.buildTarget)
1923+
1924+
extraArgs.append('-DCMAKE_CXX_FLAGS="{}"'.format(compileFlags))
1925+
extraArgs.append('-DCMAKE_C_FLAGS="{}"'.format(compileFlags))
1926+
extraArgs.append('-DCMAKE_EXE_LINKER_FLAGS="{}"'.format(linkFlags))
1927+
18881928
RunCMake(context, force, extraArgs, context.usdInstDir)
18891929

18901930
USD = Dependency("USD", InstallUSD, "include/pxr/pxr.h")
@@ -2346,7 +2386,8 @@ def __init__(self, args):
23462386

23472387
self.ignorePaths = args.ignore_paths or []
23482388
# Build target and code signing
2349-
self.targetWasm = (args.build_target == TARGET_WASM)
2389+
self.targetWasm = (args.build_target == TARGET_WASM or
2390+
args.build_target == TARGET_WASM64)
23502391
self.buildTarget = args.build_target
23512392
if MacOS():
23522393
apple_utils.SetTarget(self, self.buildTarget)

cmake/defaults/ProjectDefaults.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if(APPLE)
2828
endif()
2929

3030
if(EMSCRIPTEN)
31-
set(EMSCRIPTEN_COMPILE_FLAGS "-sMAXIMUM_MEMORY=4GB -fexceptions")
31+
set(EMSCRIPTEN_COMPILE_FLAGS "-fexceptions")
3232
add_compile_options("SHELL:${EMSCRIPTEN_COMPILE_FLAGS}")
3333
add_link_options("SHELL:${EMSCRIPTEN_COMPILE_FLAGS} -sALLOW_MEMORY_GROWTH=1")
3434
endif()

cmake/defaults/Version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# Versioning information
88
set(PXR_MAJOR_VERSION "0")
9-
set(PXR_MINOR_VERSION "25")
10-
set(PXR_PATCH_VERSION "11") # NOTE: Must not have leading 0 for single digits
9+
set(PXR_MINOR_VERSION "26")
10+
set(PXR_PATCH_VERSION "2") # NOTE: Must not have leading 0 for single digits
1111

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

cmake/macros/Private.cmake

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,34 @@ function(_pxr_install_rpath rpathRef NAME)
735735
)
736736
endfunction()
737737

738+
# Sets up an install rule to copy assets from the source tree into the
739+
# ctest folder in the install location. These files are copied at runtime into
740+
# a temporary directory by the test runner before each test is run.
741+
function(_pxr_install_test_dir)
742+
if (NOT PXR_BUILD_TESTS)
743+
return()
744+
endif()
745+
746+
# If the package for this test does not have a target it must not be
747+
# getting built, in which case we can skip building associated tests.
748+
if (NOT TARGET ${PXR_PACKAGE})
749+
return()
750+
endif()
751+
752+
cmake_parse_arguments(bt
753+
""
754+
"SRC;DEST"
755+
""
756+
${ARGN}
757+
)
758+
759+
# XXX -- We shouldn't have to install to run tests.
760+
install(
761+
DIRECTORY ${bt_SRC}/
762+
DESTINATION tests/ctest/${bt_DEST}
763+
)
764+
endfunction() # _pxr_install_test_dir
765+
738766
# Split the library (target) names in libs into internal-to-the-monolithic-
739767
# library and external-of-it lists.
740768
function(_pxr_split_libraries libs internal_result external_result)

cmake/macros/Public.cmake

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -728,15 +728,8 @@ function(pxr_test_scripts)
728728
endfunction() # pxr_test_scripts
729729

730730
function(pxr_install_test_dir)
731-
if (NOT PXR_BUILD_TESTS)
732-
return()
733-
endif()
734-
735-
# If the package for this test does not have a target it must not be
736-
# getting built, in which case we can skip building associated tests.
737-
if (NOT TARGET ${PXR_PACKAGE})
738-
return()
739-
endif()
731+
message(DEPRECATION "Please use the TESTENV parameter of pxr_register_test "
732+
"to specify test asset directories.")
740733

741734
cmake_parse_arguments(bt
742735
""
@@ -745,10 +738,9 @@ function(pxr_install_test_dir)
745738
${ARGN}
746739
)
747740

748-
# XXX -- We shouldn't have to install to run tests.
749-
install(
750-
DIRECTORY ${bt_SRC}/
751-
DESTINATION tests/ctest/${bt_DEST}
741+
_pxr_install_test_dir(
742+
SRC ${bt_SRC}
743+
DEST ${bt_DEST}
752744
)
753745
endfunction() # pxr_install_test_dir
754746

@@ -773,7 +765,7 @@ function(pxr_register_test TEST_NAME)
773765
FILES_EXIST FILES_DONT_EXIST
774766
CLEAN_OUTPUT
775767
EXPECTED_RETURN_CODE
776-
TESTENV
768+
TESTENV TESTENV_DEST
777769
WARN WARN_PERCENT HARD_WARN FAIL FAIL_PERCENT HARD_FAIL)
778770
set(MULTI_VALUE_ARGS DIFF_COMPARE IMAGE_DIFF_COMPARE ENV PRE_PATH POST_PATH)
779771

@@ -842,13 +834,34 @@ function(pxr_register_test TEST_NAME)
842834
set(testWrapperCmd ${testWrapperCmd} --post-command-stderr-redirect=${bt_POST_COMMAND_STDERR_REDIRECT})
843835
endif()
844836

845-
# Not all tests will have testenvs, but if they do let the wrapper know so
846-
# it can copy the testenv contents into the run directory. By default,
847-
# assume the testenv has the same name as the test but allow it to be
848-
# overridden by specifying TESTENV.
837+
# Determine test environment directory and set up any necessary
838+
# directory copying during the install step. testenvDir is passed to the
839+
# test wrapper so it can copy the testenv contents into the run directory.
849840
if (bt_TESTENV)
850-
set(testenvDir ${CMAKE_INSTALL_PREFIX}/tests/ctest/${bt_TESTENV})
851-
else()
841+
if (bt_TESTENV_DEST)
842+
# if a dest directory is specified, then we will assume that it
843+
# will contain a folder with ${TEST_NAME} in its path which will
844+
# be set as the testenvDir below. This is currently only used
845+
# for a few specific tests and in general we prefer to use the
846+
# automatic method below.
847+
_pxr_install_test_dir(SRC ${bt_TESTENV} DEST ${bt_TESTENV_DEST})
848+
else()
849+
# when using the testenv without a specific destination set, we
850+
# want to set the testenvDir to the folder name of the testenv dir
851+
# we copied. This allows multiple tests to reference the same set
852+
# of test files even though their test name will be different.
853+
cmake_path(GET bt_TESTENV FILENAME testNameDir)
854+
_pxr_install_test_dir(SRC ${bt_TESTENV} DEST ${testNameDir})
855+
set(testenvDir ${CMAKE_INSTALL_PREFIX}/tests/ctest/${testNameDir})
856+
endif()
857+
endif()
858+
859+
# By default we will simply use the test name for the testenvDir. In
860+
# the case that no testenv is specified, this will point to a non
861+
# existant folder and no copy will be executed. In the case where a
862+
# destination was explicitly specified, the directory which matches
863+
# the test name and its contents will be recursively copied.
864+
if (NOT DEFINED testenvDir)
852865
set(testenvDir ${CMAKE_INSTALL_PREFIX}/tests/ctest/${TEST_NAME})
853866
endif()
854867

@@ -1202,6 +1215,26 @@ function(pxr_toplevel_epilogue)
12021215
)
12031216
endif()
12041217

1218+
# When building a monolithic library (static or shared) we want all
1219+
# API functions to be exported. So add FOO_EXPORTS=1 for every
1220+
# library in PXR_OBJECT_LIBS, where FOO is the uppercase version
1221+
# of the library name, to every library in PXR_OBJECT_LIBS.
1222+
set(exports "")
1223+
foreach(lib ${PXR_OBJECT_LIBS})
1224+
string(TOUPPER ${lib} uppercaseName)
1225+
list(APPEND exports "${uppercaseName}_EXPORTS=1")
1226+
endforeach()
1227+
1228+
if (TARGET python)
1229+
# The boost python target uses a different export macro so
1230+
# add that as well.
1231+
list(APPEND exports "PXR_BOOST_PYTHON_SOURCE=1")
1232+
endif()
1233+
1234+
foreach(lib ${PXR_OBJECT_LIBS})
1235+
target_compile_definitions(${lib} PRIVATE ${exports})
1236+
endforeach()
1237+
12051238
if(BUILD_SHARED_LIBS)
12061239
target_link_libraries(usd_m
12071240
PUBLIC
@@ -1215,13 +1248,7 @@ function(pxr_toplevel_epilogue)
12151248
_pxr_add_rpath(rpath "${CMAKE_INSTALL_PREFIX}/lib")
12161249
_pxr_install_rpath(rpath usd_m)
12171250
else()
1218-
# When building a static monolithic library we want all API functions to be
1219-
# exported. So add FOO_EXPORTS=1 for every library in PXR_OBJECT_LIBS,
1220-
# where FOO is the uppercase version of the library name, to every
1221-
# library in PXR_OBJECT_LIBS.
12221251
foreach(lib ${PXR_OBJECT_LIBS})
1223-
string(TOUPPER ${lib} uppercaseName)
1224-
target_compile_definitions(${lib} PRIVATE "${uppercaseName}_EXPORTS=1")
12251252
target_link_libraries(usd_m
12261253
PUBLIC
12271254
${lib}

docs/_static/css/pxr_custom.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
--monospace: ui-monospace, -apple-system-ui-serif, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, 'Andale Mono', 'Ubuntu Mono', monospace;
66
}
77

8+
.document {
9+
container-type: inline-size;
10+
container-name: document;
11+
}
12+
813
body, .rst-content {
914
font-family: var(--san-serif);
1015
}
@@ -37,6 +42,10 @@ h4 {
3742
text-decoration: underline;
3843
}
3944

45+
.mono {
46+
overflow-wrap: break-word;
47+
}
48+
4049
.mono, .rst-content .linenodiv pre, .rst-content div[class^=highlight] pre, .rst-content pre.literal-block {
4150
font-family: var(--monospace)
4251
}
@@ -153,3 +162,24 @@ div.usd-tutorial-admonition > p {
153162
color: #6A0E0E;
154163
}
155164

165+
@container document (max-width: 72rem) {
166+
.fourcolumn {
167+
-webkit-column-count: 3; /* Chrome, Safari, Opera */
168+
-moz-column-count: 3; /* Firefox */
169+
column-count: 3;
170+
}
171+
}
172+
173+
@container document (max-width: 48rem) {
174+
.fourcolumn {
175+
-webkit-column-count: 2; /* Chrome, Safari, Opera */
176+
-moz-column-count: 2; /* Firefox */
177+
column-count: 2;
178+
}
179+
180+
.threecolumn {
181+
-webkit-column-count: 2; /* Chrome, Safari, Opera */
182+
-moz-column-count: 2; /* Firefox */
183+
column-count: 2;
184+
}
185+
}

0 commit comments

Comments
 (0)