CUDA and Direct3D

Hi everyone,

I’m using DirectX9 in my application, and I need to perform massive reads from the GPU into system memory. Currently I’m using GetRenderTargetData, and it’s not working fast enough.
I wanted to try to use CUDA for this, as I understand it should perform GPU-CPU transfers faster than DX/OGL.
From what I see in the CUDA docs, I can only map a DX vertex buffer to CUDA, but not a texture or a render target, which is what I need.
Do I understand this limitation correctly?
Is this limitation going to change in future versions of CUDA?

Thanks.

Hi eigers,

Yes, we are working on a more complete solution for DX interop. Sorry for the inconvenience in CUDA 1.1, but stay tuned.

Mark

this relates to something i was going to ask…

i’m using cuda to produce 3d images in real-time. i worked from the mandelbrot example that ships with the sdk, which uses opengl to draw the buffer. however, i am much more familiar with directx, and would like to use some of its functionality. i haven’t been able to find a way to do this though…am i missing it or is this not yet possible?

thanks,

mike

No, there’s no way to directly transfer image data to Direct3D currently - D3D interop is limited to vertex buffers.

You could of course read back your images to system memory and render them from there, which depending on the image size and your system may be fast enough.

Question is the next thing possible in my project also using direct3d:
I would calculate all the data in another array with same dimensions as my texture buffer and than do a device2device memcopy using the texture buffer’s pointer and my array’s pointer? My gpu calculations wouldn’t need to read data from the texturebuffer, only need to write to it and use it for rendering afterwards (without going back to system memory…)

Thanks for you answer, Mark.

Could you give a rough estimate as to when such functionality will be available?

Thanks.