[Mesa-users] Is there a better way to validate wl_display passed in at eglGetDispaly()?

Ruei, Eric e-ruei1 at ti.com
Fri Jan 27 23:28:51 UTC 2017


Hi, Pekka:

Thank you so much for your invaluable inputs and detailed explanations!

Best regards,

Eric
 
-----Original Message-----
From: Pekka Paalanen [mailto:ppaalanen at gmail.com] 
Sent: Friday, January 27, 2017 6:18 PM
To: Ruei, Eric
Cc: mesa-users at lists.freedesktop.org; wayland-devel at lists.freedesktop.org; Emil Velikov
Subject: Re: [Mesa-users] Is there a better way to validate wl_display passed in at eglGetDispaly()?

On Fri, 27 Jan 2017 18:29:18 +0000
"Ruei, Eric" <e-ruei1 at ti.com> wrote:

> To whom it may concern:
> 
> We would like to bring your attention to a potential wayland-egl issue 
> with openCV Python script.
> 
> The issue is that both Mesa and our mechanism to identify the 
> wl_display  client from eglGetDIspaly() call fails for openCV Python 
> script.

Hi,

I believe the only bullet-proof option is to stop using eglGetDisplay with magical argument detection, and use eglGetPlatformDisplay instead:
https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_platform_wayland.txt

That said, libwayland-client.so and libwayland-server.so each contain an identical definition of wl_display_interface symbol.
There has been talk about moving the duplicate parts into a third new library loaded by both of the existing ones, but so far we haven't seen an obvious benefit from it. Maybe this would be such a case?

OTOH, the magical argument detection can never be reliable, so fixing it while the underlying design is broken is questionable.

However, if you find the symbol wl_display_interface defined in any other binary than libwayland-client.so and libwayland-server.so, you might want to look into removing those. It will still leave the two definitions, but if you insist, maybe those could be consolidated by a careful linking order.


Thanks,
pq


More information about the wayland-devel mailing list