Skip to content

Commit 6252ef7

Browse files
authored
Falcor 4.3 (#264)
1 parent c0729e8 commit 6252ef7

File tree

466 files changed

+22295
-12712
lines changed

Some content is hidden

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

466 files changed

+22295
-12712
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ Source/Externals/.packman/*
1717
Media
1818
Tools/.packman
1919
Tests/data
20+
*.tlog

Build/deploycommon.bat

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,52 @@ rem %4 -> WINDSDK Directory
88

99
setlocal
1010

11-
SET ExtDir=%1\Externals\.packman\
12-
SET OutDir=%3
13-
SET FalcorDir=%1\Falcor\
11+
set ExtDir=%1\Externals\.packman\
12+
set OutDir=%3
13+
set FalcorDir=%1\Falcor\
1414
if not exist "%OutDir%" mkdir "%OutDir%"
1515

16+
set IsDebug=0
17+
if "%OutDir:~-6%" == "Debug\" set IsDebug=1
18+
1619
rem Copy Falcor's files
17-
IF not exist %OutDir%\Data\ mkdir %OutDir%\Data >nul
20+
if not exist %OutDir%\Data\ mkdir %OutDir%\Data >nul
1821
call %~dp0\deployproject.bat %FalcorDir% %OutDir%
1922

2023
rem Copy externals
21-
robocopy %ExtDir%\Python\ %OutDir% Python36*.dll /r:0 >nul
22-
robocopy %ExtDir%\Python %OutDir%\Python /E /r:0 >nul
23-
robocopy %ExtDir%\AntTweakBar\lib %OutDir% AntTweakBar64.dll /r:0 >nul
24-
robocopy %ExtDir%\FreeImage %OutDir% freeimage.dll /r:0 >nul
25-
robocopy %ExtDir%\assimp\bin\%2 %OutDir% *.dll /r:0 >nul
26-
robocopy %ExtDir%\FFMpeg\bin\%2 %OutDir% *.dll /r:0 >nul
27-
robocopy %ExtDir%\Slang\bin\windows-x64\release %OutDir% *.dll /r:0 >nul
28-
robocopy %ExtDir%\GLFW\lib %OutDir% *.dll /r:0 >nul
24+
if %IsDebug% EQU 0 (
25+
robocopy %ExtDir%\deps\bin\ %OutDir% /E /r:0 >nul
26+
) else (
27+
robocopy %ExtDir%\deps\debug\bin\ %OutDir% /E /r:0 >nul
28+
robocopy %ExtDir%\deps\bin\ %OutDir% assimp-vc142-mt.* /r:0 >nul
29+
rem Needed for OpenVDB (debug version links to release version of Half_2.5)
30+
robocopy %ExtDir%\deps\bin\ %OutDir% Half-2_5.* /r:0 >nul
31+
)
32+
robocopy %ExtDir%\python\ %OutDir% Python36*.dll /r:0 >nul
33+
robocopy %ExtDir%\python %OutDir%\Python /E /r:0 >nul
34+
robocopy %ExtDir%\slang\bin\windows-x64\release %OutDir% *.dll /r:0 >nul
2935
robocopy %ExtDir%\WinPixEventRuntime\bin\x64 %OutDir% WinPixEventRuntime.dll /r:0 >nul
3036
robocopy "%~4\Redist\D3D\%2" %OutDir% dxil.dll /r:0 >nul
3137
robocopy "%~4\Redist\D3D\%2" %OutDir% dxcompiler.dll /r:0 >nul
38+
robocopy %ExtDir%\Cuda\bin\ %OutDir% cudart*.dll /r:0 >nul
39+
robocopy %ExtDir%\Cuda\bin\ %OutDir% nvrtc*.dll /r:0 >nul
3240

3341
rem Copy NVAPI
34-
set NvApiDir=%ExtDir%\NVAPI
35-
IF exist %NvApiDir% (
36-
IF not exist %OutDir%\Shaders\NVAPI mkdir %OutDir%\Shaders\NVAPI >nul
37-
copy /y %NvApiDir%\nvHLSLExtns.h %OutDir%\Shaders\NVAPI
38-
copy /y %NvApiDir%\nvHLSLExtnsInternal.h %OutDir%\Shaders\NVAPI
39-
copy /y %NvApiDir%\nvShaderExtnEnums.h %OutDir%\Shaders\NVAPI
42+
set NvApiDir=%ExtDir%\nvapi
43+
set NvApiTargetDir=%OutDir%\Shaders\NVAPI
44+
if exist %NvApiDir% (
45+
if not exist %NvApiTargetDir% mkdir %NvApiTargetDir% >nul
46+
copy /y %NvApiDir%\nvHLSLExtns.h %NvApiTargetDir%
47+
copy /y %NvApiDir%\nvHLSLExtnsInternal.h %NvApiTargetDir%
48+
copy /y %NvApiDir%\nvShaderExtnEnums.h %NvApiTargetDir%
49+
)
50+
51+
rem Copy NanoVDB
52+
set NanoVDBApiDir=%ExtDir%\nanovdb
53+
set NanoVDBTargetDir=%OutDir%\Shaders\NanoVDB
54+
if exist %NanoVDBApiDir% (
55+
if not exist %NanoVDBTargetDir% mkdir %NanoVDBTargetDir% >nul
56+
copy /y %NanoVDBApiDir%\include\nanovdb\PNanoVDB.h %NanoVDBTargetDir%
4057
)
4158

4259
rem robocopy sets the error level to something that is not zero even if the copy operation was successful. Set the error level to zero
Lines changed: 100 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,146 +1,160 @@
1-
@set PM_PACKMAN_VERSION=5.14
1+
:: Copyright 2019 NVIDIA CORPORATION
2+
::
3+
:: Licensed under the Apache License, Version 2.0 (the "License");
4+
:: you may not use this file except in compliance with the License.
5+
:: You may obtain a copy of the License at
6+
::
7+
:: http://www.apache.org/licenses/LICENSE-2.0
8+
::
9+
:: Unless required by applicable law or agreed to in writing, software
10+
:: distributed under the License is distributed on an "AS IS" BASIS,
11+
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
:: See the License for the specific language governing permissions and
13+
:: limitations under the License.
14+
15+
set PM_PACKMAN_VERSION=6.15
216

317
:: Specify where packman command is rooted
4-
@set PM_INSTALL_PATH=%~dp0..
18+
set PM_INSTALL_PATH=%~dp0..
519

620
:: The external root may already be configured and we should do minimal work in that case
7-
@if defined PM_PACKAGES_ROOT goto ENSURE_DIR
21+
if defined PM_PACKAGES_ROOT goto ENSURE_DIR
822

923
:: If the folder isn't set we assume that the best place for it is on the drive that we are currently
1024
:: running from
11-
@set PM_DRIVE=%CD:~0,2%
25+
set PM_DRIVE=%CD:~0,2%
1226

13-
@set PM_PACKAGES_ROOT=%PM_DRIVE%\packman-repo
27+
set PM_PACKAGES_ROOT=%PM_DRIVE%\packman-repo
1428

1529
:: We use *setx* here so that the variable is persisted in the user environment
16-
@echo Setting user environment variable PM_PACKAGES_ROOT to %PM_PACKAGES_ROOT%
17-
@setx PM_PACKAGES_ROOT %PM_PACKAGES_ROOT%
18-
@if errorlevel 1 goto ERROR
30+
echo Setting user environment variable PM_PACKAGES_ROOT to %PM_PACKAGES_ROOT%
31+
setx PM_PACKAGES_ROOT %PM_PACKAGES_ROOT%
32+
if %errorlevel% neq 0 ( goto ERROR )
1933

2034
:: The above doesn't work properly from a build step in VisualStudio because a separate process is
2135
:: spawned for it so it will be lost for subsequent compilation steps - VisualStudio must
2236
:: be launched from a new process. We catch this odd-ball case here:
23-
@if defined PM_DISABLE_VS_WARNING goto ENSURE_DIR
24-
@if not defined VSLANG goto ENSURE_DIR
25-
@echo The above is a once-per-computer operation. Unfortunately VisualStudio cannot pick up environment change
26-
@echo unless *VisualStudio is RELAUNCHED*.
27-
@echo If you are launching VisualStudio from command line or command line utility make sure
28-
@echo you have a fresh launch environment (relaunch the command line or utility).
29-
@echo If you are using 'linkPath' and referring to packages via local folder links you can safely ignore this warning.
30-
@echo You can disable this warning by setting the environment variable PM_DISABLE_VS_WARNING.
31-
@echo.
37+
if defined PM_DISABLE_VS_WARNING goto ENSURE_DIR
38+
if not defined VSLANG goto ENSURE_DIR
39+
echo The above is a once-per-computer operation. Unfortunately VisualStudio cannot pick up environment change
40+
echo unless *VisualStudio is RELAUNCHED*.
41+
echo If you are launching VisualStudio from command line or command line utility make sure
42+
echo you have a fresh launch environment (relaunch the command line or utility).
43+
echo If you are using 'linkPath' and referring to packages via local folder links you can safely ignore this warning.
44+
echo You can disable this warning by setting the environment variable PM_DISABLE_VS_WARNING.
45+
echo.
3246

3347
:: Check for the directory that we need. Note that mkdir will create any directories
34-
:: that may be needed in the path
48+
:: that may be needed in the path
3549
:ENSURE_DIR
36-
@if not exist "%PM_PACKAGES_ROOT%" (
37-
@echo Creating directory %PM_PACKAGES_ROOT%
38-
@mkdir "%PM_PACKAGES_ROOT%"
39-
@if errorlevel 1 goto ERROR_MKDIR_PACKAGES_ROOT
50+
if not exist "%PM_PACKAGES_ROOT%" (
51+
echo Creating directory %PM_PACKAGES_ROOT%
52+
mkdir "%PM_PACKAGES_ROOT%"
4053
)
54+
if %errorlevel% neq 0 ( goto ERROR_MKDIR_PACKAGES_ROOT )
4155

4256
:: The Python interpreter may already be externally configured
43-
@if defined PM_PYTHON_EXT (
44-
@set PM_PYTHON=%PM_PYTHON_EXT%
45-
@goto PACKMAN
57+
if defined PM_PYTHON_EXT (
58+
set PM_PYTHON=%PM_PYTHON_EXT%
59+
goto PACKMAN
4660
)
4761

48-
@set PM_PYTHON_VERSION=2.7.14-windows-x86_32
49-
@set PM_PYTHON_BASE_DIR=%PM_PACKAGES_ROOT%\python
50-
@set PM_PYTHON_DIR=%PM_PYTHON_BASE_DIR%\%PM_PYTHON_VERSION%
51-
@set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
62+
set PM_PYTHON_VERSION=3.7.4-windows-x86_64
63+
set PM_PYTHON_BASE_DIR=%PM_PACKAGES_ROOT%\python
64+
set PM_PYTHON_DIR=%PM_PYTHON_BASE_DIR%\%PM_PYTHON_VERSION%
65+
set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
5266

53-
@if exist "%PM_PYTHON%" goto PACKMAN
54-
@if not exist "%PM_PYTHON_BASE_DIR%" call :CREATE_PYTHON_BASE_DIR
67+
if exist "%PM_PYTHON%" goto PACKMAN
68+
if not exist "%PM_PYTHON_BASE_DIR%" call :CREATE_PYTHON_BASE_DIR
5569

56-
@set PM_PYTHON_PACKAGE=python@%PM_PYTHON_VERSION%.cab
57-
@for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do @set TEMP_FILE_NAME=%%a
58-
@set TARGET=%TEMP_FILE_NAME%.zip
59-
@call "%~dp0fetch_file_from_s3.cmd" %PM_PYTHON_PACKAGE% "%TARGET%"
60-
@if errorlevel 1 goto ERROR
70+
set PM_PYTHON_PACKAGE=python@%PM_PYTHON_VERSION%.cab
71+
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do set TEMP_FILE_NAME=%%a
72+
set TARGET=%TEMP_FILE_NAME%.zip
73+
call "%~dp0fetch_file_from_s3.cmd" %PM_PYTHON_PACKAGE% "%TARGET%"
74+
if %errorlevel% neq 0 ( goto ERROR )
6175

62-
@for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_folder.ps1" -parentPath "%PM_PYTHON_BASE_DIR%"') do @set TEMP_FOLDER_NAME=%%a
63-
@echo Unpacking Python interpreter ...
64-
@"%SystemRoot%\system32\expand.exe" -F:* "%TARGET%" "%TEMP_FOLDER_NAME%" 1> nul
65-
@del "%TARGET%"
76+
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_folder.ps1" -parentPath "%PM_PYTHON_BASE_DIR%"') do set TEMP_FOLDER_NAME=%%a
77+
echo Unpacking Python interpreter ...
78+
"%SystemRoot%\system32\expand.exe" -F:* "%TARGET%" "%TEMP_FOLDER_NAME%" 1> nul
79+
del "%TARGET%"
6680
:: Failure during extraction to temp folder name, need to clean up and abort
67-
@if errorlevel 1 (
68-
@call :CLEAN_UP_TEMP_FOLDER
69-
@goto ERROR
81+
if %errorlevel% neq 0 (
82+
call :CLEAN_UP_TEMP_FOLDER
83+
goto ERROR
7084
)
7185

7286
:: If python has now been installed by a concurrent process we need to clean up and then continue
73-
@if exist "%PM_PYTHON%" (
74-
@call :CLEAN_UP_TEMP_FOLDER
75-
@goto PACKMAN
87+
if exist "%PM_PYTHON%" (
88+
call :CLEAN_UP_TEMP_FOLDER
89+
goto PACKMAN
7690
) else (
77-
@if exist "%PM_PYTHON_DIR%" ( @rd /s /q "%PM_PYTHON_DIR%" > nul )
91+
if exist "%PM_PYTHON_DIR%" ( rd /s /q "%PM_PYTHON_DIR%" > nul )
7892
)
7993

8094
:: Perform atomic rename
81-
@rename "%TEMP_FOLDER_NAME%" "%PM_PYTHON_VERSION%" 1> nul
95+
rename "%TEMP_FOLDER_NAME%" "%PM_PYTHON_VERSION%" 1> nul
8296
:: Failure during move, need to clean up and abort
83-
@if errorlevel 1 (
84-
@call :CLEAN_UP_TEMP_FOLDER
85-
@goto ERROR
97+
if %errorlevel% neq 0 (
98+
call :CLEAN_UP_TEMP_FOLDER
99+
goto ERROR
86100
)
87101

88102
:PACKMAN
89103
:: The packman module may already be externally configured
90-
@if defined PM_MODULE_DIR_EXT (
91-
@set PM_MODULE_DIR=%PM_MODULE_DIR_EXT%
104+
if defined PM_MODULE_DIR_EXT (
105+
set PM_MODULE_DIR=%PM_MODULE_DIR_EXT%
92106
) else (
93-
@set PM_MODULE_DIR=%PM_PACKAGES_ROOT%\packman-common\%PM_PACKMAN_VERSION%
107+
set PM_MODULE_DIR=%PM_PACKAGES_ROOT%\packman-common\%PM_PACKMAN_VERSION%
94108
)
95109

96-
@set PM_MODULE=%PM_MODULE_DIR%\packman.py
110+
set PM_MODULE=%PM_MODULE_DIR%\packman.py
97111

98-
@if exist "%PM_MODULE%" goto ENSURE_7ZA
112+
if exist "%PM_MODULE%" goto ENSURE_7ZA
99113

100-
@set PM_MODULE_PACKAGE=packman-common@%PM_PACKMAN_VERSION%.zip
101-
@for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do @set TEMP_FILE_NAME=%%a
102-
@set TARGET=%TEMP_FILE_NAME%
103-
@call "%~dp0fetch_file_from_s3.cmd" %PM_MODULE_PACKAGE% "%TARGET%"
104-
@if errorlevel 1 goto ERROR
114+
set PM_MODULE_PACKAGE=packman-common@%PM_PACKMAN_VERSION%.zip
115+
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do set TEMP_FILE_NAME=%%a
116+
set TARGET=%TEMP_FILE_NAME%
117+
call "%~dp0fetch_file_from_s3.cmd" %PM_MODULE_PACKAGE% "%TARGET%"
118+
if %errorlevel% neq 0 ( goto ERROR )
105119

106-
@echo Unpacking ...
107-
@"%PM_PYTHON%" -S -s -u -E "%~dp0\install_package.py" "%TARGET%" "%PM_MODULE_DIR%"
108-
@if errorlevel 1 goto ERROR
120+
echo Unpacking ...
121+
"%PM_PYTHON%" -S -s -u -E "%~dp0\install_package.py" "%TARGET%" "%PM_MODULE_DIR%"
122+
if %errorlevel% neq 0 ( goto ERROR )
109123

110-
@del "%TARGET%"
124+
del "%TARGET%"
111125

112126
:ENSURE_7ZA
113-
@set PM_7Za_VERSION=16.02.4
114-
@set PM_7Za_PATH=%PM_PACKAGES_ROOT%\7za\%PM_7ZA_VERSION%
115-
@if exist "%PM_7Za_PATH%" goto END
116-
@set PM_7Za_PATH=%PM_PACKAGES_ROOT%\chk\7za\%PM_7ZA_VERSION%
117-
@if exist "%PM_7Za_PATH%" goto END
127+
set PM_7Za_VERSION=16.02.4
128+
set PM_7Za_PATH=%PM_PACKAGES_ROOT%\7za\%PM_7ZA_VERSION%
129+
if exist "%PM_7Za_PATH%" goto END
130+
set PM_7Za_PATH=%PM_PACKAGES_ROOT%\chk\7za\%PM_7ZA_VERSION%
131+
if exist "%PM_7Za_PATH%" goto END
118132

119-
@"%PM_PYTHON%" -S -s -u -E "%PM_MODULE%" pull "%PM_MODULE_DIR%\deps.packman.xml"
120-
@if errorlevel 1 goto ERROR
133+
"%PM_PYTHON%" -S -s -u -E "%PM_MODULE%" pull "%PM_MODULE_DIR%\deps.packman.xml"
134+
if %errorlevel% neq 0 ( goto ERROR )
121135

122-
@goto END
136+
goto END
123137

124138
:ERROR_MKDIR_PACKAGES_ROOT
125-
@echo Failed to automatically create packman packages repo at %PM_PACKAGES_ROOT%.
126-
@echo Please set a location explicitly that packman has permission to write to, by issuing:
127-
@echo.
128-
@echo setx PM_PACKAGES_ROOT {path-you-choose-for-storing-packman-packages-locally}
129-
@echo.
130-
@echo Then launch a new command console for the changes to take effect and run packman command again.
131-
@exit /B 1
139+
echo Failed to automatically create packman packages repo at %PM_PACKAGES_ROOT%.
140+
echo Please set a location explicitly that packman has permission to write to, by issuing:
141+
echo.
142+
echo setx PM_PACKAGES_ROOT {path-you-choose-for-storing-packman-packages-locally}
143+
echo.
144+
echo Then launch a new command console for the changes to take effect and run packman command again.
145+
exit /B %errorlevel%
132146

133147
:ERROR
134-
@echo !!! Failure while configuring local machine :( !!!
135-
@exit /B 1
148+
echo !!! Failure while configuring local machine :( !!!
149+
exit /B %errorlevel%
136150

137151
:CLEAN_UP_TEMP_FOLDER
138-
@rd /S /Q "%TEMP_FOLDER_NAME%"
139-
@exit /B
152+
rd /S /Q "%TEMP_FOLDER_NAME%"
153+
exit /B
140154

141155
:CREATE_PYTHON_BASE_DIR
142156
:: We ignore errors and clean error state - if two processes create the directory one will fail which is fine
143-
@md "%PM_PYTHON_BASE_DIR%" > nul 2>&1
144-
@exit /B 0
157+
md "%PM_PYTHON_BASE_DIR%" > nul 2>&1
158+
exit /B 0
145159

146160
:END

Build/packman/bootstrap/fetch_file_from_s3.cmd

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1+
:: Copyright 2019 NVIDIA CORPORATION
2+
::
3+
:: Licensed under the Apache License, Version 2.0 (the "License");
4+
:: you may not use this file except in compliance with the License.
5+
:: You may obtain a copy of the License at
6+
::
7+
:: http://www.apache.org/licenses/LICENSE-2.0
8+
::
9+
:: Unless required by applicable law or agreed to in writing, software
10+
:: distributed under the License is distributed on an "AS IS" BASIS,
11+
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
:: See the License for the specific language governing permissions and
13+
:: limitations under the License.
14+
115
:: You need to specify <package-name> <target-path> as input to this command
216
@setlocal
317
@set PACKAGE_NAME=%1
418
@set TARGET_PATH=%2
519

6-
@echo Fetching %PACKAGE_NAME% from packman-bootstrap over HTTP ...
20+
@echo Fetching %PACKAGE_NAME% ...
721

822
@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0fetch_file_from_s3.ps1" -sourceName %PACKAGE_NAME% ^
923
-output %TARGET_PATH%

Build/packman/bootstrap/fetch_file_from_s3.ps1

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1+
<#
2+
Copyright 2019 NVIDIA CORPORATION
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
#>
16+
117
param(
218
[Parameter(Mandatory=$true)][string]$sourceName=$null,
319
[string]$output="out.exe"
420
)
5-
$source = "http://packman-bootstrap.s3.amazonaws.com/" + $sourceName
21+
$source = "http://bootstrap.packman.nvidia.com/" + $sourceName
622
$filename = $output
723

824
$triesLeft = 3
@@ -15,7 +31,7 @@ do
1531

1632
try
1733
{
18-
Write-Host "Connecting to S3 ..."
34+
Write-Host "Connecting to bootstrap.packman.nvidia.com ..."
1935
$res = $req.GetResponse()
2036
if($res.StatusCode -eq "OK") {
2137
Write-Host "Downloading ..."
@@ -35,13 +51,13 @@ do
3551
Write-Progress "Downloading $url" "Saving $total bytes..." -id 0
3652
}
3753
} while ($count -gt 0)
38-
54+
3955
$triesLeft = 0
4056
}
4157
}
4258
catch
4359
{
44-
Write-Host "Error connecting to S3!"
60+
Write-Host "Error downloading $source!"
4561
Write-Host $_.Exception|format-list -force
4662
}
4763
finally

0 commit comments

Comments
 (0)