PDA

View Full Version : Sharing Image Data between two processes



mmgc
12-08-2009, 01:11 AM
Here is my situation.
1. Process A(cpp) operates a Image Pixel Data & performs various processing's & leaves the image on GPU
2. Process B(say java/cpp) Needs to pick up this Image & Render it on Screen.

Key Performance Criteria : Reading Image Back to CPU & Passing to Process B needs to be avoided.

My Question:
1. Is there any mechanism currently available to share texture/image pixel data across processes ?
2. If not ? What would be the most optimized method the share the image without affecting the Performance criteria.

The mechanisim can be OpenCL , OpenGL or CUDA.

Thanks,
MMGC

dbs2
12-08-2009, 06:26 AM
I am not aware of any way to share data between processess in OpenGL or CL. I would first try just reading the data back into host memory in a way that you can share with the other process via whatever standard memory sharing options you have on your system. My understanding is that the GL/CL environments are virtualized for each process, so there is no standard/supported/safe way to cross between them. Hopefully someone will correct me if I am wrong. (I don't know of any way to do this under CL, at any rate.)