Hi, I am new to Optix and currently using OptiX 9 for ray tracing development, starting with simple case. Below is the code lines to calculate the stack sizes for the ProgramGroups.
// Stack size calculation
OptixStackSizes stack_sizes = {};
//for (auto& prog_group : _programGroups) {
// OPTIX_CHECK(optixUtilAccumulateStackSizes(
// prog_group, &stack_sizes, _pipeline));
//}
OPTIX_CHECK(optixUtilAccumulateStackSizes(
pg_rg_firstIllumination,
&stack_sizes,
_pipeline
));
OPTIX_CHECK(optixUtilAccumulateStackSizes(
pg_exception,
&stack_sizes,
_pipeline
));
OPTIX_CHECK(optixUtilAccumulateStackSizes(
pg_miss_shadow,
&stack_sizes,
_pipeline
));
OPTIX_CHECK(optixUtilAccumulateStackSizes(
pg_hitgroup_default,
&stack_sizes,
_pipeline
));
When I debug, the stack size for RG has value and the rest are zeros as per below.
When I call optixUtilComputeStackSizes with those values of stack_size, I get as below.

Is there anything wrong since I also have EX, MS and HG programs but only counted for RG? If so, please assist how to correct it.
Is it a reason my code, not reaching to miss or anyhit or closesthit even though the condition is met (I think), when optixTrace is called from raygen? That is my main issue encountered now.
Thank you. Appreciated for your kind response and advice.

