[Mesa-dev] [PATCH 2/2] egl: add EGL_platform_device support

Mathias Fröhlich Mathias.Froehlich at gmx.net
Tue Apr 23 20:39:25 UTC 2019


Hi,

On Tuesday, 23 April 2019 22:23:45 CEST Marek Olšák wrote:
> On Tue, Apr 23, 2019 at 4:05 PM Mathias Fröhlich <Mathias.Froehlich at gmx.net>
> wrote:
> 
> > Hi Marek,
> >
> > On Tuesday, 23 April 2019 20:22:15 CEST Marek Olšák wrote:
> > > I'd like to remove swrast from devices. It doesn't work (eglInitialize
> > > fails) and I don't think I like swrast there. Any objections?
> >
> > Yes, how do you guarantee that at least one device can be returned
> > in any case? Even if no drm device is found?
> > The egl device query extension guarantees that there is at least one
> > device available.
> > Beside that swrast may make sense for itself, that is the reason
> > the swrast device is there.
> >
> 
> If no device can be returned, the extension won't be exposed.
Yes, I was triggering this solution back in the days. There was (is?) no infrastructure to enable
or disable an egl extension just past initialization or at runtime.
Finally Emil took the route to add swrast.

The longer I saw the swrast device the better It appeared to me.
... from the users point of view.

>    OR
> If there is at least 1 drm device, swrast won't be in the list.
> 
> From my perspective, radeonsi is always in the list and I wouldn't like
> swrast to be in the list if radeonsi is in the list.

I see - at least I think. But really the swrast device is good as is. I see plenty use cases for that.
Having that only present when there is no hardware device makes it less useful.

What I don't like with the current solution is that you get the swrast as the first device on the list.
The usual application that I know of just uses something closely derived from the nvidia sample code.
And that one just takes the first device. So I personally want to make sure that the first
device is a hardware accelerated device. Putting the swrast device at the end of the list
would be sufficient I think.

best

Mathias




More information about the mesa-dev mailing list