I have separate
ClosestHit.cu files that get compiled into PTX for use in Optix 7. I’m trying to follow along with the MDL SDK which uses the
texture_support_cuda.h which implements a bunch of
extern "C" functions that are necessary for the generated MDL direct callables.
However, if I include
texture_support_cuda.h in both my
ClosestHit.cu I run into the following errors:
Error: Symbol 'df_bsdf_measurement_albedos' was defined multiple times. First seen in: '__closesthit__radiance_and_1_more_10907236484217499007'
I’ve also tried forward declaring these functions in the header and then creating a
texture_support_cuda.cpp to link against the compiled PTX files as a library. This fixes the above error, but then the generated MDL files run into an unresolved external symbol:
Error: Unresolved external symbol 'tex_lookup_float3_2d' in module '__direct_callable__mdl_init2_and_9_more_18033467503023389813'
The SDK examples don’t have any where this header is included twice so I’m not sure what the correct solution to this problem is. Hoping for some advice. Also, apologies, I’m not sure if this belongs in the Optix section or the MDL section, but it seems MDL specific so put it here.