Hi,
a question related to OptiX 7.0.0:
What is the appropriate way to access the “params” buffer from a separate CUDA kernel (which is not an OptiX-Kernel) ?
When using this decleration in both (pure CUDA kernel AND OptiX-Kernel)
extern "C"
{
__constant__ LaunchParams params;
}
this error occurs when both are accessed (even when device sync is done around the launches):
[2][ ERROR]: Failed to copy internal launch buffer (CUDA error string: an illegal memory access was encountered, CUDA error code: 700)…
No problems occur, when the pure buffer offset of that device buffer is passed to
the CUDA kernel in a struct:
struct BufferStruct
{
LaunchParams* base;
void* reserved;
};
__constant__ __device__ BufferStruct BufData = {NULL, NULL};
But that means, that any access to that buffer is an access to a pointer of a pointer. Is there a way to get a direct pointer access to the buffer through such (or a similar ) decleration ?
Its also possible to pass the buffer offset to the kernel as parameter, but also then the access is not directly done as if it would be defined globally (as it is in the OptiX kernels).
Thank you.
My system:
OptiX 7.0.0 SDK GTX 1050 2GB driver 436.48 CUDA 10.1.243 Win10PRO 64bit (version 1809) VS2019 (toolkit v140 of VS2015)