Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run NRD sample from Visual Studio 2022? #19

Open
StudenteChamp2 opened this issue Sep 7, 2024 · 7 comments
Open

How to run NRD sample from Visual Studio 2022? #19

StudenteChamp2 opened this issue Sep 7, 2024 · 7 comments

Comments

@StudenteChamp2
Copy link

StudenteChamp2 commented Sep 7, 2024

I generated NRDSample.sln solution using cmake:
cmake -G "Visual Studio 17 2022" -A x64

Build passes but when I launch the sample i get these errors:

_NRI::INFO(DeviceD3D12.cpp:231) - D3D12::NVIDIA GeForce RTX 3080 - Using ID3D12Device5
NRI::WARNING(DeviceD3D12.cpp:287) - D3D12::NVIDIA GeForce RTX 3080 - nri::DeviceD3D12::FillDesc: ID3D12Device::CheckFeatureSupport(shaderModel) failed, result = 0x80070057!
'NRDSample.exe' (Win32): Loaded 'C:\Windows\System32\dcomp.dll'.
Exception thrown at 0x00007FFD490BCF19 in NRDSample.exe: Microsoft C++ exception: _com_error at memory location 0x000000808C2FD5F0.
NRI::ERROR(PipelineD3D12.cpp:403) - D3D12::NVIDIA GeForce RTX 3080 - nri::PipelineD3D12::Create: ID3D12Device::CreateComputePipelineState() failed, result = 0x80070057!
A breakpoint instruction (_debugbreak() statement or a similar call) was executed in NRDSample.exe.

@StudenteChamp2 StudenteChamp2 changed the title How to run NRD sample from Visual Studio How to run NRD sample from Visual Studio? Sep 7, 2024
@StudenteChamp2 StudenteChamp2 changed the title How to run NRD sample from Visual Studio? How to run NRD sample from Visual Studio 2022? Sep 7, 2024
@StudenteChamp2 StudenteChamp2 reopened this Sep 7, 2024
@dzhdanNV
Copy link
Collaborator

dzhdanNV commented Sep 8, 2024

Most likely your Windows and/or WinSDK are outdated. Could you post the results of winver command, please? And WinSDK version?

@dzhdanNV
Copy link
Collaborator

dzhdanNV commented Sep 8, 2024

Another suggestion - running with the validation layer enabled to see the info about the error (force enable, use --debugAPI or Smart Cmdline Args VS extension).

@StudenteChamp2
Copy link
Author

winver gives this
Winver

@StudenteChamp2
Copy link
Author

SDK version is 10.0.22621.0
Cmake_says

@StudenteChamp2
Copy link
Author

StudenteChamp2 commented Sep 15, 2024

I manually enabled debug layer. I get this:
IGetThis

NRI::INFO(DeviceD3D12.cpp:231) - D3D12::NVIDIA GeForce RTX 3080 - Using ID3D12Device5
NRI::WARNING(DeviceD3D12.cpp:287) - D3D12::NVIDIA GeForce RTX 3080 - nri::DeviceD3D12::FillDesc: ID3D12Device::CheckFeatureSupport(shaderModel) failed, result = 0x80070057!
'NRDSample.exe' (Win32): Loaded 'C:\Windows\System32\dcomp.dll'.
D3D12 ERROR: ID3D12Device::CreateComputeShader: Shader must be cs_6_5, cs_6_4, cs_6_3, cs_6_2, cs_6_1, cs_6_0, cs_5_1, cs_5_0, cs_4_1, cs_4_0. Shader version provided: cs_6_6. [ STATE_CREATION ERROR #881: CREATECOMPUTEPIPELINESTATE_INVALID_SHADER]
D3D12: BREAK enabled for the previous message, which was: [ ERROR STATE_CREATION #881: CREATECOMPUTEPIPELINESTATE_INVALID_SHADER ]
Exception thrown at 0x00007FFC8D7DCF19 (KernelBase.dll) in NRDSample.exe: 0x0000087A (parameters: 0x0000000000000001, 0x00000038EA96B470, 0x00000038EA96D240).
Unhandled exception at 0x00007FFC8D7DCF19 (KernelBase.dll) in NRDSample.exe: 0x0000087A (parameters: 0x0000000000000001, 0x00000038EA96B470, 0x00000038EA96D240).

@dzhdanNV
Copy link
Collaborator

Please, install latest Win SDK. DXC from your old Win SDK doesn't support SM 6.6, which is needed for SHARC:
Mine: Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
Yours: Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045. 19045 is old
After installing latest SDK, clean and redeploy the project.

@StudenteChamp2
Copy link
Author

Will do it as soon i can thank you<3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants