Ray-Tracing Validation at the Driver Level

Originally published at: Ray-Tracing Validation at the Driver Level | NVIDIA Technical Blog

For developers working on Microsoft DirectX ray-tracing applications, ray-tracing validation is here to help you improve performance, find hard-to-debug issues, and root cause crashes.  Unlike existing debug solutions, ray-tracing validation performs checks at the driver level, which enables it to identify potential problems that cannot be caught by tools such as the D3D12 Debug Layer.…

Definitely try out ray tracing validation if you are working on a RT application. Let us know if you find it useful or have any questions

I’m getting NVAPI_ACCESS_DENIED on NvAPI_D3D12_EnableRaytracingValidation using driver version 551.86, Win10 22H2 19045.4170. I’m also using NVAPI version R550-Developer, developer mode and the direct12 debug layer are enabled, passing in a ID3D12Device5* and NV_ALLOW_RAYTRACING_VALIDATION is set to 1 before including nvapi.h. Is there anything I’m missing here?

Edit: Note to anyone else that had problems with this; NvAPI_D3D12_GetRaytracingCaps or any other raytracing call has to be done after enabling raytracing validation, otherwise NvAPI_D3D12_EnableRaytracingValidation returns NVAPI_INVALID_CALL and after adding the environment variable a restart is definitely needed (otherwise it will return NVAPI_ACCESS_DENIED, even if the sysvar was just added but no restart was done).

Hi, thanks for raising this issue. It sounds like you have resolved it now though, your note is indeed correct; Enabling Ray Tracing validation through NVAPI will not succeed unless you call EnableRaytracingValidation before calling any raytracing functions on the device (including capability queries).

I will look to include this advice in the next update of the blog

Thanks