Hello,


I'm using GLES shader to run algorithms on image frames, I got very bad 
performance issue in GPU & CPU data sharing, especially retrieve data from GPU 
to CPU.



Basically, I use glGenBuffers/glBindBuffer/glBufferData(target, size, data, 
usage) to create GPU buffer object and initialize GPU data store with CPU data 
pointer. After GLES shader finished the processing, I use glMapBufferRange to 
retrieve processed image data back to CPU, and for some reason I have to do an 
extra data copy from the gl map pointer to another CPU buffer, this is super 
slow.



Here's the code snippet 
https://github.com/intel/libxcam/blob/master/modules/gles/gl_buffer.cpp#L94

https://github.com/intel/libxcam/blob/master/modules/gles/gl_buffer.cpp#L127



I wonder If there has other efficient way to sharing data between CPU & GPU 
GLES shader?



Thanks,

Zong Wei

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to