[yocto] [meta-raspberrypi] gles2 on raspi3

Andreas Müller schnitzeltony at googlemail.com
Sat Apr 15 11:09:02 PDT 2017


On Sat, Apr 15, 2017 at 6:35 PM, Trevor Woerner <twoerner at gmail.com> wrote:
> On Sat 2017-04-15 @ 04:46:14 PM, Andreas Müller wrote:
>> > Does anyone have any of these (or something else?) working?
>> >
>> Ehm userland gles2 on X11? I would not expect that to work. Experts
>> correct me but userland acceleration works for fullscreen apps only.
>
> I have made this work before (which, as you'll see later in this email,
> doesn't imply that's how it's supposed to work!):
> https://twoerner.blogspot.ca/2015/09/oe-build-of-glmark2-running-on.html
>
> Oh, and I did try both with and without "--fullscreen".
>
>> Why not using FOSS VC4+mesa?
>
> Now's probably a good time to point out I only have a vague idea of what I'm
> doing ;-)
>
> I didn't try vc4 because the raspi recipes implied (to me) it was for aarch64
> only. The "vc4graphics" MACHINE_FEATURES is only added for raspberrypi3-64.
> I'll give this a try though.
Oh yes you are right - it is long time ago - maybe this was one of the
reasons for my vc4-only fork. I thought it is an option set in
local.conf.
>
> Here's another question that only shows my inexperience in this area... does
> using mesa always imply software-only rendering? mali (for example) would be
> hardware rendering (though through a binary blob) and mesa is the software
> fallback?
I am also no expert here but Mesa is the open source userspace part
for accelerated graphics. Mesa-SW rendering driver is a fallback in
case no driver is supported/implemented. This is what you have seen
for glmark2. Since the VC4-Mesa was implemented, for me RaspberryPi
turned into the reference hardware regarding graphics. You can have
accelerated X11 + wayland in one image without any trouble with proper
working modesetting (and HDMI sound is on it's way). I've never had
this before on other machines where closed source blobs do graphics
acceleration. Either you have fb only (no X11/wayland) or you have to
decide either X11 or wayland - and worst: With every new version of
xserver you have to expect trouble.
>
> By the way, with my current setup I have been able to run openGL apps (e.g.
> glmark2 by itself) albeit most definitely non-accelerated!
mesa-gl builds swrast - mentioned above
>
> A lot of google searches talk about setting environment variables. Are there
> any that might apply?
>
For the first shot I would add vc4graphics to MACHINE_FEATURES in
raspberrypi3.conf. The required settings should happen (see recipe
rpi-config).

In the long run I would start a discussion:

* Mesa/VC4 is not a machine feature only available on 64Bit Pi3 only:
It is common to all version of RaspberryPi. Using mesa should be a
decision easily selected by a setting somewhere. The only reason 64Bit
Pi3 gets VC4 by default is that userland is not working for 64Bit -
see commit 9d418db5ed2962821987ac90c07c3a61e40c0814)
* Why still use userland? Dropping it would make things MUCH easier:
All the decisions based vc4graphics in MACHINE_FEATURES could be
removed (that's what my fork does)

Andreas



More information about the yocto mailing list