[2/2] mesa: make gallium swrast target optional

Submitted by Marco Felsch on April 30, 2019, 11:53 a.m. | Patch ID: 160793

Details

Message ID 20190430115323.25661-2-m.felsch@pengutronix.de
State New
Headers show

Commit Message

Marco Felsch April 30, 2019, 11:53 a.m.
Most the time we are compiling for embedded targets which have dedicated
hardware combinations. Setting swrast default on isn't a good solution
for such devices because if the hardware render node have an issue or
don't support a special format/request mesa will fallback to the software
renderer. This will make it harder to debug performace issues.

A better way is to let the user deciced if a software renderer is
needed e.g. if the system has no hardware renderer or to have such a
fallback device. This way the user knows that the software renderer is
enabled.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b3339dce33..55733585af 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -88,8 +88,10 @@  PACKAGECONFIG[egl] = "--enable-egl, --disable-egl"
 
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[kmsro] = ""
+PACKAGECONFIG[swrast] = ""
 
-GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'swrast', ',swrast', '', d)}"
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
 

Comments

Alexander Kanavin April 30, 2019, 1:56 p.m.
On Tue, 30 Apr 2019 at 14:10, Marco Felsch <m.felsch@pengutronix.de> wrote:
> -GALLIUMDRIVERS = "swrast"
> +GALLIUMDRIVERS = ""
> +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'swrast', ',swrast', '', d)}"
>  GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
>  GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"

This adds a leading , to the list of drivers; is that correctly handled?

Alex
Marco Felsch April 30, 2019, 2:22 p.m.
On 19-04-30 15:56, Alexander Kanavin wrote:
> On Tue, 30 Apr 2019 at 14:10, Marco Felsch <m.felsch@pengutronix.de> wrote:
> > -GALLIUMDRIVERS = "swrast"
> > +GALLIUMDRIVERS = ""
> > +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'swrast', ',swrast', '', d)}"
> >  GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
> >  GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
> 
> This adds a leading , to the list of drivers; is that correctly handled?

Sorry it seems that it was a copy'n'paste failure. This should be
fixed..

Regards,
  Marco

> 
> Alex
>