Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN via buildroot" <buildroot@buildroot.org>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: John Ernberg <j@j-ernberg.se>,
	buildroot@buildroot.org, Adam Ford <aford173@gmail.com>,
	Bernd Kuhls <bernd@kuhls.net>,
	Joseph Kogut <joseph.kogut@gmail.com>,
	Romain Naour <romain.naour@gmail.com>
Subject: Re: [Buildroot] [RFC PATCH] package: {libgl, libglvnd, mesa3d}: Propagate libglvnd GL provider to libgl dependencies
Date: Mon, 19 Oct 2026 07:53:40 +0200	[thread overview]
Message-ID: <atWwZGNSjbN0GrwD@landeda> (raw)
In-Reply-To: <atUtmzafWnVtVm-t@windsurf>

Thomas, All,

On 2026-10-18 22:41 +0200, Thomas Petazzoni spake thusly:
> [+Yann since he added libglvnd initially.]

Actually, it was Jakub would introduced it in 2020, I "only" reworked
the package, and it was applied in 2022 with 0378e2e5d9ce
(package/libglvnd: new package).

But that was a long time ago, and my recollecion of the details is
partial... Let's see below...

> On Sun, Oct 18, 2026 at 06:06:51PM +0200, John Ernberg wrote:
> Thanks for this new iteration. It is really annoying that mesa3d needs
> libglvnd, as it prevents from doing the natural thing:
> 	libgl -> libglvnd -> real OpenGL provider -> mesa3d
> In the end this indeed means that the only option is to do something
> like this:
> 	libgl -> libglvnd
> 	      -> real OpenGL provider

Is this for build dependencies?

AFAIR, the actual GL providers do depend on libglvnd at build time,
so we'd have:

    [GL-using package] -> libgl -> libglvnd
                           mesa3d -/

I wonder if should further have this:

    [GL-using package] -> libgl     ->     libglvnd
                              \-> mesa3d -/

... even though the libgl -> mesa3d would be here just to ensure build
ordering, and there would be nothing from mesa3d that the [GL-using
package] would use at build time in practice. I think...

> Now, the questions that come up are:
> - Why do you need libglvnd in the first place? Why don't you just
>   enable mesa3d?
> - Why do we have libglvnd at all? It has been added in 2020, but so
>   far only mesa3d has been made "suitable" to be used behind libglvnd,
>   and since we have only one OpenGL provider able to be used behind
>   libglvnd, the abstraction that libglvnd provides seems quite
>   useless, no?

libglvnd would allow having multiple GL (GLES, EGL, let's call all of
that just "GL" to simplify) providers at the same time on the same
system.

For example, some boards have two GPUs, one integrated and one discrete.

The idea of a series I sent back then [0], was when libglvnd was _not_
enabled in the configuration, then we could have only one GL provider,
i.e. the case currently. But when libglvnd was enabled, then multiple
GL provider could be enabled in the same configuration.

At the time, libglvnd was relatively new, nad only mesa3d had
support for it; the nvidia package we had (and that we still have,
AFAICS) was too old, but newer versions (IIRC) do support being
installed so as to be found by libglvnd.

So, the idea was to bump nvidia-driver, but that stalled for various
reasons...

Then, we need to also check which other GL providers can be configured
with libglnvd support.

> So shouldn't we drop libglvnd entirely?

Depends if Buildroot eventually want to support boards with two GPU, one
integrated and one (or more) discrete. This happens.

[0] https://lore.kernel.org/buildroot/cover.1595839612.git.yann.morin.1998@free.fr/

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-10-19  5:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:06 [Buildroot] [RFC PATCH] package: {libgl, libglvnd, mesa3d}: Propagate libglvnd GL provider to libgl dependencies John Ernberg
2026-10-18 20:41 ` Thomas Petazzoni via buildroot
2026-10-18 20:57   ` John Ernberg
2026-10-19  7:42     ` Thomas Petazzoni via buildroot
2026-10-19  5:53   ` Yann E. MORIN via buildroot [this message]
2026-10-19  7:40     ` Thomas Petazzoni via buildroot
2026-10-19  9:54       ` Yann E. MORIN via buildroot
2026-10-19 12:23         ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atWwZGNSjbN0GrwD@landeda \
    --to=buildroot@buildroot.org \
    --cc=aford173@gmail.com \
    --cc=bernd@kuhls.net \
    --cc=j@j-ernberg.se \
    --cc=joseph.kogut@gmail.com \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox