added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,72 @@
From 32ece9f1a0240f5aff47d791ab71dabb37e0c781 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Date: Thu, 30 Mar 2023 17:13:02 +0200
Subject: [PATCH] WESTON-CUBE: adapt to weston 11
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
---
src/cube-common.c | 11 ++++++-----
src/simple-st-egl-tex.c | 11 ++++++-----
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/cube-common.c b/src/cube-common.c
index cd38944..3c96e41 100644
--- a/src/cube-common.c
+++ b/src/cube-common.c
@@ -125,6 +125,12 @@ init_egl(struct display *d, struct window *w)
exit(EXIT_FAILURE);
}
+ d->egl.ctx = eglCreateContext(d->egl.dpy,
+ d->egl.conf,
+ EGL_NO_CONTEXT,
+ context_attribs);
+ assert(d->egl.ctx);
+
egl_extensions = eglQueryString(d->egl.dpy, EGL_EXTENSIONS);
assert(egl_extensions != NULL);
@@ -158,11 +164,6 @@ init_egl(struct display *d, struct window *w)
d->egl.name = (void *)eglGetProcAddress(#name); \
} while (0)
- d->egl.ctx = eglCreateContext(d->egl.dpy,
- d->egl.conf,
- EGL_NO_CONTEXT,
- context_attribs);
- assert(d->egl.ctx);
eglMakeCurrent(d->egl.dpy, EGL_NO_SURFACE, EGL_NO_SURFACE,
d->egl.ctx);
diff --git a/src/simple-st-egl-tex.c b/src/simple-st-egl-tex.c
index 804d24f..138d5df 100644
--- a/src/simple-st-egl-tex.c
+++ b/src/simple-st-egl-tex.c
@@ -163,6 +163,12 @@ create_surface(struct window *window)
window->surface = wl_compositor_create_surface(display->compositor);
+ if (display->shell) {
+ create_xdg_surface(window, display);
+ } else {
+ assert(0);
+ }
+
window->native =
wl_egl_window_create(window->surface,
window->geometry.width,
@@ -172,11 +178,6 @@ create_surface(struct window *window)
display->egl.conf,
window->native, NULL);
- if (display->shell) {
- create_xdg_surface(window, display);
- } else {
- assert(0);
- }
ret = eglMakeCurrent(window->display->egl.dpy, window->egl_surface,
window->egl_surface, window->display->egl.ctx);
--
2.25.1

View File

@@ -0,0 +1,32 @@
SUMMARY = "3D cube for wayland/weston windows"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=23e79a8a8bc2486f30a780e6f8de22c4"
SRC_URI = "git://github.com/STMicroelectronics/st-openstlinux-application.git;protocol=https;branch=main"
# Modify these as desired
PV = "5.0+git${SRCPV}"
SRCREV = "7c46618178db254520e017a5686a46b1beb413d0"
DEPENDS += "wayland wayland-native wayland-protocols libdrm pixman libpng libjpeg-turbo \
virtual/egl virtual/libgles2 gstreamer1.0 gstreamer1.0-plugins-base"
# Needed to update dynamic library name in elf file
DEPENDS += "patchelf-native"
inherit meson pkgconfig
S = "${WORKDIR}/git/weston-cube"
do_install () {
install -d ${D}${prefix}/local/demo/bin
install -m 0755 ${B}/weston-st-egl-cube-tex ${D}${prefix}/local/demo/bin/
# Fix wrong library name in bin file
if [ ${PREFERRED_PROVIDER_virtual/egl} = "mesa" ]; then
patchelf --replace-needed libEGL.so libEGL.so.1 ${D}${prefix}/local/demo/bin/weston-st-egl-cube-tex
fi
if [ ${PREFERRED_PROVIDER_virtual/libgles2} = "mesa" ]; then
patchelf --replace-needed libGLESv2.so libGLESv2.so.2 ${D}${prefix}/local/demo/bin/weston-st-egl-cube-tex
fi
}
FILES:${PN} += "${prefix}/local/demo/bin"