Hi, I’m having a strange problem using CUDA texture to read a PBO. Basically I want to read data from an OpenGL texture in CUDA, so I read the texture into a PBO and map it to CUDA. After that, in order to speed up data processing, I want to use CUDA texture fetching. Most of the examples and discussions I read suggest that I should copy the data to a CUDA array and then bind it to a texture. However, the texture is too big and I’m using too much GPU memory that it’s not possible for me to allocate a CUDA array of the size of my texture. As such, I try to bind the PBO to a CUDA texture through the linear pointer returned by cudaGLMapBufferObject(). I think this will provide me with a little speed up over accessing the global memory directly.
However, reading the PBO using texture fetching like this sometime gives me wrong reading. As such, I want to ask if any of you have experiencing a similar problem, if there is a way to fix that, or if it’s not possible to read a PBO through CUDA texture that way. Thanks a lot.
FYI, I’m using 16 bits 4 channels Integer Texture on N8800GTX with CUDA 1.1.