Got a problem interoperating CUDA/OpenGL on linux, using 3.2. After a lot of device-memory allocating and freeing (cudaMalloc3DArray, cudaMalloc, VBOs with glBufferData) cudaGraphicsGLRegisterBuffer fails, reporting cudaErrorMemoryAllocation. The reference manual doesn’t indicate that cudaErrorMemoryAllocation is ever returned by cudaGraphicsGLRegisterBuffer, and when it happens, cudaMemGetInfo reports 3.6 GB of 4.2 GB available, while the buffer its trying to register is ~7.8 MB. Any ideas out there?
Same problem here, with Cuda 4.0 and Geforce 9800 GT.
Everything works fine for thousands of VBO’s, but after a certain number of calls to cudaGraphicsGLRegisterBuffer the function fails with cudaErrorMemoryAllocation. There are still hundrets of MB available…at host AND device.
Also the function cudaGraphicsGLRegisterBuffer gets slower and slower with increasing number of registered VBOs…
CUDA reference mentions: “Note that this function may also return error codes from previous, asynchronous launches.” Posting some code would be helpful, I think.
No other CUDA calls have been made before (except some initialization stuff, but this ain’t async).
Also, i check every call for errors. And everything works, until it fails after call #xxxx.