Maximum depth of optixTrace() in optixUtilComputeStackSizes call

in OptiX SDK 7.0.0
in optixPathTracer.cu in __raygen__rg()
“traceRadiance” is called, which can call “optixTrace”
which can lead to : __closesthit__radiance()
there “traceOcclusion” can be called, which can again calls “optixTrace”
So I would assume this is a max depth of 2.

but in line 828 in optixPathTracer.cpp

uint32_t max_trace_depth = 1;

is used as param for optixUtilComputeStackSizes

I would expect:

max_trace_depth = 2;

The docs say “Maximum depth of optixTrace() calls.”
Is this related to each program or to the entire pipeline ?

Thank you.

Hi @m1,

You are right, the call to optixUtilComputeStackSizes() should be using a value of 2 for max_trace_depth, since raygen and closesthit each have optixTrace() calls. We’re fixing it, thank you for noticing and asking.


David.