[Mesa-dev] bad performance issue in GPU & CPU data sharing
Zong, Wei
wei.zong at intel.com
Mon May 31 09:33:54 UTC 2021
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20210531/8ca70bd9/attachment-0001.htm>
More information about the mesa-dev
mailing list