NVIDIAGameWorks / Streamline

Streamline Integration Framework
Other
377 stars 79 forks source link

SL2.0 - NRD - Incorrect root parameter setup #16

Closed b4df00d closed 6 months ago

b4df00d commented 1 year ago

Hi, I´m trying SL 2.0 to use NRD. First, the doc is not up to date and that does not help setup the lib. After some struggles I got to the point where I can call slEvaluateFeature(sl::kFeatureNRD,...) but I have those error messages from SL :

[18.04.2023 19-52-00][streamline][error]d3d12.h:193[validate] Incorrect root parameter setup! [18.04.2023 19-52-00][streamline][info]d3d12.cpp:1502[dispatch] Created root signature 0x1cd7e09d190 with hash 14346176348325673696 [18.04.2023 19-52-00][streamline][error]d3d12.cpp:1523[dispatch] Failed to create CS pipeline state [18.04.2023 19-52-00][streamline][error]nrdentry.cpp:735[nrdEndEvent] ctx.compute->dispatch(grid[0], grid[1], grid[2]) failed ... [18.04.2023 19-52-00][streamline][info]d3d12.cpp:1502[dispatch] Created root signature 0x1cd7e09c9b0 with hash 10906806363737679482 [18.04.2023 19-52-00][streamline][info]d3d12.cpp:1526[dispatch] Created pipeline state 0x1cd7f2420e0 with hash 5412566692928581985 ... [18.04.2023 19-52-00][streamline][error]nrdentry.cpp:960[nrdEndEvent] ctx.compute->dispatch(dispatch.gridWidth, dispatch.gridHeight, 1) failed [18.04.2023 19-52-00][streamline][error]d3d12.cpp:1538[dispatch] Failed to create root signature or pso for kernel nrd_prep.cs:main [18.04.2023 19-52-00][streamline][error]d3d12.cpp:1538[dispatch] Failed to create root signature or pso for kernel nrd_pack.cs:main [18.04.2023 19-52-00][streamline][error]d3d12.cpp:1538[dispatch] Failed to create root signature or pso for kernel REBLUR_Diffuse_SplitScreen.cs:main ...

And d12 debug layer give me that : D3D12 ERROR: ID3D12Device::CreateComputePipelineState: Root Signature doesn't match Compute Shader: Shader CBV descriptor range (BaseShaderRegister=0, NumDescriptors=1, RegisterSpace=0) is not fully bound in root signature [ STATE_CREATION ERROR #882: CREATECOMPUTEPIPELINESTATE_CS_ROOT_SIGNATURE_MISMATCH]

SL is integrated via sl.interposer.dll, NRD seems to be properly initialized, I can´t find more data on the error and how I could fixe it. It is a dx12 renderer on windows11 and a rtx4080.

What is going wrong ?

BattleAxeVR commented 1 year ago

@b4df00d hi there, did you ever get NRD working through SL? I'm using Vulkan in my engine and have some different errors than this. The docs are no use and don't even specify all the buffers needed for each denoiser type, and formats of the resources they expect. It's also supposed to handle the state transitions internally in the lib but not doing that either. I'm using the lib directly as a complete replacement for vulkan-1.lib.

I wish there was a reference implementation here, even if it is DX12 only (though Vulkan would be better). There's a Path Tracing SDK but SL doesn't work at the same time as Vulkan yet and their NRD integration is direct, so it's completely different than SL interfaces.

jake-nv commented 6 months ago

The NRD plugin and docs were extensively updated in SL v2.2 for the "beta" release of that plugin.