I’m trying to create a buffer of callable programs. When I run my application, I get this error:
OptiX Error: Unknown error (Details: Function "_rtContextCompile" caught exception: Assertion failed: "insn->isMove() || insn->isLoad() || insn->isAdd()", [5639172])
I’m not sure what this means or how to debug it. I’m assuming because this happens during rtContextCompile that the problem must be in my shader, which looks like this:
#define RT_USE_TEMPLATED_RTCALLABLEPROGRAM //not sure I need this
#include <optix_world.h>
/* Context variables */
rtBuffer<rtCallableProgramId<float(optix::Ray*)> > functions;
...
RT_PROGRAM void miss()
{
...
float3 color = light.color;
if (light.function > -1)
color *= functions[light.function]( &ray );
...
}
Everything works fine if I remove the references to the callable programs. Any ideas how to fix the error?
OptiX 3.6.0, CUDA 6.0, Windows 7, VS2010, using SM_20, Quadro K4000