Is there something special I have to do in order to send pointers to structs in constant memory?
I have a memory object created with CL_MEM_READ_ONLY and filled using a standard clEnqueueWriteBuffer.
I also have a .cl-file that contains two functions and both of these have “__constant Parameters *params” in the argument list.
The problem is that I can only run the kernel defined lastly in the file. Calling the first one causes a crash in clEnqueueNDRangeKernel, trying to access address 0. Swapping the locations in the code makes the other kernel runnable, and the crash happens if the one that previously worked is enqueued.
Changing __constant to __global in the second kernel causes the first to work again.
Has anyone had similar problems? Any ideas on what I may be doing wrong?
I’m using NVIDIAS OpenCL and would have asked in the NVIDIA forums since I believe this to be a bug in their implementation, but their forums are down for the next few days.