I figured that parts of my code perform way better on classic-GPGPU using OpenGL (mainly it’s because I am making use of the blend stage).
So I used the regular OpenGL render to texture mechanism using FBOs to perform the OpenGL part of the computation. After that I use Buffer Objects to map these OpenGL textures into Cuda’s global memory (i.e. glBindBuffer, glReadPixels). However, this seems to break down performance a lot and I anticipate that it is due to the glReadPixels call.
So I was wondering, if there is a way of avoiding the read pixels thing and using OpenGL textures within a Cuda context right away?