Skip to content

Commit

Permalink
Merge branch 'NVIDIAGameWorks:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Don7an authored Aug 23, 2024
2 parents 173ee1b + 56e437c commit 6c732ac
Show file tree
Hide file tree
Showing 323 changed files with 38,716 additions and 6,801 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.png filter=lfs diff=lfs merge=lfs -text
*.pdb filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.lib filter=lfs diff=lfs merge=lfs -text
*.exe filter=lfs diff=lfs merge=lfs -text
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ _artifacts/
_sdk/
_public/
docs/pages/*
external/*
copy.bat
mr.bat
fb.bat
Expand Down
86 changes: 73 additions & 13 deletions 3rd-party-licenses.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,31 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#### 2. Nlohmann's JSON
* SWIPAT bug: https://nvbugs/3247318
* License url: https://github.com/nlohmann/json#license
* License url: https://github.com/nlohmann/json/blob/develop/LICENSE.MIT

---

The class is licensed under the MIT License:
MIT License

Copyright 2013-2021 Niels Lohmann
Copyright (c) 2013-2022 Niels Lohmann

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the �Software�), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED �AS IS�, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The class contains the UTF-8 Decoder from Bjoern Hoehrmann which is licensed under the MIT License (see above). Copyright � 2008-2009 Bj�rn Hoehrmann [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The class contains a slightly modified version of the Grisu2 algorithm from Florian Loitsch which is licensed under the MIT License (see above). Copyright � 2009 Florian Loitsch
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

The class contains a copy of Hedley from Evan Nemerson which is licensed as CC0-1.0.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

Expand Down Expand Up @@ -200,3 +205,58 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

#### 9. slang

---

MIT License

Copyright (c) 2016, Carnegie Mellon University and NVIDIA Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

---

#### 10. RapidYAML

---

MIT License

Copyright (c) 2018, Joao Paulo Magalhaes <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

---
126 changes: 126 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
#
# Copyright (c) 2023 NVIDIA CORPORATION. All rights reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

# Variables
set(STREAMLINE_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "SL SDK Root Directory")
find_path(STREAMLINE_INCLUDE_DIR sl.h HINTS "${STREAMLINE_SDK_ROOT}/include" NO_CACHE)
find_path(STREAMLINE_PLUGIN_DLL_DIR sl.interposer.dll HINTS "${STREAMLINE_SDK_ROOT}/bin/x64" "${STREAMLINE_SDK_ROOT}/bin/x64/development" NO_CACHE)
find_path(STREAMLINE_PLUGIN_JSON_DIR sl.interposer.json HINTS "${STREAMLINE_SDK_ROOT}/scripts" "${STREAMLINE_SDK_ROOT}/bin/x64" NO_CACHE)
find_path(STREAMLINE_SUPPORT_DLL_DIR nvngx_dlss.dll HINTS "${STREAMLINE_SDK_ROOT}/bin/x64" NO_CACHE)
find_library(STREAMLINE_INTERPOSER_LIB sl.interposer HINTS "${STREAMLINE_SDK_ROOT}/lib/x64" NO_CACHE)
find_file(STREAMLINE_INTERPOSER_DLL sl.interposer.dll HINTS "${STREAMLINE_SDK_ROOT}/bin/x64" "${STREAMLINE_SDK_ROOT}/bin/x64/development" NO_CACHE)
set(STREAMLINE_INSTALL_DIR "." CACHE STRING "Streamline Install Dir")

# Sort Features
option(STREAMLINE_FEATURE_DLSS_SR "Include DLSS-SR dll" OFF)
option(STREAMLINE_FEATURE_NRD "Include NRD dll" OFF)
option(STREAMLINE_FEATURE_IMGUI "Include Imgui dll" OFF)
option(STREAMLINE_FEATURE_NVPERF "Include NSight Perf SDK dll" OFF)
option(STREAMLINE_FEATURE_REFLEX "Include Reflex dll" OFF)
option(STREAMLINE_FEATURE_NIS "Include NIS dll" OFF)
option(STREAMLINE_FEATURE_DLSS_FG "Include DLSS-FG dll" OFF)
option(STREAMLINE_FEATURE_DEEPDVC "Include DEEPDVC dll" OFF)

option(STREAMLINE_IMPORT_AS_INTERFACE "Import Streamline as an Interface without lib" OFF)

file(GLOB STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.interposer.dll" "${STREAMLINE_PLUGIN_DLL_DIR}sl.common.dll")

if (STREAMLINE_FEATURE_DLSS_SR)
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.dlss.dll" "${STREAMLINE_SUPPORT_DLL_DIR}nvngx_dlss.dll")
endif()

if (STREAMLINE_FEATURE_NRD)
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.nrd.dll" "${STREAMLINE_SUPPORT_DLL_DIR}NRD.dll")
endif()

if (STREAMLINE_FEATURE_IMGUI AND EXISTS "${STREAMLINE_PLUGIN_DLL_DIR}sl.imgui.dll")
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.imgui.dll")
endif()

if (STREAMLINE_FEATURE_NVPERF AND EXISTS "${STREAMLINE_PLUGIN_DLL_DIR}sl.nvperf.dll")
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.nvperf.dll")
endif()

if (STREAMLINE_FEATURE_REFLEX)
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.reflex.dll" "${STREAMLINE_PLUGIN_DLL_DIR}sl.pcl.dll")
if (EXISTS "${STREAMLINE_PLUGIN_DLL_DIR}NvLowLatencyVk.dll")
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}NvLowLatencyVk.dll")
else()
message(WARNING "Missing NvLowLatencyVk.dll: Reflex will fail to run with Vulkan.")
endif()
endif()

if (STREAMLINE_FEATURE_NIS)
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.nis.dll")
endif()

if (STREAMLINE_FEATURE_DLSS_FG)
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.dlss_g.dll" "${STREAMLINE_SUPPORT_DLL_DIR}nvngx_dlssg.dll")
endif()


if (STREAMLINE_FEATURE_DEEPDVC)
list (APPEND STREAMLINE_DLLS "${STREAMLINE_PLUGIN_DLL_DIR}sl.deepdvc.dll" "${STREAMLINE_SUPPORT_DLL_DIR}nvngx_DeepDVC.dll")
endif()

# We copy all the Jsons that may be present.
if(NOT STREAMLINE_PLUGIN_JSON_DIR)
message(STATUS "No sl.interposer.json found. Cmake cannot find the json files.")
file(GLOB STREAMLINE_JSONS "")
else()
file(GLOB STREAMLINE_JSONS ${STREAMLINE_PLUGIN_JSON_DIR}/*.json)
endif()

#Library

if (STREAMLINE_IMPORT_AS_INTERFACE)
add_library(streamline INTERFACE)
else()
add_library(streamline IMPORTED SHARED GLOBAL)
set_target_properties(streamline PROPERTIES IMPORTED_IMPLIB ${STREAMLINE_INTERPOSER_LIB})
endif()

target_include_directories(streamline INTERFACE ${STREAMLINE_INCLUDE_DIR})



# DLLS copy function
if (WIN32)
add_custom_target(CopyStreamlineDLLs ALL DEPENDS ${STREAMLINE_DLLS})
add_custom_command(TARGET CopyStreamlineDLLs
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Created Dir: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
add_custom_command(TARGET CopyStreamlineDLLs
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${STREAMLINE_DLLS} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Copied DLLs: ${STREAMLINE_DLLS}")

if (STREAMLINE_JSONS)
add_custom_command(TARGET CopyStreamlineDLLs
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${STREAMLINE_JSONS} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
COMMENT "Copied JSONs: ${STREAMLINE_JSONS}")
endif()
add_dependencies(streamline CopyStreamlineDLLs)

set_target_properties(CopyStreamlineDLLs PROPERTIES FOLDER "Streamline")
endif ()

install(FILES ${STREAMLINE_DLLS} ${STREAMLINE_JSONS} DESTINATION "${STREAMLINE_INSTALL_DIR}")
Binary file added NVIDIA Nsight Perf SDK License (28Sept2022).pdf
Binary file not shown.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Streamline (SL) - Version 2.1.0
# Streamline (SL) - Version 2.4.11

Streamline is an open-sourced cross-IHV solution that simplifies integration of the latest NVIDIA and other independent hardware vendors’ super resolution technologies into applications and games. This framework allows developers to easily implement one single integration and enable multiple super-resolution technologies and other graphics effects supported by the hardware vendor.

Expand Down Expand Up @@ -48,7 +48,7 @@ Running the `setup.bat` script will cause two things to be done:

To build the project, simply open `_project\vs2017\streamline.sln` in Visual Studio, select the desired build configuration and build, or else use the provided build script:

`./build.bat` with `-{debug|release|production}` (`debug` is default) or use VS IDE and load solution from the `_project` directory
`./build.bat` with `-{debug|develop|production}` (`debug` is default) or use VS IDE and load solution from the `_project` directory

The default setting is to target x86_64 CPU architecture.

Expand All @@ -73,23 +73,20 @@ Obviously, `sl.dlss_g.dll` cannot be built from source and thus the prebuilt cop

#### (Optional) Compiling Shaders

Most users will not need to compile shaders as they are provided pre-compiled. If you need to compile HLSL shaders for your own plugin, you will need to place slang in the .\external\slang_internal folder and xxd in the .\tools folder. Then any *.hlsl files in the .\shaders folder will be compiled at build time. Without these tools in place, the precompiled versions of the shaders in `_artifacts\shaders\` will be used, even if the source shaders are edited.

Additionally, if you would like to recompile the shaders for the NIS plugin, you will need to have Python 3 installed and in the path.

Slang may be found at https://github.com/shader-slang/slang

xxd may be found at https://sourceforge.net/projects/xxd-for-windows/
If you would like to recompile the shaders for the NIS plugin, you will need to have Python 3 installed and in the path.

## SDK Packaging

- Execute `./package.bat` with `-{debug|release|production}` (`production` is default)
- Execute `./package.bat` with `-{debug|develop|production}` (`production` is default)

The packaged SDK can be found in the generated `_sdk` folder.

## Debugging

Please read [Debugging.md](docs/Debugging.md) to learn how to debug and troubleshoot issues.
Streamline offers several ways to debug and troubleshoot issues. Please see the following pages for more information.
* Using SL ImGui: [Debugging - SL ImGUI (Realtime Data Inspection).md](docs/Debugging - SL ImGUI %28Realtime Data Inspection%29.md)
* Using JSON configuration files: [Debugging - JSON Configs (Plugin Configs).md](docs/Debugging - JSON Configs %28Plugin Configs%29.md)
* Using NRD's validation layer: [Debugging - NRD.md](docs/Debugging - NRD.md)

## General Programming Guide

Expand All @@ -114,3 +111,4 @@ A sample Streamline plugin source code is located [here](source/plugins/sl.templ
## Sample App and Source

A sample application using Streamline may be found in [this git repo](https://github.com/NVIDIAGameWorks/Streamline_Sample)

Loading

0 comments on commit 6c732ac

Please sign in to comment.