<div dir="ltr">Looks like nice cleanup, but is someone still using llvm 3.2 or older?<div><br></div><div>With PACKAGECONFIG for almost each gallium driver it might be easier to get rid of GALLIUMDRIVERS_LLVM33, GALLIUMDRIVERS_LLVM33_ENABLED, GALLIUMDRIVERS_LLVM variables and use just GALLIUMDRIVERS.</div><div><br></div><div>In worst case scenario people using llvm 3.2 or older will need to redefine some of these PACKAGECONFIGs but that shouldn&#39;t be big issue considering that they probably have different mesa recipe already.</div><div><br></div><div>People can then select right list of drivers with or without using gallium-llvm as well.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 13, 2019 at 7:54 PM Marco Felsch &lt;<a href="mailto:m.felsch@pengutronix.de">m.felsch@pengutronix.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Most of the time we are compiling for embedded targets which have<br>
dedicated hardware combinations. Enabling swrast by default isn&#39;t a good<br>
solution for such devices because if the hardware render node has an<br>
issue or doesn&#39;t support a special format/request Mesa will fallback to<br>
the software renderer. This will make it harder to debug performance<br>
issues.<br>
<br>
A better way is to let the user decide if a software renderer is<br>
needed e.g. if the system has no hardware renderer or to have such a<br>
fallback device. This way the user knows that the software renderer is<br>
enabled.<br>
<br>
Signed-off-by: Marco Felsch &lt;<a href="mailto:m.felsch@pengutronix.de" target="_blank">m.felsch@pengutronix.de</a>&gt;<br>
---<br>
v3<br>
- rebased on current master-next branch<br>
<br>
 meta/recipes-graphics/mesa/mesa.inc | 22 +++++++++++++---------<br>
 1 file changed, 13 insertions(+), 9 deletions(-)<br>
<br>
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc<br>
index 3ecfb8506c..a6d36cf21c 100644<br>
--- a/meta/recipes-graphics/mesa/mesa.inc<br>
+++ b/meta/recipes-graphics/mesa/mesa.inc<br>
@@ -90,23 +90,27 @@ PACKAGECONFIG[egl] = &quot;-Degl=true, -Degl=false&quot;<br>
<br>
 PACKAGECONFIG[etnaviv] = &quot;&quot;<br>
 PACKAGECONFIG[kmsro] = &quot;&quot;<br>
+PACKAGECONFIG[swrast] = &quot;&quot;<br>
<br>
-GALLIUMDRIVERS = &quot;swrast&quot;<br>
-GALLIUMDRIVERS_append =&quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;etnaviv&#39;, &#39;,etnaviv&#39;, &#39;&#39;, d)}&quot;<br>
-GALLIUMDRIVERS_append =&quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;kmsro&#39;, &#39;,kmsro&#39;, &#39;&#39;, d)}&quot;<br>
+GALLIUMDRIVERS = &quot;&quot;<br>
+GALLIUMDRIVERS +=&quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;swrast&#39;, &#39;swrast&#39;, &#39;&#39;, d)}&quot;<br>
+GALLIUMDRIVERS +=&quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;etnaviv&#39;, &#39;etnaviv&#39;, &#39;&#39;, d)}&quot;<br>
+GALLIUMDRIVERS +=&quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;kmsro&#39;, &#39;kmsro&#39;, &#39;&#39;, d)}&quot;<br>
<br>
 # radeonsi requires LLVM<br>
-GALLIUMDRIVERS_LLVM33 = &quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;r600&#39;, &#39;,radeonsi&#39;, &#39;&#39;, d)}&quot;<br>
+GALLIUMDRIVERS_LLVM33 = &quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;r600&#39;, &#39;radeonsi&#39;, &#39;&#39;, d)}&quot;<br>
 GALLIUMDRIVERS_LLVM33_ENABLED = &quot;${@oe.utils.version_less_or_equal(&#39;MESA_LLVM_RELEASE&#39;, &#39;3.2&#39;, False, len(&#39;${GALLIUMDRIVERS_LLVM33}&#39;) &gt; 0, d)}&quot;<br>
-GALLIUMDRIVERS_LLVM = &quot;r300,svga,nouveau${@&#39;,${GALLIUMDRIVERS_LLVM33}&#39; if ${GALLIUMDRIVERS_LLVM33_ENABLED} else &#39;&#39;}&quot;<br>
+GALLIUMDRIVERS_LLVM = &quot;r300 svga nouveau ${@&#39;${GALLIUMDRIVERS_LLVM33}&#39; if ${GALLIUMDRIVERS_LLVM33_ENABLED} else &#39;&#39;}&quot;<br>
<br>
 PACKAGECONFIG[r600] = &quot;&quot;<br>
<br>
-GALLIUMDRIVERS_append = &quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;gallium-llvm&#39;, &#39;,${GALLIUMDRIVERS_LLVM}&#39;, &#39;&#39;, d)}&quot;<br>
-GALLIUMDRIVERS_append = &quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;r600&#39;, &#39;,r600&#39;, &#39;&#39;, d)}&quot;<br>
-GALLIUMDRIVERS_append = &quot;,virgl&quot;<br>
+GALLIUMDRIVERS += &quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;gallium-llvm&#39;, &#39;${GALLIUMDRIVERS_LLVM}&#39;, &#39;&#39;, d)}&quot;<br>
+GALLIUMDRIVERS += &quot;${@bb.utils.contains(&#39;PACKAGECONFIG&#39;, &#39;r600&#39;, &#39;r600&#39;, &#39;&#39;, d)}&quot;<br>
+GALLIUMDRIVERS += &quot;virgl&quot;<br>
+GALLIUMDRIVERS_MESON = &quot;${@&quot;,&quot;.join(&quot;${GALLIUMDRIVERS}&quot;.split())}&quot;<br>
+<br>
+PACKAGECONFIG[gallium] = &quot;-Dgallium-drivers=${GALLIUMDRIVERS_MESON}, -Dgallium-drivers=&#39;&#39;&quot;<br>
<br>
-PACKAGECONFIG[gallium] = &quot;-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=&#39;&#39;&quot;<br>
 MESA_LLVM_RELEASE ?= &quot;8.0.0&quot;<br>
 PACKAGECONFIG[gallium-llvm] = &quot;-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \<br>
                                ${@&#39;elfutils&#39; if ${GALLIUMDRIVERS_LLVM33_ENABLED} else &#39;&#39;}&quot;<br>
-- <br>
2.20.1<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>