From: Randolph Sapp <[email protected]>

Cairo can either be built for use with OpenGL or OpenGLES. By default it
assumes it can use OpenGL if X11 is provided as a distro feature. This
assumption is not true when using the proprietary SGX / Rogue drivers.

Vulkan libraries need some X libs at runtime now, so we need to manually
override the PACKAGECONFIG for cairo to use OpenGLES.

Signed-off-by: Randolph Sapp <[email protected]>
---
 meta-ti-bsp/recipes-graphics/cairo/cairo_%.bbappend | 1 +
 meta-ti-bsp/recipes-graphics/cairo/pvr-cairo.inc    | 5 +++++
 2 files changed, 6 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-graphics/cairo/cairo_%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/cairo/pvr-cairo.inc

diff --git a/meta-ti-bsp/recipes-graphics/cairo/cairo_%.bbappend 
b/meta-ti-bsp/recipes-graphics/cairo/cairo_%.bbappend
new file mode 100644
index 00000000..459d8d09
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/cairo/cairo_%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 
'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-cairo.inc', '', d)}
diff --git a/meta-ti-bsp/recipes-graphics/cairo/pvr-cairo.inc 
b/meta-ti-bsp/recipes-graphics/cairo/pvr-cairo.inc
new file mode 100644
index 00000000..b41f1a01
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/cairo/pvr-cairo.inc
@@ -0,0 +1,5 @@
+# This is required since cairo expects the opengl distro feature to refer to
+# the desktop version of OpenGL. Imagination drivers only provide OpenGLES.
+
+PACKAGECONFIG:remove = "opengl"
+PACKAGECONFIG:append = " glesv2"
-- 
2.40.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16449): 
https://lists.yoctoproject.org/g/meta-ti/message/16449
Mute This Topic: https://lists.yoctoproject.org/mt/98546292/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to