Direct memory copy from Cuda to Vram for display
Hi,

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.

thanks

Guy
Hi,



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.



thanks



Guy

#1
Posted 12/22/2009 09:05 AM   
[quote name='GuyD' post='968780' date='Dec 22 2009, 09:05 AM']Hi,

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.

thanks

Guy[/quote]

Hi. Were you able to solve this problem? If so, it would be great if you could post your solution, or some pointers. Thanks.
[quote name='GuyD' post='968780' date='Dec 22 2009, 09:05 AM']Hi,



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.



thanks



Guy



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

#2
Posted 06/11/2010 09:40 PM   
[quote name='salmanmaslam' date='11 June 2010 - 01:40 PM' timestamp='1276292449' post='1072041']
Hi. Were you able to solve this problem? If so, it would be great if you could post your solution, or some pointers. Thanks.
[/quote]

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?
[quote name='salmanmaslam' date='11 June 2010 - 01:40 PM' timestamp='1276292449' post='1072041']

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?

#3
Posted 08/18/2011 09:35 PM   
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?
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?

#4
Posted 04/22/2013 04:46 PM   
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. Christian
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.

Christian

#5
Posted 04/23/2013 01:25 PM   
Scroll To Top