NVIDIAGameWorks / RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
Other
504 stars 46 forks source link

Can't compile vs2022 and vulkan sdk 1.3.231 #61

Closed Clog41200 closed 11 months ago

Clog41200 commented 1 year ago

Can't follow instruction for the build for x64 only. image

If I change for a amd64_x86 build next I get an error on ShaderMake. image

If I add /wd4293 it compiles ShaderMake but on the compilation of shaders I got this following error : image

dzhdanNV commented 1 year ago

Please, attach full Cmake output. Most important lines in your case are:

-- Setting 'FXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/fxc.exe'
-- Setting 'DXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64/dxc.exe'
-- Setting 'DXC_SPIRV_PATH' to 'C:/VulkanSDK/1.3.243.0/Bin/dxc.exe'
Clog41200 commented 1 year ago

Here is the full cmake output

[variant] Loaded new set of variants
[kit] Successfully loaded 4 kits from C:\Users\alexp\AppData\Local\CMakeTools\cmake-tools-kits.json
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --version
[proc] Executing command: chcp
[visual-studio] Patch Windows SDK path from C:\Program Files (x86)\Windows Kits\10\bin\x64 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64 for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
[main] Configuring project: RayTracingDenoiser 
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -SD:/Devs/RayTracingDenoiser -Bd:/Devs/RayTracingDenoiser/build -G "Visual Studio 17 2022" -T host=x64 -A win32
[cmake] Not searching for unused variables given on the command line.
[cmake] NRD v4.1.2
[cmake] -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
[cmake] NRD encoding: NRD_NORMAL_ENCODING = 2; NRD_ROUGHNESS_ENCODING = 1
[cmake] MathLib v1.14
[cmake] NRD shaders output path: 'D:/Devs/RayTracingDenoiser/_Shaders'
[cmake] NRD output path: 'D:/Devs/RayTracingDenoiser/_Build'
[cmake] -- Setting 'FXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/fxc.exe'
[cmake] -- Setting 'DXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/dxc.exe'
[cmake] -- Setting 'DXC_SPIRV_PATH' to 'C:/VulkanSDK/1.3.231.1/Bin/dxc.exe'
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: D:/Devs/RayTracingDenoiser/build
[visual-studio] Patch Windows SDK path from C:\Program Files (x86)\Windows Kits\10\bin\x64 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64 for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
dzhdanNV commented 1 year ago

In the first message you didn't have properly set up paths for shader compilers. The latest try sets them correctly:

[cmake] -- Setting 'FXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/fxc.exe'
[cmake] -- Setting 'DXC_PATH' to 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x64/dxc.exe'
[cmake] -- Setting 'DXC_SPIRV_PATH' to 'C:/VulkanSDK/1.3.231.1/Bin/dxc.exe'

Is it still an issue?

Clog41200 commented 1 year ago

I still have the last problem about SPIRV-V CodeGen not available.

dzhdanNV commented 1 year ago

If SPIRV-V code gen is not available it means that DXC from Windows SDK gets used

Clog41200 commented 1 year ago

I will try to update my Windows SDK and give a feedback

dzhdanNV commented 1 year ago

Please, ensure in debugger that C:/VulkanSDK/1.3.231.1/Bin/dxc.exe gets used for SPIRV.

Clog41200 commented 1 year ago

I resolve my first issue when I make cmake on a amd64 build. I copy the bin directory of windows SDK found in "Program Files(x86)" to the same path but in "Program Files" and it build successfully.

Do you know why the bin directory doesn't exist in "Program Files" whereas this line, in CMakeLists in ShaderMake, give me that directory :

        get_filename_component (WINDOWS_SDK_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE)
dzhdanNV commented 11 months ago

Windows SDK gets installed only into Program Files (x86). ShaderMake searches for compilers in a very common way - via the registry. I would guess that the registry has invalid entries. I'm closing this issue, but I'm ready to continue discussion if the issue persists.