Direct memory copy from Cuda to Vram for display


I am working on a image processing project thats dealing in direct pixel manipulation. I dont fully understand all this 3D graphics stuff and DirectX but I was hoping that it wasnt necessary. At the end of my cuda processing, I have created a new image in the memory space of cuda, say 1MPixel, and to get it displayed on DirectX, I have to memcpy it from the device back to the host, copying into the directx backbuffer and then blt it to the display. Since this return memory copy takes 5msecs to achieve, it would be great if I could avoid it. I cant help but think all thats needed is to copy the cuda memory to vram which I would have thought was in the graphics card alread, so it would be a device to device memory copy.

I can only find refernece to textures being copied directly in cuda/directx but I dont think thats the same thing as a standard image map.

Any advice on this would be welcome.



Hi. Were you able to solve this problem? If so, it would be great if you could post your solution, or some pointers. Thanks.

I would be very interested in doing this as well, but can’t find any material dedicated to this topic. If anyone has any information about whether this is possible and if so, how to go about it, I would be all ears. Any new developments since 2009?

Also very interested in the reply. How do you get a 2D image in GPU memory to display on the screen (image has screen resolution) without going through the host?

through the cuda surface API. It allows direct writes to textures that can then be displayed, not requiring device to host and host to device copies.