Skip to content

Commit

Permalink
Updating blast to 5.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nvidia-bgaldrikian committed Jan 23, 2024
1 parent 85befb6 commit 561a0df
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 57 deletions.
2 changes: 1 addition & 1 deletion blast/VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.3
5.0.4
4 changes: 2 additions & 2 deletions blast/deps/repo-deps.packman.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<project toolsVersion="5.0">
<dependency name="repo_man" linkPath="../_repo/deps/repo_man">
<package name="repo_man" version="1.37.0" />
<package name="repo_man" version="1.48.1" />
</dependency>
<dependency name="repo_build" linkPath="../_repo/deps/repo_build" tags="non-redist">
<package name="repo_build" version="0.44.4" />
<package name="repo_build" version="0.55.3" />
</dependency>
</project>
6 changes: 6 additions & 0 deletions blast/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [5.0.4] - 22-January-2024

### Bugfixes
- Fixed issue https://github.com/NVIDIA-Omniverse/PhysX/issues/207, Island removal doesn't work as expected


## [5.0.3] - 1-November-2023

### Bugfixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ Mesh* FractureToolImpl::createChunkMesh(int32_t chunkInfoIndex, bool splitUVs /*
if (splitUVs)
compactifyAndTransformVertexBuffer<VrtComp>(_vertexBuffer, edges, sourceVertices, numSourceVerts, numEdges, tm);
else
compactifyAndTransformVertexBuffer<VrtCompNoUV>(_vertexBuffer, edges, sourceVertices, numSourceVerts, numEdges, tm);
compactifyAndTransformVertexBuffer<VrtCompNoUV>(_vertexBuffer, edges, sourceVertices, numSourceVerts, numEdges, tm);

// now fix the order of the edges
// compacting the vertex buffer can put them out of order
Expand Down Expand Up @@ -629,7 +629,7 @@ Mesh* FractureToolImpl::createChunkMesh(int32_t chunkInfoIndex, bool splitUVs /*
vert.uv[0].x = (vert.uv[0].x - bnd.minimum.x) * scale;
vert.uv[0].y = (vert.uv[0].y - bnd.minimum.y) * scale;
}

// build a new mesh from the converted data
Mesh* chunkMesh = new MeshImpl(vertices, edges, facets, numVerts, numEdges, facetsCount);
NVBLAST_FREE(edges);
Expand Down Expand Up @@ -2105,8 +2105,11 @@ int32_t FractureToolImpl::islandDetectionAndRemoving(int32_t chunkId, bool creat
}
}

if (createAtNewDepth == false || chunkId != 0)
if (createAtNewDepth == false)
{
// We need to flag the chunk as changed, in case someone is calling this function directly
// Otherwise when called as part of automatic island removal, chunks are already flagged as changed
mChunkData[chunkInfoIndex].isChanged = true;
delete mChunkData[chunkInfoIndex].getMesh();
Mesh* newMesh0 =
new MeshImpl(compVertices[0].data(), compEdges[0].data(), compFacets[0].data(),
Expand Down
34 changes: 13 additions & 21 deletions blast/tools/packman/bootstrap/configure.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: Copyright 2019 NVIDIA CORPORATION
:: Copyright 2019-2023 NVIDIA CORPORATION
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
:: See the License for the specific language governing permissions and
:: limitations under the License.

set PM_PACKMAN_VERSION=6.56
set PM_PACKMAN_VERSION=7.10.1

:: Specify where packman command is rooted
set PM_INSTALL_PATH=%~dp0..
Expand Down Expand Up @@ -59,7 +59,7 @@ if defined PM_PYTHON_EXT (
goto PACKMAN
)

set PM_PYTHON_VERSION=3.7.13-nv1-windows-x86_64
set PM_PYTHON_VERSION=3.10.5-1-windows-x86_64
set PM_PYTHON_BASE_DIR=%PM_PACKAGES_ROOT%\python
set PM_PYTHON_DIR=%PM_PYTHON_BASE_DIR%\%PM_PYTHON_VERSION%
set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
Expand Down Expand Up @@ -95,11 +95,16 @@ if exist "%PM_PYTHON%" (
if exist "%PM_PYTHON_DIR%" ( rd /s /q "%PM_PYTHON_DIR%" > nul )
)

:: Perform atomic rename
rename "%TEMP_FOLDER_NAME%" "%PM_PYTHON_VERSION%" 1> nul
:: Failure during move, need to clean up and abort
:: Perform atomic move (allowing ovewrite, /y)
move /y "%TEMP_FOLDER_NAME%" "%PM_PYTHON_DIR%" 1> nul
:: Verify that python.exe is now where we expect
if exist "%PM_PYTHON%" goto PACKMAN

:: Wait a second and try again (can help with access denied weirdness)
timeout /t 1 /nobreak 1> nul
move /y "%TEMP_FOLDER_NAME%" "%PM_PYTHON_DIR%" 1> nul
if %errorlevel% neq 0 (
echo !!! Error renaming python !!!
echo !!! Error moving python %TEMP_FOLDER_NAME% -> %PM_PYTHON_DIR% !!!
call :CLEAN_UP_TEMP_FOLDER
goto ERROR
)
Expand All @@ -114,7 +119,7 @@ if defined PM_MODULE_DIR_EXT (

set PM_MODULE=%PM_MODULE_DIR%\run.py

if exist "%PM_MODULE%" goto ENSURE_7ZA
if exist "%PM_MODULE%" goto END

:: Clean out broken PM_MODULE_DIR if it exists
if exist "%PM_MODULE_DIR%" ( rd /s /q "%PM_MODULE_DIR%" > nul )
Expand All @@ -137,19 +142,6 @@ if %errorlevel% neq 0 (

del "%TARGET%"

:ENSURE_7ZA
set PM_7Za_VERSION=22.01-1
set PM_7Za_PATH=%PM_PACKAGES_ROOT%\7za\%PM_7ZA_VERSION%
if exist "%PM_7Za_PATH%" goto END
set PM_7Za_PATH=%PM_PACKAGES_ROOT%\chk\7za\%PM_7ZA_VERSION%
if exist "%PM_7Za_PATH%" goto END

"%PM_PYTHON%" -S -s -u -E "%PM_MODULE%" pull "%PM_MODULE_DIR%\deps.packman.xml"
if %errorlevel% neq 0 (
echo !!! Error fetching packman dependencies !!!
goto ERROR
)

goto END

:ERROR_MKDIR_PACKAGES_ROOT
Expand Down
5 changes: 3 additions & 2 deletions blast/tools/packman/config.packman.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<config remotes="cloudfront">
<remote2 name="cloudfront">
<transport actions="download" protocol="https" packageLocation="d4i3qtqj3r0z5.cloudfront.net/${name}@${version}" />
<transport actions="list upload" configUrl="https://gitlab-master.nvidia.com/hfannar/packman-transports/raw/main/d4i3qtqj3r0z5.cloudfront.toml" />
<transport actions="download" protocol="http" packageLocation="d4i3qtqj3r0z5.cloudfront.net/${name}@${version}" />
<transport actions="upload" protocol="s3" packageLocation="packages-for-cloudfront" />
<transport actions="list" protocol="http" packageLocation="omnipackages.nvidia.com/api/v1/list/cloudfront" />
</remote2>
</config>
22 changes: 5 additions & 17 deletions blast/tools/packman/packman
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2019-2020 NVIDIA CORPORATION
# Copyright 2019-2023 NVIDIA CORPORATION

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,11 +18,13 @@ set -eu

if echo ${PM_VERBOSITY-} | grep -i "debug" > /dev/null ; then
set -x
PM_CURL_SILENT=""
PM_WGET_QUIET=""
else
PM_CURL_SILENT="-s -S"
PM_WGET_QUIET="--quiet"
fi
PM_PACKMAN_VERSION=6.56
PM_PACKMAN_VERSION=7.10.1

# This is necessary for newer macOS
if [ `uname` == 'Darwin' ]; then
Expand Down Expand Up @@ -85,7 +87,7 @@ install_python()
{
PLATFORM=`uname`
PROCESSOR=`uname -m`
PYTHON_VERSION=3.7.13-nv1
PYTHON_VERSION=3.10.5-1

if [ $PLATFORM == 'Darwin' ]; then
PYTHON_PACKAGE=$PYTHON_VERSION-macos-x86_64
Expand Down Expand Up @@ -154,20 +156,6 @@ if [ ! -f "$PM_MODULE" ]; then
fi
fi

# Ensure 7za package exists:
PM_7za_VERSION=22.01-1
export PM_7za_PATH="$PM_PACKAGES_ROOT/7za/$PM_7za_VERSION"
if [ ! -d "$PM_7za_PATH" ]; then
export PM_7za_PATH="$PM_PACKAGES_ROOT/chk/7za/$PM_7za_VERSION"
if [ ! -d "$PM_7za_PATH" ]; then
"$PM_PYTHON" -S -s -u -E "$PM_MODULE" pull "$PM_MODULE_DIR/deps.packman.xml"
if [ "$?" -ne 0 ]; then
echo "Failure while installing required 7za package"
exit 1
fi
fi
fi

# Generate temporary file name for environment variables:
PM_VAR_PATH=`mktemp -u -t tmp.$$.pmvars.XXXXXX`

Expand Down
35 changes: 32 additions & 3 deletions blast/tools/packman/packman.cmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
:: RUN_PM_MODULE must always be at the same spot for packman update to work (batch reloads file during update!)
:: [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
:: [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
:: Reset errorlevel status (don't inherit from caller)
@call :ECHO_AND_RESET_ERROR
:: You can remove the call below if you do your own manual configuration of the dev machines
call "%~dp0\bootstrap\configure.bat"

:: You can remove this section if you do your own manual configuration of the dev machines
call :CONFIGURE
if %errorlevel% neq 0 ( exit /b %errorlevel% )

:: Everything below is mandatory
if not defined PM_PYTHON goto :PYTHON_ENV_ERROR
if not defined PM_MODULE goto :MODULE_ENV_ERROR
Expand Down Expand Up @@ -46,6 +47,7 @@ exit /b 1
@echo Error while processing and setting environment variables!
exit /b 1

:: pad [xxxx]
:ECHO_AND_RESET_ERROR
@echo off
if /I "%PM_VERBOSITY%"=="debug" (
Expand All @@ -58,3 +60,30 @@ exit /b 0
for /f "delims=" %%a in ('%PM_PYTHON% -S -s -u -E -c "import tempfile;file = tempfile.NamedTemporaryFile(mode='w+t', delete=False);print(file.name)"') do (set PM_VAR_PATH=%%a)
set PM_VAR_PATH_ARG=--var-path="%PM_VAR_PATH%"
goto :RUN_PM_MODULE

:CONFIGURE
:: Must capture and set code page to work around issue #279, powershell invocation mutates console font
:: This issue only happens in Windows CMD shell when using 65001 code page. Some Git Bash implementations
:: don't support chcp so this workaround is a bit convoluted.
:: Test for chcp:
chcp > nul 2>&1
if %errorlevel% equ 0 (
for /f "tokens=2 delims=:" %%a in ('chcp') do (set PM_OLD_CODE_PAGE=%%a)
) else (
call :ECHO_AND_RESET_ERROR
)
:: trim leading space (this is safe even when PM_OLD_CODE_PAGE has not been set)
set PM_OLD_CODE_PAGE=%PM_OLD_CODE_PAGE:~1%
if "%PM_OLD_CODE_PAGE%" equ "65001" (
chcp 437 > nul
set PM_RESTORE_CODE_PAGE=1
)
call "%~dp0\bootstrap\configure.bat"
set PM_CONFIG_ERRORLEVEL=%errorlevel%
if defined PM_RESTORE_CODE_PAGE (
:: Restore code page
chcp %PM_OLD_CODE_PAGE% > nul
)
set PM_OLD_CODE_PAGE=
set PM_RESTORE_CODE_PAGE=
exit /b %PM_CONFIG_ERRORLEVEL%
6 changes: 3 additions & 3 deletions blast/tools/packman/packmanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def init():
"""
major = sys.version_info[0]
minor = sys.version_info[1]
if major != 3 or minor != 7:
if major != 3 or minor != 10:
raise RuntimeError(
f"This version of packman requires Python 3.7.x, but {major}.{minor} was provided"
f"This version of packman requires Python 3.10.x, but {major}.{minor} was provided"
)
conf_dir = os.path.dirname(os.path.abspath(__file__))
os.environ["PM_INSTALL_PATH"] = conf_dir
Expand All @@ -56,7 +56,7 @@ def get_packages_root(conf_dir: str) -> str:
elif platform_name == "Darwin":
# macOS
root = os.path.join(
os.path.expanduser("~"), "/Library/Application Support/packman-cache"
os.path.expanduser("~"), "Library/Application Support/packman-cache"
)
elif platform_name == "Linux":
try:
Expand Down
17 changes: 14 additions & 3 deletions blast/tools/packman/python.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@
:: limitations under the License.

@echo off
setlocal
setlocal enableextensions

call "%~dp0\packman" init
set "PYTHONPATH=%PM_MODULE_DIR%;%PYTHONPATH%"
set PYTHONNOUSERSITE=1
"%PM_PYTHON%" -u %*

if not defined PYTHONNOUSERSITE (
set PYTHONNOUSERSITE=1
)

REM For performance, default to unbuffered; however, allow overriding via
REM PYTHONUNBUFFERED=0 since PYTHONUNBUFFERED on windows can truncate output
REM when printing long strings
if not defined PYTHONUNBUFFERED (
set PYTHONUNBUFFERED=1
)

"%PM_PYTHON%" %*
14 changes: 12 additions & 2 deletions blast/tools/packman/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ if [ ! -f "$PACKMAN_CMD" ]; then
fi
source "$PACKMAN_CMD" init
export PYTHONPATH="${PM_MODULE_DIR}:${PYTHONPATH}"
export PYTHONNOUSERSITE=1

if [ -z "${PYTHONNOUSERSITE:-}" ]; then
export PYTHONNOUSERSITE=1
fi

# For performance, default to unbuffered; however, allow overriding via
# PYTHONUNBUFFERED=0 since PYTHONUNBUFFERED on windows can truncate output
# when printing long strings
if [ -z "${PYTHONUNBUFFERED:-}" ]; then
export PYTHONUNBUFFERED=1
fi

# workaround for our python not shipping with certs
if [[ -z ${SSL_CERT_DIR:-} ]]; then
export SSL_CERT_DIR=/etc/ssl/certs/
fi

"${PM_PYTHON}" -u "$@"
"${PM_PYTHON}" "$@"

0 comments on commit 561a0df

Please sign in to comment.