<div dir="ltr"><div><div>Even if there is separate DISTRO_FEATURE for gles, we still have problem that the same distribution can support MACHINEs with different support for *gl*.<br><br></div>You still cannot build the same TUNE_PKGARCH qtbase package where once it&#39;s used for MACHINE where you have only mesa as *gl* provider and for different MACHINE which has binary blob for gles2. DISTRO_FEATUREs can contain only common denominator for features available in all supported MACHINEs. Splitting it to 2 separate features doesn&#39;t help with this.<br>
<br></div>And if we cannot build TUNE_PKGARCH qtbase we would need to make also qtwebkit MACHINE_ARCH and I really don&#39;t like it, because of webkit build time :/.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Oct 23, 2013 at 11:25 AM, Nicolas Dechesne <span dir="ltr">&lt;<a href="mailto:nicolas.dechesne@linaro.org" target="_blank">nicolas.dechesne@linaro.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Wed, Oct 23, 2013 at 11:00 AM, Burton, Ross &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt; wrote:<br>
&gt; On 23 October 2013 09:53, Nicolas Dechesne &lt;<a href="mailto:nicolas.dechesne@linaro.org">nicolas.dechesne@linaro.org</a>&gt; wrote:<br>
&gt;&gt; i am still not convinced that we should treat GL and GLES with a<br>
&gt;&gt; single &#39;DISTRO_FEATURE&#39; since they aren&#39;t &#39;equivalent&#39; features. I<br>
&gt;&gt; understand we need a mechanism to say if the platforms has &#39;graphics&#39;<br>
&gt;&gt; support, and for some recipes &#39;graphics&#39; is enough, but especially for<br>
&gt;&gt; libsdl this isn&#39;t enough since on GLES platforms we don&#39;t want<br>
&gt;&gt; --enable-video-opengl to be enabled since that is a GL feature, not<br>
&gt;&gt; GLES.<br>
&gt;<br>
&gt; I don&#39;t think anyone thinks that the current opengl feature is<br>
&gt; sufficient but there hasn&#39;t been a good enough alternative just yet.<br>
&gt; Are you proposing that the &quot;opengl&quot; distro feature is re-purposed as<br>
&gt; &quot;OpenGL&quot;, and we add &quot;opengles&quot; for &quot;OpenGLES&quot;.  Does this need to be<br>
&gt; GLES-version-specific, what about EGL, and what about machines which<br>
&gt; can support multiple drivers/GPU hardware?<br>
<br>
</div></div>well, that&#39;s more or less what I had said in that thread earlier. e.g.<br>
make opengl vs opengles 2 distinct &quot;DISTRO_FEATURE&quot;. at least what&#39;s<br>
sure now, is that currently it is broken, libsdl is the only instance<br>
we have noticed the problem, there could be more, not sure.<br>
<br>
i agree that we could easily extend the number of combos... but we<br>
could start &#39;small&#39; and add new &#39;feature&#39; whenever needed. the problem<br>
is probably even more subtle... right now opengl is a DISTRO_FEATURE<br>
to say globally if the &#39;distro/stack&#39; we build has some sort of<br>
graphics.. if we start getting into EGL, GLX, and GL/GLES versions<br>
then we start going into machine features.<br>
<br>
a quick grep (in the layers i use) reveals that the situation isn&#39;t<br>
really too good ;-)<br>
<br>
-- meta-openembedded/meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb:PACKAGECONFIG<br>
??= &quot;${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;opengl&#39;,<br>
&#39;openglesv2&#39;, d)}&quot;<br>
-- meta-openembedded/meta-multimedia/recipes-mediacentre/xbmc/<a href="http://xbmc_git.bb" target="_blank">xbmc_git.bb</a>:<br>
   ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;--enable-gl&#39;,<br>
&#39;--enable-gles&#39;, d)} \<br>
<br>
here, we use opengl distro feature to switch between GL and GLES<br>
<br>
-- meta-qt5/recipes-qt/qt5/qtbase.inc:PACKAGECONFIG_GL ?=<br>
&quot;${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;gl&#39;, &#39;&#39;, d)}&quot;<br>
<br>
here, opengl is used to enable GL , nothing about GLES. in our layer,<br>
we have added a .bbapend with this to get Qt to work:<br>
<br>
# By default, qtbase.inc PACKAGECONFIG_GL is either &quot;gl&quot; (if DISTRO_FEATURES<br>
# includes &quot;opengl&quot;) or empty (if it doesn&#39;t). Over-ride and force to &quot;gles2&quot;.<br>
PACKAGECONFIG_GL = &quot;gles2&quot;<br>
<br>
-- openembedded-core/meta/conf/machine/include/ia32-base.inc:<br>
<div class="im"> ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;,<br>
</div>&#39;xserver-xorg-extension-glx&#39;, &#39;&#39;, d)} \<br>
<br>
here, used to enable GLX<br>
<br>
-- openembedded-core/meta/recipes-graphics/libsdl/<a href="http://libsdl_1.2.15.bb" target="_blank">libsdl_1.2.15.bb</a>:<br>
<div class="im">       ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;virtual/libgl&#39;,<br>
&#39;&#39;, d)} \<br>
</div>-- openembedded-core/meta/recipes-graphics/libsdl/<a href="http://libsdl_1.2.15.bb" target="_blank">libsdl_1.2.15.bb</a>:<br>
<div class="im">            ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;,<br>
&#39;--enable-video-opengl&#39;, &#39;--disable-video-opengl&#39;, d)} \<br>
<br>
</div>here to enable GL features, incompatible with GLES.<br>
<br>
-- openembedded-core/meta/recipes-graphics/wayland/<a href="http://weston_1.1.0.bb" target="_blank">weston_1.1.0.bb</a>:<br>
<div class="im">               ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengles2&#39;,<br>
</div>&#39;gles&#39;, &#39;&#39;, d)} \<br>
<br>
here, we have an instance of opengles2, which we discussed already.<br>
that&#39;s the only place where we have that, and you agreed it was a bug.<br>
<br>
-- openembedded-core/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.21.13.bb:PACKAGECONFIG<br>
??= &quot;sna udev ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;dri&#39;, &#39;&#39;,<br>
d)}&quot;<br>
-- openembedded-core/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc:PACKAGECONFIG<br>
??= &quot;udev ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;dri dri2<br>
glx&#39;, &#39;&#39;, d)}&quot;<br>
<br>
to enable GLX/DRI<br>
<br>
-- openembedded-core/meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb:DEPENDS<br>
+= &quot; ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;, &#39;virtual/libgl&#39;,<br>
&#39;&#39;, d)}&quot;<br>
<br>
another instance, like libsdl which would break on GLES only platform.<br>
<br>
-- openembedded-core/meta/recipes-sato/webkit/<a href="http://webkit-gtk_1.8.3.bb" target="_blank">webkit-gtk_1.8.3.bb</a>:<br>
<div class="im">           ${@base_contains(&#39;DISTRO_FEATURES&#39;, &#39;opengl&#39;,<br>
</div>&#39;--enable-webgl&#39;, &#39;--disable-webgl&#39;, d)} \<br>
<br>
here to enable WebGL<br>
<br>
So i think given these examples, it&#39;s difficult to &#39;define&#39; what<br>
opengl DISTRO_FEATURE means. it is used for many different things, so<br>
maybe this isn&#39;t the &#39;right level of abstraction&#39;. what do you think?<br>
<br>
<br>
ps: sorry, i have the feeling that gmail is going to mess up very<br>
badly with the formatting of this email...<br>
</blockquote></div><br></div>