e_dod_as
e_dod_as

Reputation: 21

How to get physical address of GPU memory for DMA? (OpenCL)

I am writing an OpenCL program and I wish to transfer data from a frame grabber to a GPU using DMA. How can I get the physical address of an OpenCL buffer on the GPU to do that?

Upvotes: 2

Views: 2270

Answers (1)

vocaro
vocaro

Reputation: 2779

With OpenCL, you cannot get the physical GPU address of a buffer.

However, you can map a region of a buffer directly into host memory, allowing the memory to be copied in and out using standard C/C++ code such as memcpy. See clEnqueueMapBuffer.

Upvotes: 2

Related Questions