cudaMemcpyXDToArray failed Toolkit 3.1 (Driver 258.96) error with cudaMemcpyXDToArray

Hi everybody,

we receive an unknown error after calling cudaMemcpyXToArray functions to OpenGL interoperability arrays with the

new Driver 258.96 on a GTX 480 and the 3.1 Cuda Toolkit on Windows7 32-bit and 64-bit systems.

The error occurs for the postProcessGL example in the CUDA Computing SDK as well. For this we have to comment out the define USE_TEXSUBIMAGE2D at the start of the

main.cpp file in order to use the new graphics interoperability functions. The example does not return an error from the cudaMemcpy function directly, instead the

error is thrown during the next mapping attempts (cudaGraphicsMapResources in line 224):

As long as we do not execute cudaMemcpyToArray() in line 387 no error occurs (at the cost of a black screen).

In our own project the error is caused after calling cudaMemcpy2DToArray() (executed for an 2D OpenGL texture). The problem does only occur when copying from device memory to a device array.

The function still works fine when copying from host memory to the graphics array.

We have tested our own project and the postProcessGL example for the GTX 480 with the following configurations:

Driver Version 197.75 and Toolkit 3.0 => everything works fine

Driver Version 258.96 and Toolkit 3.0 => unknown error

Driver Version 258.96 and Toolkit 3.1 => unknown error

We have not found a similar report in the forum, so we made up this new post.

Does anyone have a similar problem?

Many thanks in advance.

I encountered the same error:
http://forums.nvidia.com/index.php?showtopic=171631

It seems to be affecting all 2xx.xx drivers so far :-(

The problem might be caused that the mapped OpenGL texture is 4x8bit RGBA (the programming guide states: “It [the Opengl interop] does not currently support normalized integer formats (e.g. GL_RGBA8)”).
Maybe mapping GL_RGBA32F textures works?

For me, i decided to stay at 197.75 and Cuda 3.0. I hope for a fix in a future driver.

Ah ok. I remember that we had to change the code running with GL_RGBA8 to GL_RGBA8UI_EXT in order to switch from Toolkit 2.3 to 3.0.
However, we currently tried to install the NSight debugging environment which requires 2xx.xx drivers.
I hoped that we had overseen some configuration flag or something we could fix within our code.
But I think we will stay at the same driver version as well without using NSight until this problem is fixed.

Thanks a lot nighthawk13.

Hi all!

Is there any news on this topic?

I am using Cuda 3.1 and driver 257.21. The postProcessGL example in the latest CUDA Computing SDK is using floating point texture format (GL_RGBA16F_ARB ) by default.

If I am using the old fashioned way for copying the result from a PBO to a texture then the example works fine (glTexSubImage2D).

But using cudaMemcpyToArray by commenting out “define USE_TEXSUBIMAGE2D” results in a “Runtime API Error” on fermi architectures, i.e.

cutilSafeCall(cudaMemcpyToArray(texture_ptr, 0, 0, cuda_dest_resource, size_tex_data, cudaMemcpyDeviceToDevice));

I am very surprised that my GTX 280 works well with the configuration described above and fails with the GTX 480. Is there any explanation for this?

My system is: Win 7, 32 Bit, Cuda 3.1. Runtime Version

I am feeling a little bit lost :-(

Thanks and best regards,

Mick

Hi all!

Is there any news on this topic?

I am using Cuda 3.1 and driver 257.21. The postProcessGL example in the latest CUDA Computing SDK is using floating point texture format (GL_RGBA16F_ARB ) by default.

If I am using the old fashioned way for copying the result from a PBO to a texture then the example works fine (glTexSubImage2D).

But using cudaMemcpyToArray by commenting out “define USE_TEXSUBIMAGE2D” results in a “Runtime API Error” on fermi architectures, i.e.

cutilSafeCall(cudaMemcpyToArray(texture_ptr, 0, 0, cuda_dest_resource, size_tex_data, cudaMemcpyDeviceToDevice));

I am very surprised that my GTX 280 works well with the configuration described above and fails with the GTX 480. Is there any explanation for this?

My system is: Win 7, 32 Bit, Cuda 3.1. Runtime Version

I am feeling a little bit lost :-(

Thanks and best regards,

Mick

Hi all!

I just installed the new developer driver version 260.61 and it works with the GTX 480 :-)

All issues with the GL-interoperability, textures and cudaMemcpyToArray seem to work now.

Tested on: Win 7 32 Bit, Cuda 3.1 and 3.2 RC

Best regards,

Mick

Hi all!

I just installed the new developer driver version 260.61 and it works with the GTX 480 :-)

All issues with the GL-interoperability, textures and cudaMemcpyToArray seem to work now.

Tested on: Win 7 32 Bit, Cuda 3.1 and 3.2 RC

Best regards,

Mick