<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-02-13 13:13 GMT+01:00 Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I think you forgot to CC the mailing list. I cannot really help in<br>
private.<br></blockquote><div><br></div><div>Sorry, this is the first time I post to a mailing list, I thought it was automatic. Should be good this time.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, 13 Feb 2017 12:49:59 +0100<br>
<div><div class="h5">Cédric Legrand <<a href="mailto:legrand.cedric.01@gmail.com">legrand.cedric.01@gmail.com</a>> wrote:<br>
<br>
> 2017-02-13 12:23 GMT+01:00 Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>>:<br>
><br>
> > On Mon, 13 Feb 2017 11:59:01 +0100<br>
> > Cédric Legrand <<a href="mailto:legrand.cedric.01@gmail.com">legrand.cedric.01@gmail.com</a>> wrote:<br>
> ><br>
> > > Hello,<br>
> > ><br>
> > > I'm working on a Wayland compositor and the latest Mesa update broke my<br>
> > > work. After investigating, I found that I need to use the<br>
> > > EGL_WL_wayland_bind_display extension, otherwise my compositor crashes<br>
> > with<br>
> > > wl_shm reporting an invalid format. I'm not an OpenGL expert, but I spent<br>
> > > the last few days reading documentation, inspecting weston's source code<br>
> > > and googling with no luck.<br>
> > ><br>
> > > Question 1: Is it necessary to have the extension? Why don't Mesa support<br>
> > > plain old wl_shm anymore? Unless I missed something, this means we can't<br>
> > > use OpenGL anymore for software rendering in Wayland, am I right?<br>
> ><br>
> > Hi,<br>
> ><br>
> > that sounds like a new bug in Mesa, but what is this "invalid format"<br>
> > error you mention?<br>
><br>
><br>
> Sorry, I was a little vague on this one. The error is the wl_shm protocol<br>
> error:<br>
> -> wl_display@1.error(wl_shm_<wbr>pool@14, 0, "invalid format 0x34325258")<br>
><br>
> I inspected Mesa code and it seems that it is asking for a WL_DRM_FORMAT_*<br>
> buffer, independently from the availability of the wl_drm interface. There<br>
> is no instance of WL_SHM_FORMAT_* in its source code. Of course, without<br>
> the interface, the server wl_shm knows nothing about these formats and<br>
> throws the error.<br>
<br>
</div></div>The WL_SHM and WL_DRM formats are identical, except for two very<br>
unfortunate differences: argb8888 and xrgb8888 - the two formats that<br>
are required to be supported by the compositor and are most used.<br>
<br>
Hence most DRM formats are valid and correct also as wl_shm formats (by<br>
design), except the ones that are most popular (by historical accident).<span class=""><br></span></blockquote><div> </div><div>My system is using ARGB8888. If I got everything correctly, this means that Mesa should fallback to WL_SHM_FORMAT_ARGB8888 when wl_drm is not available, right? Or should the compositor have to support WL_DRM_FORMAT_[XA]RGB8888 (even if this is implementation specific)?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> > I am slightly confused here. Are you talking about an application (a<br>
> > client), your compositor, or your compositor as a Wayland client?<br>
> ><br>
><br>
> I talking about my compositor client in this case, but even regular clients<br>
> should be affected by this problem.<br>
<br>
</span>Compositor's client, or client compositor i.e. a nested compositor.<br>
<br>
That is quite confusing. When talking about a compositor, it is assumed<br>
to be the Wayland server for the discussion unless otherwise explicitly<br>
mentioned.<br>
<br>
Anyway, yes, the client purpose should not matter.<br>
<br>
<br>
Thanks,<br>
pq<br>
</blockquote></div><br></div></div>