[Mesa-users] Mesa 17 Wayland EGL changes

Pekka Paalanen ppaalanen at gmail.com
Mon Feb 13 11:23:58 UTC 2017


On Mon, 13 Feb 2017 11:59:01 +0100
Cédric Legrand <legrand.cedric.01 at gmail.com> wrote:

> Hello,
> 
> I'm working on a Wayland compositor and the latest Mesa update broke my
> work. After investigating, I found that I need to use the
> EGL_WL_wayland_bind_display extension, otherwise my compositor crashes with
> wl_shm reporting an invalid format. I'm not an OpenGL expert, but I spent
> the last few days reading documentation, inspecting weston's source code
> and googling with no luck.
> 
> Question 1: Is it necessary to have the extension? Why don't Mesa support
> plain old wl_shm anymore? Unless I missed something, this means we can't
> use OpenGL anymore for software rendering in Wayland, am I right?

Hi,

that sounds like a new bug in Mesa, but what is this "invalid format"
error you mention?

The extension is necessary for hardware accelerated OpenGL for clients
only.

> At the moment, I'm trying to load an EGL window before falling back to a
> non-opengl rendering mode in case of error. The problem here is that doing
> so now crahes the whole compositor, and the only way I see to do this is
> checking if the wl_drm interface is provided before trying to create the
> window, meaning an other roundtrip.

Do not write code to inspect or use wl_drm, ever. It is not portable.

I am slightly confused here. Are you talking about an application (a
client), your compositor, or your compositor as a Wayland client?

> Question 2: Shouldn't the window creation simply fail if wl_drm is not
> available, letting me fallback to another rendering mode?

In a Wayland client Mesa EGL should just silently revert to
software rendering if wl_drm is not available. That is how it has
worked, and if it no longer does, I would consider it a bug.

I suspect the key to your problem lies in the "invalid format" error.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20170213/f678f2e8/attachment.sig>


More information about the mesa-users mailing list