[Mesa-dev] [PATCH] egl/android: Provide an option for the backend to expose KHR_image

Emil Velikov emil.l.velikov at gmail.com
Fri Dec 8 14:10:59 UTC 2017


On 8 December 2017 at 05:59, Tapani Pälli <tapani.palli at intel.com> wrote:
>
>
> On 12/07/2017 08:45 PM, Emil Velikov wrote:
>>
>> Hi Harish,
>>
>> On 7 December 2017 at 13:34, Harish Krupo <harish.krupo.kps at intel.com>
>> wrote:
>>>
>>>  From android cts 8.0_r4, a new test case checks if all the required egl
>>> extensions are exposed. In the current implementation we expose KHR_image
>>> if KHR_image_base and KHR_image_pixmap are supported but KHR_image spec
>>> does not mandate the existence of both the extensions.
>>> This patch preserves the current check and also provides the backend
>>> with an option to expose the KHR_image extension.
>>>
>>> Test: run cts -m CtsOpenGLTestCases -t \
>>> android.opengl.cts.OpenGlEsVersionTest#testRequiredEglExtensions
>>>
>>
>> A couple of things that come to mind. Hope that I'm not loosing my
>> marbles ... too badly.
>>
>> The KHR_image_pixmap extension lists the following as dependency:
>>
>>      The EGL implementation must define an EGLNativePixmapType (although
>> it
>>      is not required either to export any EGLConfigs supporting rendering
>> to
>>      native pixmaps, or to support eglCreatePixmapSurface).
>>
>> At the same time 'implementations' define the type even ones that lack
>> native pixmaps - Wayland, GBM, ...
>>
>> (A) If one is to ignore that 'detail' we could simply toggle all of
>> KHR_image_pixmap across the board and simplify things a bit.
>> (B) if native pixmaps is a must - we have a bug in GBM as it
>> advertises KHR_image_pixmap.
>
>
> I was considering this when someone mailed me about this issue but it seems
> to me that enabling KHR_image_pixmap could bring harm, there could be some
> existing user (be it a compositor, game or framework) that then might expect
> pixmap configs to exist and not just type definition. It would be
> interesting to try this out though, this would be the simplest path to take?
>
if they do it would be a very serious bug on their behalf. The spec
could not be more clear and concise on the topic.
That said a quick search shows:

 - kwin and mutter
EGL on X: requires the pixmap extension and uses
CreateImageKHR(...EGL_NATIVE_PIXMAP_KHR...)
does not request config with EGL_PIXMAP_BIT nor call eglCreate*PixmapSurface*

 - Qt5
openwfd: does _not_ check for EGL_KHR_image_pixmap, yet uses
CreateImageKHR(...EGL_NATIVE_PIXMAP_KHR...)
uses EGL_PIXMAP_BIT ... well bundled libANGLE does

 - SDL2 - grep -i pixmap shows only X11/xcb specifics

Would be great to hear other people's view with ^^ in mind.

That can be addressed at a later stage - please don't stall the patch
because of it.

Thanks
Emil


More information about the mesa-dev mailing list