Git Product home page Git Product logo

rtxdi's Introduction

RTXDI SDK and Sample Applications

Version 2.1.0.

Change Log

Introduction

RTX Dynamic Illumination is a framework that facilitates the implementations of efficient direct light sampling in real-time renderers. It is based on the ReSTIR algorithm published in the paper called "Spatiotemporal reservoir resampling for real-time ray tracing with dynamic direct lighting" by B. Bitterli et al.

Starting with version 2.0, RTXDI also includes ReSTIR GI functionality, which allows applications to apply importance resampling to indirect illumination rendered using path tracing. For more information about the indirect illumination algorithm, see the paper called "ReSTIR GI: Path Resampling for Real-Time Path Tracing" by Y. Ouyang et al. The feature is described in more detail in this document.

For more information about RTXDI, see the NVIDIA Developer Page.

Package Contents

rtxdi-sdk contains the SDK source code files that are meant to be included into the application build:

src contains the sample application host code.

shaders contains the sample application shaders.

donut is a submodule structure with the "Donut" rendering framework used to build the sample apps.

NRD is a submodule with the "NRD" denoiser library.

DLSS is a submodule with the Deep Learning Super-Sampling SDK.

Additional contents delivered through packman:

dxc is a recent version of DirectX Shader Compiler;

media contains the media files necessary for the sample apps to run.

Building and Running the Sample Apps

Windows

  1. Clone the repository with all submodules:

    • git clone --recursive https://github.com/NVIDIAGameWorks/RTXDI.git

    If the clone was made non-recursively and the submodules are missing, clone them separately:

    • git submodule update --init --recursive
  2. Pull the media files and DXC binaries from packman:

    • update_dependencies.bat
  3. Configure the solution with CMake. The easiest option is to use CMake GUI.

  4. Assuming that the RTXDI SDK tree is located in D:\RTXDI, set the following parameters in the GUI:

    • "Where is the source code" to D:\RTXDI
    • "Where to build the binaries" to D:\RTXDI\build
  5. Click "Configure", set "Generator" to the Visual Studio you're using (tested with VS 2019 version 16.8.2), set "Optional platform" to x64, click "Finish".

  6. Click "Generate", then "Open Project".

  7. Build the solution with Visual Studio

  8. Run the rtxdi-sample or minimal-sample projects.

Linux

  1. Make sure the necessary build packages are installed on the target system. For Ubuntu 20.04 (amd64), the following command is sufficient:

    • sudo apt install build-essential cmake xorg-dev libtinfo5
  2. Clone the repository with all submodules:

    • git clone --recursive https://github.com/NVIDIAGameWorks/RTXDI.git

    If the clone was made non-recursively and the submodules are missing, clone them separately:

    • git submodule update --init --recursive
  3. Pull the media files and DXC binaries from packman:

    • cd RTXDI && ./update_dependencies.sh
  4. Create a build folder:

    • mkdir build && cd build
  5. Configure the project with CMake:

    • cmake ..
  6. Build:

    • make -j8 (example for an 8-core CPU, or use Ninja instead)
  7. Run:

    • bin/rtxdi-sample or bin/minimal-sample

Vulkan support

The RTXDI sample applications can run using D3D12 or Vulkan, which is achieved through the NVRHI rendering API abstraction layer and HLSL shader compilation to SPIR-V through DXC (DirectX Shader Compiler). We deliver a compatible version of DXC through packman. If you wish to use a different (e.g. newer) version of DXC, it can be obtained from Microsoft/DirectXShaderCompiler on GitHub. The path to a custom version of DXC can be configured using the DXC_PATH and DXC_SPIRV_PATH CMake variables.

By default, the sample apps will run using D3D12 on Windows. To start them in Vulkan mode, add --vk to the command line. To compile the sample apps without Vulkan support, set the CMake variable DONUT_WITH_VULKAN to OFF and re-generate the project.

To enable SPIV-V compileation tests, set the GLSLANG_PATH variable in CMake to the path to glslangValidator.exe in your Vulkan installation.

Integration

See the Integration Guide.

rtxdi's People

Contributors

apanteleev avatar calhsu-nvidia avatar chris-wyman avatar dzhdannv avatar fstrugar-nv avatar jiayincao avatar nv-aallan avatar somenvidiaguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtxdi's Issues

[Question] About the rtxdi-sample

  1. What setting should I use to reduce/avoid the flickering/blinking in the scene (very vivid after moving around)? https://streamable.com/sm7msk
  2. Why does RTXGI have seemingly no effect on the scene? I can turn it off and on and nothing changes visually. Both with "Restir direct light" and "Restir direct light + brdf indirect"

Weird behavior of transparent surfaces

I'm experimenting with adding a Quake 1 BSP loader to RTXDI to use as a light preview app during map creation. The goal is for it to approximate the result of the existing lightmap generator but in realtime because it's not using the GPU, but does a good job.

I'm having some trouble getting transparent surfaces to look good. In the image here you can see some roof windows that look glitched, the glitchiness moves around like smearing the edges in lack of a better word, while their reflections are without artifacts however I pan around the view. It seems to be isolated to transparencies towards the "outside world". If there's geometry on both sides, there are no issues as seen on the lower left glassy material.

image

Ideally I would like to create transparent surfaces without reflection as Quake 1 doesn't have real time rendering, and the existing lightmap generator ignores that and only uses ray tracing for light bounces, so if it's possible to have a fully diffuse semi-transparent material that only lets light through and receives bounced rays that would be a nice workaround.

Sorry for adding more topics here, but don't want to spam the issue tracker.

  • Q1 has two ways of tuning lights. You can have a wait that scales the fade distance of the light, and you can control falloff via delay (0: linear, 1: 1/x, 2: 1/x^2, 3 and 4 are less relevant, 5: alternate 1/x^2 without burning out near source), would this type of falloff change be fairly easy for me to add or is it just fundamentally incompatible with this type of ray tracing and requiring major changes?
  • Can emissive surfaces be tuned to produce bouncing light without burning the texture at higher levels?
  • I'm currently making transparent materials emissive to have the texture showing similar to how it would in Q1, but this ofc breaks shadows of such surfaces, like the water under a bridge wouldn't get shadows if it's emissive. Any other possibility to deal with that?

For reference, this is what I have working, different map than screenshot, but can also observe the weird reflections there even if view doesn't stay around to study that issue specifically, https://youtu.be/Zm7ADUgg5Yo

Build errors for rtxdi-sdk

I followed the directions in the readme exactly, cloned with recursive, ran the update_dep batch file...

I have tried with both Visual Studio 2019 and 2022, same result. Here is what I'm seeing:

16>Generating ResamplingCompileTest.hlsl.spv
16>CUSTOMBUILD : error : validation errors
16>
16>CUSTOMBUILD : error : Container part 'Pipeline State Validation' does not match expected for module. Use /Zi for source location.
16>Validation failed.
16>
16>
16>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'D:\Programming\RTX\RTXDI\rtxdi-sdk\shaders\ResamplingCompileTest.hlsl;D:\Programming\RTX\RTXDI\build\CMakeFiles\5dcfe1a883c1efc5d170a79600cdec15\ResamplingCompileTest.hlsl.spv.rule;D:\Programming\RTX\RTXDI\rtxdi-sdk\CMakeLists.txt' exited with code -2147467259.
16>Done building project "rtxdi-sdk.vcxproj" -- FAILED.

Can't access submodules

I have successfully cloned the RTXDI repository.
But, I can't access submodule repositories.
The error message is as follows.

git.exe submodule update --init
Cloning into 'D:/Projects/RTXDI/NRD'...
remote: Repository not found.
fatal: repository 'https://github.com/NVIDIAGameWorks/RayTracingDenoiser.git/' not found
fatal: clone of 'https://github.com/NVIDIAGameWorks/RayTracingDenoiser.git' into submodule path 'D:/Projects/RTXDI/NRD' failed
Failed to clone 'NRD'. Retry scheduled
Cloning into 'D:/Projects/RTXDI/NRD'...
remote: Repository not found.
fatal: repository 'https://github.com/NVIDIAGameWorks/RayTracingDenoiser.git/' not found
fatal: clone of 'https://github.com/NVIDIAGameWorks/RayTracingDenoiser.git' into submodule path 'D:/Projects/RTXDI/NRD' failed
Failed to clone 'NRD' a second time, aborting

What should I do?

cmake generator fails

I have vulkan disabled, but it still tries to generate it
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Vulkan: Found unsuitable version "", but required is at
least "1.2.170" (found Vulkan_LIBRARY-NOTFOUND)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.23/Modules/FindVulkan.cmake:159 (find_package_handle_standard_args)
RTXGI/rtxgi-sdk/FindSDKs.cmake:38 (find_package)
RTXGI/rtxgi-sdk/CMakeLists.txt:38 (include)

CMakeLists.txt:38

option(DONUT_WITH_VULKAN "" OFF)

Ubuntu CMake "No rule to make target" error

make -j8
[  0%] Built target ShaderMakeBlob
[  1%] Built target RTXGI-VK
[  3%] Built target imgui
[  4%] Built target jsoncpp_static
[  7%] Built target nvrhi
[  8%] Built target rtxdi-sdk
[ 13%] Built target glfw
[ 14%] Built target ShaderMake
make[2]: *** No rule to make target 'minimal/shaders/shaderCompiler', needed by 'minimal/shaders/CMakeFiles/minimal-sample-shaders'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:1003: minimal/shaders/CMakeFiles/minimal-sample-shaders.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target 'shaders/shaderCompiler', needed by 'shaders/CMakeFiles/rtxdi-sample-shaders'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:901: shaders/CMakeFiles/rtxdi-sample-shaders.dir/all] Error 2
[ 19%] Built target nvrhi_vk
[ 23%] Built target donut_core

This is with cmake version 3.26.3

Ubuntu /bin/sh: 1: -nologo: not found

getting this error after running make

main] Building folder: RTXDI 
[build] Starting build
[proc] Executing command: /snap/cmake/current/bin/cmake --build /home/cdurham/RTXDI/build --config Debug --target rtxdi-sample -j 26 --
[build] [  0%] Generating ResamplingCompileTest.hlsl.spv
[build] /bin/sh: 1: -nologo: not found
[build] gmake[3]: *** [rtxdi-sdk/CMakeFiles/rtxdi-sdk.dir/build.make:83: rtxdi-sdk/ResamplingCompileTest.hlsl.spv] Error 127
[build] gmake[2]: *** [CMakeFiles/Makefile2:874: rtxdi-sdk/CMakeFiles/rtxdi-sdk.dir/all] Error 2
[build] gmake[2]: *** Waiting for unfinished jobs....
[build] [  0%] Built target ShaderMakeBlob
[build] [  1%] Built target RTXGI-VK
[build] [  2%] Built target jsoncpp_static

Thanks a lot for the changes

Errors compiling ShaderMaker

Hello,

Thanks for this cool library. I'm very interested in checking it out more. However, I have run into a compile issue with ShaderMaker. It won't compile and it complains about a lot of undeclared identifiers. I see ShaderMaker is a pretty new change from March, so I tried the previous commit (a5ccc07), which does not have ShaderMaker and I was able to build and run the demo without issues.

This screenshot shows the kinds of errors I get. The headers are all found, but some dx related symbols are undeclared.
image

Here is my output from generating the project files. I targeted VS 2022.

c:\Anomalous\RTXDI\build>cmake -G "Visual Studio 17 2022" -A x64 "c:\Anomalous\RTXDI\."
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.34.31935.0
-- The CXX compiler identification is MSVC 19.34.31935.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- JsonCpp Version: 1.9.4
-- Looking for C++ include clocale
-- Looking for C++ include clocale - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of lconv
-- Check size of lconv - done
-- Performing Test HAVE_DECIMAL_POINT
-- Performing Test HAVE_DECIMAL_POINT - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Using Win32 for window creation
-- Setting 'FXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/fxc.exe'
-- Setting 'DXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/dxc.exe'
-- Setting 'DXC_SPIRV_PATH' to 'C:/VulkanSDK/1.2.198.1/Bin/dxc.exe'
-- Vulkan-Headers = 1.3.238
Processing 'NRD'...
-- NRD version: 3.3.1
-- NRD shaders output path: 'C:/Anomalous/RTXDI/build/NRD/Shaders'
-- NRD.hlsli definitions: NRD_USE_OCT_NORMAL_ENCODING = 0; NRD_USE_MATERIAL_ID = 0
-- Using FXC path: 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x64/fxc.exe'
-- Using DXC path: 'C:/Anomalous/RTXDI/dxc/bin/dxc.exe'
-- Using DXC (for SPIRV) path: 'C:/Anomalous/RTXDI/dxc/bin/dxc.exe'
-- Found Suitable Windows 10 SDK: 10.0.19041.0
-- Found Vulkan: C:/VulkanSDK/1.2.198.1/Lib/vulkan-1.lib (found suitable version "1.2.198", minimum required is "1.2.170") found components: glslc glslangValidator
-- Found a suitable version of the Vulkan SDK: C:/VulkanSDK/1.2.198.1/
-- cxxopts version 2.2.0
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Anomalous/RTXDI/build

I also attached the script I use to generate the project.
AutoBuild_x64.zip

Not easy to integrate with our game made in Unreal 5.1 and 5.2

You guys really need to keep up UE5. I need a plugin for UE5.1 and 5.2 since we cannot achieve 60fps with 30 series cards with Lumen GI and Nanite. Dynamic GI, Nanite, 60fps @hardware's native recommended resolution are all must haves for our game due to the mechanics we designed and our studio values. Lumen is currently overhyped in performance and always requires upscaling from a lower resolution which is unacceptable to our standards. I have seen a lot with RTXDI and it looks very performant compared with Lumen. I believe we could finally achieve 60fps @ hardware native recommended resolution (3060, 6700 XT, A770, for 1080p, 3070 vendor etc for 1440p, 3080 4k etc ).

But we do not have the proper setup for integrating the RTXDI into unreal ourselves, compiling the nvRTX branch is takes up too much resources, and we do not want to move our project from the source engine to a fork. We do not want to worry about compiling other plugins from other creators just to use them in NvRTX. It would be MUCH more convenient and possible if you guys included updated plugins for 5.1 and 5.2 with the RTXDI package here. We are embracing DXR as the new standard but we need something more performant but as easy to implement at Lumen. Also try to mix lumen reflections with RTXDI if possible. We need a new GI system asap.

Fails to start under NSight Graphics on Linux

Using the latest NSight to date: 2022.4.1.0
Pointing it to either rtxdi-sample or minimal-sample - fails in either case.
NSight writes to the console:

terminate called after throwing an instance of 'vk::DeviceLostError'
  what():  vk::Device::waitIdle: ErrorDeviceLost

Error list:

ID,,Origin,Source,Message
1,,Target,NVIDIA Nsight Graphics,Graphics interception initialized
2,,Target,NVIDIA Nsight Graphics,"Adding VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT to buffer with device address usage. This can be disabled via ""Vulkan > Device Address C++ Support"""
3,,Target,NVIDIA Nsight Graphics,"Adding VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT to memory allocation with device address support. This can be disabled via ""Vulkan > Device Address C++ Support"""

error in configure process

hello i have this error
CMake Error at CMakeLists.txt:62 (add_subdirectory):
The source directory

C:/RTXDI-main/donut

does not contain a CMakeLists.txt file.

CMake Error at shaders/CMakeLists.txt:2 (include):
include could not find requested file:

C:/RTXDI-main/donut/compileshaders.cmake

CMake Error at minimal/shaders/CMakeLists.txt:2 (include):
include could not find requested file:

C:/RTXDI-main/donut/compileshaders.cmake

Ubuntu build error: cstring header missing

/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp: In function ‘bool IsSpace(char)’:
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:223:10: error: ‘strchr’ was not declared in this scope
  223 | { return strchr(" \t\r\n", ch) != nullptr; }
      |          ^~~~~~
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:49:1: note: ‘strchr’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
   48 |     #include <limits.h>
  +++ |+#include <cstring>
   49 | #endif
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp: In member function ‘bool Options::Parse(int32_t, const char**)’:
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:582:9: error: ‘strlen’ was not declared in this scope
  582 |     if (strlen(shaderModel) != 3)
      |         ^~~~~~
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:582:9: note: ‘strlen’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:592:14: error: ‘strcmp’ was not declared in this scope
  592 |         if (!strcmp(platformName, g_PlatformNames[i]))
      |              ^~~~~~
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:592:14: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp: In function ‘void ExeCompile()’:
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:1219:21: error: ‘strstr’ was not declared in this scope
 1219 |                 if (strstr(buf, "compilation object save succeeded"))
      |                     ^~~~~~
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:1219:21: note: ‘strstr’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
/home/cdurham/RTXDI/donut/src/core/string_utils.cpp: In function ‘std::optional<_Tp> donut::string_utils::parse(std::string_view) [with T = float; std::string_view = std::basic_string_view<char>]’:
/home/cdurham/RTXDI/donut/src/core/string_utils.cpp:55:17: error: ‘strncpy’ was not declared in this scope
   55 |                 strncpy(buf, s.data(), std::min(s.size(), sizeof(buf) - 1));
      |                 ^~~~~~~
/home/cdurham/RTXDI/donut/src/core/string_utils.cpp:24:1: note: ‘strncpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
   23 | #include <donut/core/string_utils.h>
  +++ |+#include <cstring>
   24 | 
/home/cdurham/RTXDI/donut/src/core/string_utils.cpp: In function ‘std::optional<_Tp> donut::string_utils::parse(std::string_view) [with T = double; std::string_view = std::basic_string_view<char>]’:
/home/cdurham/RTXDI/donut/src/core/string_utils.cpp:72:17: error: ‘strncpy’ was not declared in this scope
   72 |                 strncpy(buf, s.data(), std::min(s.size(), sizeof(buf) - 1));
      |                 ^~~~~~~
/home/cdurham/RTXDI/donut/src/core/string_utils.cpp:72:17: note: ‘strncpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp: In function ‘bool ProcessConfigLine(uint32_t, const std::string&, const std::filesystem::file_time_type&)’:
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:1351:9: error: ‘strcmp’ was not declared in this scope
 1351 |     if (strcmp(configLine.entryPoint, "main"))
      |         ^~~~~~
/home/cdurham/RTXDI/donut/ShaderMake/src/ShaderMake.cpp:1351:9: note: ‘strcmp’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
/home/cdurham/RTXDI/donut/src/core/vfs/TarFile.cpp: In constructor ‘donut::vfs::TarFile::TarFile(const std::filesystem::__cxx11::path&)’:
/home/cdurham/RTXDI/donut/src/core/vfs/TarFile.cpp:88:35: error: ‘strnlen’ was not declared in this scope
   88 |             size_t prefixLength = strnlen(header.prefix, sizeof(header.prefix));
      |                                   ^~~~~~~
/home/cdurham/RTXDI/donut/src/core/vfs/TarFile.cpp:92:17: error: ‘memcpy’ was not declared in this scope
   92 |                 memcpy(fileName, header.prefix, prefixLength);
      |                 ^~~~~~
/home/cdurham/RTXDI/donut/src/core/vfs/TarFile.cpp:27:1: note: ‘memcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
   26 | #include <regex>
  +++ |+#include <cstring>
   27 | 
/home/cdurham/RTXDI/donut/src/core/vfs/TarFile.cpp:98:17: error: ‘memcpy’ was not declared in this scope
   98 |                 memcpy(fileName + prefixLength, header.name, nameLength);
      |                 ^~~~~~
/home/cdurham/RTXDI/donut/src/core/vfs/TarFile.cpp:98:17: note: ‘memcpy’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
make[2]: *** [donut/CMakeFiles/donut_core.dir/build.make:230: donut/CMakeFiles/donut_core.dir/src/core/vfs/TarFile.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [donut/ShaderMake/CMakeFiles/ShaderMake.dir/build.make:90: donut/ShaderMake/CMakeFiles/ShaderMake.dir/src/ShaderMake.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:693: donut/ShaderMake/CMakeFiles/ShaderMake.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [donut/CMakeFiles/donut_core.dir/build.make:202: donut/CMakeFiles/donut_core.dir/src/core/string_utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:469: donut/CMakeFiles/donut_core.dir/all] Error 2

If I add #include <cstring> in the right places this error goes away.

shaderCompiler multi threading deadlock issue

I updated Window SDK to 19041, updated Visual Studio 2019 to the latest version and updated all Windows SDK Version project setting to 10.0.19041.0. Almost all projects could be compiled successfully, except the projects that would trigger/require shader compilation. After a bit of debugging, I found that the problem came from the program shaderCompiler.exe.

When shaderCompiler.exe begins, the process will stop responding. No error, no progress, indefinitely. The following is the most that shaderCompiler.exe reports before it stops responding.

Build started...
1>------ Build started: Project: rtxdi-sample-shaders, Configuration: Release x64 ------
1>[ 2.2%] DXIL OK FusedResamplingPass.hlsl: USE_RAY_QUERY=0 RTXDI_REGIR_MODE=RTXDI_REGIR_DISABLED

I suspect it is a multi threading deadlock issue in the program shaderCompiler.exe.

Please help. Thanks.

Build of rtxdi-sample fails with "unresolved external symbol"s

5>------ Build started: Project: rtxdi-sample, Configuration: Debug x64 ------
5> Creating library G:/Download/3D/nVidia/RTX/RTXDI/build/src/Debug/rtxdi-sample.lib and object G:/Download/3D/nVidia/RTX/RTXDI/build/src/Debug/rtxdi-sample.exp
5>Rtxgi-VK.obj : error LNK2019: unresolved external symbol vkCreateDescriptorPool referenced in function "public: __cdecl RtxgiVolumeVK::RtxgiVolumeVK(class nvrhi::IDevice *,class std::weak_ptr const &,class std::shared_ptr const &,class std::shared_ptr const &,struct rtxgi::DDGIVolumeDesc const &)" (??0RtxgiVolumeVK@@qeaa@PEAVIDevice@nvrhi@@aebv?$weak_ptr@VRtxgiIntegration@@@std@@aebv?$shared_ptr@VIFileSystem@vfs@donut@@@4@AEBV?$shared_ptr@VDescriptorTableManager@engine@donut@@@4@AEBUDDGIVolumeDesc@rtxgi@@@z)
5>Rtxgi-VK.obj : error LNK2019: unresolved external symbol vkDestroyDescriptorPool referenced in function "public: virtual __cdecl RtxgiVolumeVK::~RtxgiVolumeVK(void)" (??1RtxgiVolumeVK@@UEAA@XZ)
5>Rtxgi-VK.obj : error LNK2019: unresolved external symbol "public: enum rtxgi::ERTXGIStatus __cdecl rtxgi::vulkan::DDGIVolume::Create(struct VkCommandBuffer_T *,struct rtxgi::DDGIVolumeDesc const &,struct rtxgi::vulkan::DDGIVolumeResources const &)" (?Create@DDGIVolume@vulkan@rtxgi@@qeaa?AW4ERTXGIStatus@3@PEAUVkCommandBuffer_T@@AEBUDDGIVolumeDesc@3@AEBUDDGIVolumeResources@23@@z) referenced in function "public: __cdecl RtxgiVolumeVK::RtxgiVolumeVK(class nvrhi::IDevice *,class std::weak_ptr const &,class std::shared_ptr const &,class std::shared_ptr const &,struct rtxgi::DDGIVolumeDesc const &)" (??0RtxgiVolumeVK@@qeaa@PEAVIDevice@nvrhi@@aebv?$weak_ptr@VRtxgiIntegration@@@std@@aebv?$shared_ptr@VIFileSystem@vfs@donut@@@4@AEBV?$shared_ptr@VDescriptorTableManager@engine@donut@@@4@AEBUDDGIVolumeDesc@rtxgi@@@z)
5>Rtxgi-VK.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl rtxgi::vulkan::DDGIVolume::Destroy(void)" (?Destroy@DDGIVolume@vulkan@rtxgi@@UEAAXXZ)
5>Rtxgi-VK.obj : error LNK2019: unresolved external symbol "enum rtxgi::ERTXGIStatus __cdecl rtxgi::vulkan::UpdateDDGIVolumeProbes(struct VkCommandBuffer_T *,unsigned int,class rtxgi::vulkan::DDGIVolume * *)" (?UpdateDDGIVolumeProbes@vulkan@rtxgi@@ya?AW4ERTXGIStatus@2@PEAUVkCommandBuffer_T@@IPEAPEAVDDGIVolume@12@@z) referenced in function "public: static void __cdecl RtxgiVolume::UpdateVolumesVK(class nvrhi::ICommandList *,class std::vector<class std::shared_ptr,class std::allocator<class std::shared_ptr > > const &)" (?UpdateVolumesVK@RtxgiVolume@@SAXPEAVICommandList@nvrhi@@aebv?$vector@V?$shared_ptr@VRtxgiVolume@@@std@@v?$allocator@V?$shared_ptr@VRtxgiVolume@@@std@@@2@@std@@@z)
5>Rtxgi-VK.obj : error LNK2019: unresolved external symbol "enum rtxgi::ERTXGIStatus __cdecl rtxgi::vulkan::RelocateDDGIVolumeProbes(struct VkCommandBuffer_T *,unsigned int,class rtxgi::vulkan::DDGIVolume * *)" (?RelocateDDGIVolumeProbes@vulkan@rtxgi@@ya?AW4ERTXGIStatus@2@PEAUVkCommandBuffer_T@@IPEAPEAVDDGIVolume@12@@z) referenced in function "public: static void __cdecl RtxgiVolume::UpdateVolumesVK(class nvrhi::ICommandList *,class std::vector<class std::shared_ptr,class std::allocator<class std::shared_ptr > > const &)" (?UpdateVolumesVK@RtxgiVolume@@SAXPEAVICommandList@nvrhi@@aebv?$vector@V?$shared_ptr@VRtxgiVolume@@@std@@v?$allocator@V?$shared_ptr@VRtxgiVolume@@@std@@@2@@std@@@z)
5>Rtxgi-VK.obj : error LNK2019: unresolved external symbol "enum rtxgi::ERTXGIStatus __cdecl rtxgi::vulkan::ClassifyDDGIVolumeProbes(struct VkCommandBuffer_T *,unsigned int,class rtxgi::vulkan::DDGIVolume * *)" (?ClassifyDDGIVolumeProbes@vulkan@rtxgi@@ya?AW4ERTXGIStatus@2@PEAUVkCommandBuffer_T@@IPEAPEAVDDGIVolume@12@@z) referenced in function "public: static void __cdecl RtxgiVolume::UpdateVolumesVK(class nvrhi::ICommandList *,class std::vector<class std::shared_ptr,class std::allocator<class std::shared_ptr > > const &)" (?UpdateVolumesVK@RtxgiVolume@@SAXPEAVICommandList@nvrhi@@aebv?$vector@V?$shared_ptr@VRtxgiVolume@@@std@@v?$allocator@V?$shared_ptr@VRtxgiVolume@@@std@@@2@@std@@@z)
5>VulkanExtensions.obj : error LNK2019: unresolved external symbol vkGetDeviceProcAddr referenced in function "void __cdecl LoadDeviceExtensions(struct VkDevice_T *)" (?LoadDeviceExtensions@@YAXPEAUVkDevice_T@@@z)
5>G:\Download\3D\nVidia\RTX\RTXDI\build\bin\rtxdi-sample.exe : fatal error LNK1120: 8 unresolved externals
5>Done building project "rtxdi-sample.vcxproj" -- FAILED.
========== Build: 4 succeeded, 1 failed, 14 up-to-date, 0 skipped ==========

Wrong shaders name make the sample fail to load.

I tried to run the latest version of the sample and I encounter an error during the loading.

The problem is that some of these shaders here

https://github.com/NVIDIAGameWorks/RTXDI/blob/52488baa0dd3ee0dffb6e668bd0695d65cd2345c/src/LightingPasses.cpp#L313C91-L320C91

are missing the Prefix DI:

m_GenerateInitialSamplesPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/DIGenerateInitialSamples.hlsl", regirMacros, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_TemporalResamplingPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/DITemporalResampling.hlsl", {}, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_SpatialResamplingPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/DISpatialResampling.hlsl", {}, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_ShadeSamplesPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/DIShadeSamples.hlsl", regirMacros, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_BrdfRayTracingPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/BrdfRayTracing.hlsl", {}, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_ShadeSecondarySurfacesPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/ShadeSecondarySurfaces.hlsl", regirMacros, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_FusedResamplingPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/DIFusedResampling.hlsl", regirMacros, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);
m_GradientsPass.Init(m_Device, *m_ShaderFactory, "app/LightingPasses/DIComputeGradients.hlsl", {}, useRayQuery, RTXDI_SCREEN_SPACE_GROUP_SIZE, m_BindingLayout, nullptr, m_BindlessLayout);

Adding the prefix the sample runs without problems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.