Code that works using CUDA 2.2 fails after switching to 2.3.
Pitched linear memory is allocated and a 2D texture is bound. like so:
[indent]texture<int, 2, cudaReadModeElementType> dataTex;
CUDA_CHK(cudaMallocPitch ((void**)&d_data.ptr, &d_data.pitch, d_data.xsize, nRows));
CUDA_CHK(cudaBindTexture2D (NULL, dataTex, d_data.ptr, cudaCreateChannelDesc(), nCols, nRows, d_data.pitch));[/indent]
These calls return without error.
However then a kernel tries to fetch from the texture it fails:
[indent]datum = tex2D(dataTex, col + 0.5f, row + 0.5f);[/indent]
The returned error is cudaErrorUnknown in debug mode, but cudaErrorTextureNotBound in emulation mode.
It is hard to believe that this is a bug in 2.3, but I’m at a loss as to what I might be doing wrong because it worked under 2.2. Suggestions?
I am using Vista 64, VS 2008, compiling for x64, and using a 9800GTX+ card. When changing to CUDA 2.3 I also updated the driver to 190.38.