Problem creating triangle soup

I have a working example creating a triangle mesh with indices. I want to change this to a triangle soup, i.e. without a list of indices to specify which vertices form a triangle. I have an array with 9 numbers defining three vertices and thus one triangle. I set OptixBuildInput.triangleArray.indexFormat to OPTIX_INDICES_FORMAT_NONE and set …numIndexTriplets to 0 and …indexBuffer to NULL.

All else I leave unchanged.

Unfortunately, when running it I get the following error when calling optixLaunch():

Caught exception: CUDA call (cudaStreamSynchronize( m_stream ) ) failed with error: ‘an illegal memory access was encountered’

Do I miss something in the setup? On the other hand building the acceleration structure does not report any errors.

If your program previously worked with indexed triangles and all you changed was the OptixBuildInputTriangleArray fields, then your OptiX device code calculating the vertex attributes is probably still trying to load triangle indices?
That would generate illegal access errors
Have a look at your device code after optixGetPrimitiveIndex().

If that’s not it, we’d need some more info, for example a reproducer by changing one of the OptiX SDK example sources to fail the same way.

Please always add the exact system configuration when asking about errors to reduce turnaround times.
OS version, installed GPU(s), display driver version, OptiX version (major.minor), CUDA Toolkit version (major.minor), host compiler version and edition.

Of course! I still need to do some more device programming…

Thanks for the help!

I use OptiX 7.5 via Visual Studio on windows. Anyway this particular little problem is solved.