Vector functions for OptiX 7 with NVRTC?

Hi, yes GTX 1050 is fine, there is no difference for Nsight debugging GTX vs RTX.

By “watch” I assume you mean setting a breakpoint that is conditioned on a variable being equal to some value you choose?

I haven’t been able to try this today in OptiX, but the Nsight VSE manual says you can set conditional breakpoints. If this works in OptiX programs, you will probably have to create a local variable with your pixel coordinates (via optixGetLaunchIndex) in order to get this to break on a pixel of your choice.

https://docs.nvidia.com/nsight-visual-studio-edition/Nsight_Visual_Studio_Edition_User_Guide.htm#Set_GPU_Breakpoints.htm

See the section “Conditional Breakpoints”

If for some reason that doesn’t work for you right now, one way to get similar behavior is to add local variables with the value from optixGetLaunchIndex(), and an if block that checks for when the launch index matches the pixel you’re interested in. Then you can place an unconditional breakpoint inside the block and catch the pixel you want in the debugger. The debugger will stop in the specific thread you’re interested in, but you can also examine the other threads in the warp, if you want.

I always like to add some debug pixel coordinates to my launch parameters and a boolean flag. That way, I can set the flag and the coordinates in my mouse callback by clicking on the screen, in order to add debug prints or breakpoints into my OptiX shaders. A macro like below comes in pretty handy for debug prints, it might be tweakable to trigger code with a breakpoint:

#define print_pixel(...)                                                                     \
{                                                                                            \
    const uint3  idx__ = optixGetLaunchIndex();                                              \
    if( params.debug && idx__.x == params.debug_pixel.x && idx__.y == params.debug_pixel.y ) \
        printf( __VA_ARGS__ );                                                               \
}


David.