Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/6] package/mesa3d: is a full-openGL provider if X.org is present
Date: Tue, 01 Apr 2014 22:14:11 +0200	[thread overview]
Message-ID: <533B1E13.9020200@crapouillou.net> (raw)
In-Reply-To: <20140401181437.GA3291@free.fr>

Hi,

Comments embedded.

On 01/04/2014 20:14, Yann E. MORIN wrote:
> Paul, All,
>
> On 2014-04-01 09:48 +0200, Paul Cercueil spake thusly:
>> I don't see the "if X.org is present" part in your patch, what would prevent
>> me from trying to enable OpenGL on a X11-less system?
> Right, the commit log does not really match the changeset.
>
>> You make BR2_PACKAGE_MESA3D_DRIVER select BR2_PACKAGE_HAS_OPENGL but that is
>> wrong. Typically a X11-less system will enable a Gallium driver, while
>> Mesa's OpenGL requires a DRI driver (hence the dependency on X11).
> This is the same change Bernd did in his patch. I initially did:
>
>      config BR2_PACKAGE_MESA3D
>          bool "mesa3d"
>          select BR2_PACKAGE_HAS_OPENGL if BR2_PACKAGE_XORG7
>
>      if BR2_PACKAGE_MESA3D
>
>      config BR2_PACKAGE_PROVIDES_OPENGL
>          default "mesa3d" if BR2_PACKAGE_XORG7
>
>      endif
>
> (only quoting the relevant parts)
>
> But as Bernd (who seems much more knowledgeable than I in mesa3d) made
> than depend on BR2_PACKAGE_MESA3D_DRIVER, I eventually did the same.
>
>> What I suggest is to select BR2_PACKAGE_HAS_OPENGL only from
>> BR2_PACKAGE_MESA3D_DRI_DRIVER, and make BR2_PACKAGE_MESA3D_DRI_DRIVER
>> available only if X11 is enabled, since it makes no sense building X11-only
>> drivers in that case.
> But MESA3D_DRI_DRIVE is a blind option that is selected by the various
> Gallium or DRI drivers.
>
> Of those drivers, only the i965 DRI driver depends on XORG7, the other
> DRI drivers, as well as the Gallium drivers, do not depend on XORG7.
>
> Here are all the drivers:
>      nouveau (Gallium)
>      vmware  (Gallium)
>      swrast  (Gallium)
>      swrast  (DRI)
>      i965    (DRI) depends on XORG7
>      radeon  (DRI)
>
> So, taking your comment into account, only the i965 should provide
> full-openGL, since it's the only one that guarantees X.org is present.
>
> However, are the others missing a dependency on XORG7? Is it possible
> (and meaningful) to build the nouveau Gallium driver without X.org? The
> radeon driver? ...
>
> I have to admit I am a bit lost in all this mess... :-(

It works like this: regular OpenGL only works with DRI drivers, and DRI 
drivers are only usable under X11.
Which means that all DRI drivers should depend on XORG7 (even the swrast 
one), and they should all select OpenGL.

Gallium drivers are meant to be used with EGL and OpenGL ES, and only 
some of them can be used under X11 using a DRI compatibility layer (for 
instance, "nouveau" in Mesa is both a Gallium and a DRI driver). But 
they should also all work fine without X11, and will support Wayland, 
which is not the case for DRI drivers.
>
> So, here is basically what I propose for now:
>
>    - move the select _HAS_OPENGL to BR2_PACKAGE_MESA3D_DRI_DRIVER
>    - do the select only if XORG7 is selected
>    - add missing dependencies on XORG7 based on your feedback on the
>      above question.
>
>
> BTW, there is a bug in the way BR2_PACKAGE_MESA3D_DRI_DRIVER is defined:
>
>      config BR2_PACKAGE_MESA3D_DRI_DRIVER
>          select BR2_PACKAGE_MESA3D_DRIVER
>          depends on !BR2_PREFER_STATIC_LIB
>          bool
>
> None of the symbols that select BR2_PACKAGE_MESA3D_DRI_DRIVER do depend
> on !BR2_PREFER_STATIC_LIB, so we can end-up in an unmet-dependency hell.
>
> Basically, adding a 'depends on' to a no-prompt symbol is just wrong.
>
> I'll fix that in my series.
>
>> Also, the original Config.in has options to enable EGL/GLES, having an
>> option to toggle OpenGL would be nice too, I think
> Well, we can add such an option in a follow-up patch; I do not like to
> mix fixes and enhancements in the same patch.
>
>> (and OpenVG, but that's a
>> separate issue).
> Ditto, it can be in a follow-up patch.
>
> Thank you for the review! :-)
>
> Regards,
> Yann E. MORIN.
>

  reply	other threads:[~2014-04-01 20:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 21:59 [Buildroot] [PATCH 0/6] Add virtual package for full-openGL (branch yem/fixes) Yann E. MORIN
2014-03-31 21:59 ` [Buildroot] [PATCH 1/6] package/libevas: quick fix to get rid of circular deps Yann E. MORIN
2014-04-02  6:13   ` Arnout Vandecappelle
2014-04-02 16:25     ` Yann E. MORIN
2014-04-03 20:43   ` Thomas Petazzoni
2014-03-31 21:59 ` [Buildroot] [PATCH 2/6] package/libgl: introduce as a new virtual package for full-openGL providers Yann E. MORIN
2014-03-31 21:59 ` [Buildroot] [PATCH 3/6] package/mesa3d: is a full-openGL provider if X.org is present Yann E. MORIN
2014-04-01  7:48   ` Paul Cercueil
2014-04-01 18:14     ` Yann E. MORIN
2014-04-01 20:14       ` Paul Cercueil [this message]
2014-04-01 21:20         ` Yann E. MORIN
2014-03-31 22:00 ` [Buildroot] [PATCH 4/6] package/vlc: depends on the virtual package libgl Yann E. MORIN
2014-04-02  6:19   ` Arnout Vandecappelle
2014-04-02 16:26     ` Yann E. MORIN
2014-04-03  6:18       ` Arnout Vandecappelle
2014-04-03 17:01         ` Yann E. MORIN
2014-03-31 22:00 ` [Buildroot] [PATCH 5/6] package/x11-video-drivers: do not select, but depends on mesa3d Yann E. MORIN
2014-04-02 20:01   ` Bernd Kuhls
2014-04-03 17:03     ` Yann E. MORIN
2014-03-31 22:00 ` [Buildroot] [PATCH 6/6] package/xorg-server: do not force-select xf86driproto for mesa3d Yann E. MORIN
2014-04-01 19:11 ` [Buildroot] [PATCH 0/6] Add virtual package for full-openGL (branch yem/fixes) Eric Le Bihan
2014-04-01 23:00 ` Yann E. MORIN

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=533B1E13.9020200@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=buildroot@busybox.net \
    /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