I am using EGLImage in combination with Android GraphicBuffers to remove the need to copy to/from GPU memory. The problem is it seems only one format is supported (RGBA8888). I would like to confirm this, either by quering the driver or if you have the answer here.
1. Is there a way to get this information from the driver?
2. Is there a list of supported GraphicBuffer formats?
Hi Emil,
You can create an EGLImageKHR then import it in OpenCL using clCreateFromEGLImageKHR
CL uses the type of the EGLImage to find out how much data it needs to sample from the cl_image but never performs any type conversion. (Data will be interpolated only if you enable it in the image sampler).
Therefore I would recommend using a CL_RGBA image (Not all CL or EGL image formats are supported by the extension) for your YUV data, this way you get 32bit of raw data for each image read in your kernel
Hope this helps,
Anthony
There is also an ARM extension which allows you to import dma_buf allocations as a buffer. (This way there is no type associated to the buffer you can simply use vload/vstore on the buffer).
This requires a Mali driver which is r7p0 or above and you need to obviously be able to provide a dma_buf allocation.
Is that something which would work for you you think ?
That might be possible yes. I will look into it, thank you.