1
votes
RTresult code = rtProgramCreateFromPTXString(context, pBuf, "draw_solid_color", &ray_gen_program);

The code result is

RT_ERROR_INVALID_SOURCE

My project can generate PTX file, and the cuda and optix are configured.

How can I resolve this problem?

1
1) Make sure the string pBuf points to is well formed and null-terminated 2) Check the PTX bitness (should probably be 64 from now on) 3) No debug info in the PTX - Marco A.
thanks,i resolved. - Feiper
Glad to know. I'll make that an answer. - Marco A.

1 Answers

0
votes

Since these steps solved your issue, I'm making this an answer:

  1. Make sure the string pBuf points to is well formed and null-terminated
  2. Check the PTX bitness (should probably be 64 from now on)
  3. No debug info in the PTX