Optix 7 examples error

I installed Optix 7 on a new computer and when I tried to run Pathtracer example, I am getting an error. All the other examples run without a problem. The error:

[       ERROR]: Multi-level graphs are disabled but "maxTraversableGraphDepth" is larger than 2
Caught exception: OPTIX_ERROR_INVALID_VALUE: Optix call 'optixPipelineSetStackSize( state.pipeline, direct_callable_stack_size_from_traversal, direct_callable_stack_size_from_state, continuation_stack_size, max_traversal_depth )' failed: /home/username/Downloads/NVIDIA-OptiX-SDK-7.0.0-linux64/SDK/optixPathTracer/optixPathTracer.cpp:853)

System details
OS: Linux Mint 19.2 cinnamon
GPU: Nvidia RTX 2080
Driver: 440.31
Cuda driver: 10.1.243

That would be an issue in the optixPathTracer.cpp at line 845 in the OptiX SDK 7.0.0.
It’s not setting the exact maxTraversableGraphDepth argument in the optixPipelineSetStackSize() function for the actually used scene hierarchy.
That was probably not checked that strictly in previous drivers, because that should have only been a waste of stack space when setting it bigger than needed.

// This is 3 since the largest depth is IAS->IAS->GAS // Incorrect comment. Remove this.
    const uint32_t max_traversal_depth = 3; // BUG: Change this to 1.

    OPTIX_CHECK( optixPipelineSetStackSize(
                state.pipeline,
                direct_callable_stack_size_from_traversal,
                direct_callable_stack_size_from_state,
                continuation_stack_size,
                max_traversal_depth
                ) );
1 Like