Skip to contentSkip to conversation

virglrenderer: requires distro feature opengl

PATCH In review [email protected] 5 participants 5 messages Mar 12, 2019 – Mar 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virglrenderer: requires distro feature opengl

From: Kai Kang <[email protected]>

virglrenderer depends on 2 packages:
* mesa: requires one of distro features opengl or vulkan
* libepoxy: requires distro feature opengl

So make virglrenderer requires distro feature opengl. Otherwise it fails to build world if 'opengl' doesn't exist in DISTRO_FEATURES.

---
 meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb +4 -1
index 500ed4f2d8..225a0b8b0c 100644
@@ -13,7 +13,10 @@ SRC_URI = "git://anongit.freedesktop.org/virglrenderer \
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
 
 BBCLASSEXTEND = "native nativesdk"
 
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""
Signature · 1 line
2.20.0
#1 lore raw

meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ · line 22

Quoted 3 lines · On Tue, 12 Mar 2019 at 01:23, <[email protected]> wrote:
meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb +3 -0
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""

I suspect you can drop the native/nativesdk overrides here, as DISTRO_FEATURES is overridden in those builds.

Ross

#2 lore raw
Quoted 7 lines · Ross

meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ · line 22

Quoted 3 lines · On Tue, 12 Mar 2019 at 01:23, <[email protected]> wrote:
meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb +3 -0
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""

I suspect you can drop the native/nativesdk overrides here, as DISTRO_FEATURES is overridden in those builds.

If so then some potential clean-up opportunities elsewhere:

meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb:REQUIRED_DISTRO_FEATURES_class-native
= ""
meta/recipes-graphics/libepoxy/libepoxy_1.5.3.bb:REQUIRED_DISTRO_FEATURES_class-nativesdk
= ""
meta/recipes-graphics/xorg-lib/libxcb_1.13.1.bb:REQUIRED_DISTRO_FEATURES_class-native
= ""
meta/recipes-graphics/xorg-lib/xorg-lib-common.inc:REQUIRED_DISTRO_FEATURES_class-native
= ""

#3 lore raw
In reply to Burton, Ross
Quoted 7 lines · Ross

meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ · line 22

Quoted 3 lines · On Tue, 12 Mar 2019 at 01:23, <[email protected]> wrote:
meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb +3 -0
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""

I suspect you can drop the native/nativesdk overrides here, as DISTRO_FEATURES is overridden in those builds.

I suspect it is needed since we clear DISTRO_FEATURES to a small subset for native/nativesdk and hence opengl won't be present. If its not present, virglrenderer-native will then not build.

We may need to rethink how we're using the native distro features. Maybe when you add virglrender-native, you need to add opengl to the native distro features? We could change qemu config based upon that?

It would be good to confirm my above guess is correct...

Cheers,

Richard

#4 lore raw
Quoted 12 lines · Richard Purdie
Quoted 7 lines · On Tue, 12 Mar 2019 at 01:23, <[email protected]> wrote:

meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb SRC_URI = "git://anongit.freedesktop.org/virglrenderer \ · line 22

Quoted 3 lines
meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb +3 -0
+REQUIRED_DISTRO_FEATURES = "opengl"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+REQUIRED_DISTRO_FEATURES_class-nativesdk = ""

I suspect you can drop the native/nativesdk overrides here, as DISTRO_FEATURES is overridden in those builds.

I suspect it is needed since we clear DISTRO_FEATURES to a small subset for native/nativesdk and hence opengl won't be present. If its not present, virglrenderer-native will then not build.

Quoted 5 lines

We may need to rethink how we're using the native distro features. Maybe when you add virglrender-native, you need to add opengl to the native distro features? We could change qemu config based upon that?

It would be good to confirm my above guess is correct...

I have reworked the patchset that enables virgl in qemu to make that conditional to opengl in DISTRO_FEATURES, which also allowed the suggested cleanups. Will post that in a moment.

Alex