Validation error: Inconsistent scope lookups in PTX code

Hi guys,

I am new to both cuda and optix, and I just encounter a runtime error when compile the context:

Invalid context (Details: Function “RTresult _rtContextCompile(RTcontext)” caught exception: Validation error: Inconsistent scope lookups in PTX code (Program attached to different object types), [10486129])

It troubles me for days, does anyone know what it mean and how to fix it?


Finally I find the reason is the top group can’t share the same acceleration with geometry groups, just create different accelerations for them fix it.

For general cases, just paste the answer from OptiX help team here:


Actually, I need to correct one part of this: it is not where you BIND the
program, but where you CALL it from. So you cannot call a bound program
from a miss program and from a closest_hit program, regardless of where it
is bound.


On 9/4/14 10:16 AM, “Keith Morley” wrote:

Hello Jack,

A single RT_CALLABLE_FUNCTION, when bound via via an rtVariable (ie, it is
a bound callable program), must only be bound at a single scope level of
the lookup hierarchy. For instance, lets say you have an
RT_CALLABLE_FUNCTION. You create an RTprogram object from this function
(or multiple RTprograms). If you are binding explicitly via rtVariables,
rather than via rtProgramIds then you can bind these program objects to
material scopes, or to miss programs, or to ray-gen programs, but not to a
mixture of these.

However, you can attach to multiple levels of the scope hierarchy when
using bindless callable programs via rtProgramIds.

This should, and will, be made clearer in the documentation.