Skip to contentSkip to conversation

weston: Update to 15.0.0

PATCH In review Ryan Eatmon 5 participants 8 messages Mar 24 – May 4

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 weston: Update to 15.0.0

oe-core has bumped the version to 15.0.0 [1]. We need to adjust the bbappend version to % to better match future version changes.

Additionally, the patch needs to be updated to match the weston code changes.

[1] https://git.openembedded.org/openembedded-core/commit/?id=a1ed6fddd99171536e23d63a5d5b180019d672ad

---
 ...equire-GL_EXT_unpack_subimage-commit.patch | 109 ++++++++----------
 ...ston_14.0.%.bbappend => weston_%.bbappend} |   0
 2 files changed, 51 insertions(+), 58 deletions(-)
 rename meta-ti-bsp/recipes-graphics/wayland/{weston_14.0.%.bbappend => weston_%.bbappend} (100%)
meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch +51 -58
index fbe8f2bb..4b3b4a1f 100644
@@ -1,6 +1,6 @@
-From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <[email protected]>
-Date: Thu, 6 Jul 2023 01:48:41 +0000
+From 3cddacaa9ea3cfd75732ea9a84312fa68e0bfda7 Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <[email protected]>
+Date: Tue, 24 Mar 2026 10:52:59 -0500
 Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
 
 This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
@@ -13,83 +13,76 @@ Upstream-Status: Inappropriate [specific to TI SGX]
 
 Signed-off-by: Andrew Davis <[email protected]>
 Signed-off-by: Denys Dmytriyenko <[email protected]>
-
+Signed-off-by: Ryan Eatmon <[email protected]>
 ---
  libweston/renderer-gl/gl-renderer-internal.h |  2 ++
- libweston/renderer-gl/gl-renderer.c          | 29 ++++++++++++++++----
- 2 files changed, 26 insertions(+), 5 deletions(-)
+ libweston/renderer-gl/gl-renderer.c          | 26 ++++++++++++++++----
+ 2 files changed, 23 insertions(+), 5 deletions(-)
 
 diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
-index 5032035..85616c9 100644
+index 1afffbda..dbf7b1c3 100644
 --- a/libweston/renderer-gl/gl-renderer-internal.h
 +++ b/libweston/renderer-gl/gl-renderer-internal.h
-@@ -229,6 +229,8 @@ struct gl_renderer {
-	PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
-	bool has_platform_base;
-
-+	bool has_unpack_subimage;
+@@ -526,6 +526,8 @@ struct gl_renderer {
+ 	struct weston_log_scope *shader_scope;
+ 
+ 	struct dmabuf_allocator *allocator;
 +
-	PFNEGLBINDWAYLANDDISPLAYWL bind_display;
-	PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
-	PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
++    bool has_unpack_subimage;
+ };
+ 
+ static inline uint32_t
 diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
-index e694418b..2be6d621 100644
+index 45a2a148..8b238208 100644
 --- a/libweston/renderer-gl/gl-renderer.c
 +++ b/libweston/renderer-gl/gl-renderer.c
-@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-	struct weston_surface *surface = pnode->surface;
-	const struct weston_testsuite_quirks *quirks =
-		&surface->compositor->test_data.test_quirks;
-+	struct gl_renderer *gr = get_renderer(surface->compositor);
-	struct weston_buffer *buffer = surface->buffer_ref.buffer;
-	struct gl_surface_state *gs = get_surface_state(surface);
-	struct gl_buffer_state *gb = gs->buffer;
-@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-
-	data = wl_shm_buffer_get_data(buffer->shm_buffer);
-
+@@ -3021,6 +3021,22 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+ 
+ 	data = wl_shm_buffer_get_data(buffer->shm_buffer);
+ 
 +	if (!gr->has_unpack_subimage) {
 +		wl_shm_buffer_begin_access(buffer->shm_buffer);
-+		for (j = 0; j < gs->buffer->num_textures; j++) {
-+			glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
-+			glTexImage2D(GL_TEXTURE_2D, 0,
-+				     gs->buffer->gl_format[j],
-+				     gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
-+				     buffer->height / pixel_format_vsub(buffer->pixel_format, j),
-+				     0,
-+				     gl_format_from_internal(gs->buffer->gl_format[j]),
-+				     gs->buffer->gl_pixel_type,
-+				     data + gs->buffer->offset[j]);
++		for (j = 0; j < gb->num_textures; j++) {
++			glBindTexture(GL_TEXTURE_2D, gb->textures[j]);
++			gl_texture_2d_store(gr, 0, 0, 0,
++                        gb->pitch / pixel_format_hsub(buffer->pixel_format, j),
++				        buffer->height / pixel_format_vsub(buffer->pixel_format, j),
++					    gb->texture_format[j].external,
++					    gb->texture_format[j].type,
++					    data + gb->offset[j]);
 +		}
 +		wl_shm_buffer_end_access(buffer->shm_buffer);
 +
 +		goto done;
 +	}
 +
-	if (gb->needs_full_upload || quirks->gl_force_full_upload) {
-		wl_shm_buffer_begin_access(buffer->shm_buffer);
-
-@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
-	else
-		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
-
--	if (gr->gl_version < gr_gl_version(3, 0) &&
--	    !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
+ 	if (gb->needs_full_upload || quirks->force_full_upload) {
+ 		wl_shm_buffer_begin_access(buffer->shm_buffer);
+ 
+@@ -5171,11 +5187,9 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 	else
+ 		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
+ 
+-	if (gr->gl_version < gl_version(3, 0) &&
+-	    !gl_extensions_has(gr, EXTENSION_EXT_UNPACK_SUBIMAGE)) {
 -		weston_log("GL_EXT_unpack_subimage not available.\n");
 -		return -1;
 -	}
-+	if (gr->gl_version >= gr_gl_version(3, 0) ||
++	if (gr->gl_version >= gl_version(3, 0) ||
 +	    weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
 +		gr->has_unpack_subimage = true;
-
-	if (gr->gl_version >= gr_gl_version(3, 0) ||
-	    weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
-@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
-		   gr_gl_version_minor(gr->gl_version));
-	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
-			    ec->read_format->drm_format_name);
+ 
+ 	if (gl_extensions_has(gr, EXTENSION_OES_MAPBUFFER))
+ 		GET_PROC_ADDRESS(gr->unmap_buffer, "glUnmapBufferOES");
+@@ -5303,6 +5317,8 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 		   gl_version_minor(gr->gl_version));
+ 	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
+ 			    ec->read_format->drm_format_name);
 +	weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
 +			    gr->has_unpack_subimage ? "yes" : "no");
-	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
-			    yesno(gr->has_pack_reverse));
-	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
+ 			    yesno(gl_extensions_has(gr, EXTENSION_ANGLE_PACK_REVERSE_ROW_ORDER)));
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+-- 
+2.43.0
+
meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend renamed from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend +0 -0
similarity index 100%
rename from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
rename to meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend
Signature · 1 line
2.43.0
#1 lore raw

meta-ti / na / 20260324162004.3215160-1-reatmon

PRC Results: PASS

=========================================================
check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed

=========================================================
apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-ti][master][PATCH] weston: Update to 15.0.0
- Submitter: From: Ryan Eatmon <[email protected]>
-From: Denys Dmytriyenko <[email protected]>
+From: Ryan Eatmon <[email protected]>
- Date: Date: Tue, 24 Mar 2026 11:20:04 -0500
-Date: Thu, 6 Jul 2023 01:48:41 +0000
+Date: Tue, 24 Mar 2026 10:52:59 -0500
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: e5685196a6ed6b6fd5001069a13fc708f28a813c

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-next
- Commit Author: LCPD Automation Script <[email protected]>
- Commit Subject: CI/CD Auto-Merger: cicd.master.202603240400
- Commit SHA: eebc625a4404f1fa628174d558d296abe1cf382a

Patches
----------------------------------------
All patches applied

=========================================================
check-yocto-repo: PASS
=========================================================
master
=====================
PASS

=========================================================
yocto-check-layers: PASS
=========================================================
master - PASS
=====================
All checks passed

#2 lore raw
In reply to Ryan Eatmon
Quoted 5 lines · Ryan Eatmon via lists.yoctoproject.org

oe-core has bumped the version to 15.0.0 [1].

We need to adjust the bbappend version to % to better match future version changes.

You shouldn't be doing this rename.

Quoted 2 lines

Additionally, the patch needs to be updated to match the weston code changes.

The bbappend is version-specific on purpose exactly due to the fact that the patch won't apply against different versions - it has to be massaged every time there's a major version bump, we've done it many times before.

Quoted 161 lines

[1] https://git.openembedded.org/openembedded-core/commit/?id=a1ed6fddd99171536e23d63a5d5b180019d672ad

---
 ...equire-GL_EXT_unpack_subimage-commit.patch | 109 ++++++++----------
 ...ston_14.0.%.bbappend => weston_%.bbappend} |   0
 2 files changed, 51 insertions(+), 58 deletions(-)
 rename meta-ti-bsp/recipes-graphics/wayland/{weston_14.0.%.bbappend => weston_%.bbappend} (100%)
meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch +51 -58
index fbe8f2bb..4b3b4a1f 100644
@@ -1,6 +1,6 @@
-From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <[email protected]>
-Date: Thu, 6 Jul 2023 01:48:41 +0000
+From 3cddacaa9ea3cfd75732ea9a84312fa68e0bfda7 Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <[email protected]>
+Date: Tue, 24 Mar 2026 10:52:59 -0500
 Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
 
 This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
@@ -13,83 +13,76 @@ Upstream-Status: Inappropriate [specific to TI SGX]
 
 Signed-off-by: Andrew Davis <[email protected]>
 Signed-off-by: Denys Dmytriyenko <[email protected]>
-
+Signed-off-by: Ryan Eatmon <[email protected]>
 ---
  libweston/renderer-gl/gl-renderer-internal.h |  2 ++
- libweston/renderer-gl/gl-renderer.c          | 29 ++++++++++++++++----
- 2 files changed, 26 insertions(+), 5 deletions(-)
+ libweston/renderer-gl/gl-renderer.c          | 26 ++++++++++++++++----
+ 2 files changed, 23 insertions(+), 5 deletions(-)
 
 diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
-index 5032035..85616c9 100644
+index 1afffbda..dbf7b1c3 100644
 --- a/libweston/renderer-gl/gl-renderer-internal.h
 +++ b/libweston/renderer-gl/gl-renderer-internal.h
-@@ -229,6 +229,8 @@ struct gl_renderer {
-	PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
-	bool has_platform_base;
-
-+	bool has_unpack_subimage;
+@@ -526,6 +526,8 @@ struct gl_renderer {
+ 	struct weston_log_scope *shader_scope;
+ 
+ 	struct dmabuf_allocator *allocator;
 +
-	PFNEGLBINDWAYLANDDISPLAYWL bind_display;
-	PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
-	PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
++    bool has_unpack_subimage;
+ };
+ 
+ static inline uint32_t
 diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
-index e694418b..2be6d621 100644
+index 45a2a148..8b238208 100644
 --- a/libweston/renderer-gl/gl-renderer.c
 +++ b/libweston/renderer-gl/gl-renderer.c
-@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-	struct weston_surface *surface = pnode->surface;
-	const struct weston_testsuite_quirks *quirks =
-		&surface->compositor->test_data.test_quirks;
-+	struct gl_renderer *gr = get_renderer(surface->compositor);
-	struct weston_buffer *buffer = surface->buffer_ref.buffer;
-	struct gl_surface_state *gs = get_surface_state(surface);
-	struct gl_buffer_state *gb = gs->buffer;
-@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-
-	data = wl_shm_buffer_get_data(buffer->shm_buffer);
-
+@@ -3021,6 +3021,22 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+ 
+ 	data = wl_shm_buffer_get_data(buffer->shm_buffer);
+ 
 +	if (!gr->has_unpack_subimage) {
 +		wl_shm_buffer_begin_access(buffer->shm_buffer);
-+		for (j = 0; j < gs->buffer->num_textures; j++) {
-+			glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
-+			glTexImage2D(GL_TEXTURE_2D, 0,
-+				     gs->buffer->gl_format[j],
-+				     gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
-+				     buffer->height / pixel_format_vsub(buffer->pixel_format, j),
-+				     0,
-+				     gl_format_from_internal(gs->buffer->gl_format[j]),
-+				     gs->buffer->gl_pixel_type,
-+				     data + gs->buffer->offset[j]);
++		for (j = 0; j < gb->num_textures; j++) {
++			glBindTexture(GL_TEXTURE_2D, gb->textures[j]);
++			gl_texture_2d_store(gr, 0, 0, 0,
++                        gb->pitch / pixel_format_hsub(buffer->pixel_format, j),
++				        buffer->height / pixel_format_vsub(buffer->pixel_format, j),
++					    gb->texture_format[j].external,
++					    gb->texture_format[j].type,
++					    data + gb->offset[j]);
 +		}
 +		wl_shm_buffer_end_access(buffer->shm_buffer);
 +
 +		goto done;
 +	}
 +
-	if (gb->needs_full_upload || quirks->gl_force_full_upload) {
-		wl_shm_buffer_begin_access(buffer->shm_buffer);
-
-@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
-	else
-		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
-
--	if (gr->gl_version < gr_gl_version(3, 0) &&
--	    !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
+ 	if (gb->needs_full_upload || quirks->force_full_upload) {
+ 		wl_shm_buffer_begin_access(buffer->shm_buffer);
+ 
+@@ -5171,11 +5187,9 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 	else
+ 		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
+ 
+-	if (gr->gl_version < gl_version(3, 0) &&
+-	    !gl_extensions_has(gr, EXTENSION_EXT_UNPACK_SUBIMAGE)) {
 -		weston_log("GL_EXT_unpack_subimage not available.\n");
 -		return -1;
 -	}
-+	if (gr->gl_version >= gr_gl_version(3, 0) ||
++	if (gr->gl_version >= gl_version(3, 0) ||
 +	    weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
 +		gr->has_unpack_subimage = true;
-
-	if (gr->gl_version >= gr_gl_version(3, 0) ||
-	    weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
-@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
-		   gr_gl_version_minor(gr->gl_version));
-	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
-			    ec->read_format->drm_format_name);
+ 
+ 	if (gl_extensions_has(gr, EXTENSION_OES_MAPBUFFER))
+ 		GET_PROC_ADDRESS(gr->unmap_buffer, "glUnmapBufferOES");
+@@ -5303,6 +5317,8 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 		   gl_version_minor(gr->gl_version));
+ 	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
+ 			    ec->read_format->drm_format_name);
 +	weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
 +			    gr->has_unpack_subimage ? "yes" : "no");
-	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
-			    yesno(gr->has_pack_reverse));
-	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
+ 			    yesno(gl_extensions_has(gr, EXTENSION_ANGLE_PACK_REVERSE_ROW_ORDER)));
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+-- 
+2.43.0
+
meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend renamed from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend +0 -0
similarity index 100%
rename from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
rename to meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend
Signature · 1 line
2.43.0
#3 lore raw
Quoted 10 lines · Denys Dmytriyenko
Quoted 5 lines · Ryan Eatmon via lists.yoctoproject.org

oe-core has bumped the version to 15.0.0 [1].

We need to adjust the bbappend version to % to better match future version changes.

You shouldn't be doing this rename.

Quoted 6 lines
Quoted 2 lines

Additionally, the patch needs to be updated to match the weston code changes.

The bbappend is version-specific on purpose exactly due to the fact that the patch won't apply against different versions - it has to be massaged every time there's a major version bump, we've done it many times before.

But... if the patch won't apply then the build will fail. But it fails in a manner that is more obvious then just an upfront error about the bbappend not applying to a recipe.

Either way, with the new bbappend logic they put in, the build will not go through. So what does it really matter if the bbappend if version specific or not?

Quoted 162 lines
Quoted 162 lines

[1] https://git.openembedded.org/openembedded-core/commit/?id=a1ed6fddd99171536e23d63a5d5b180019d672ad

---
  ...equire-GL_EXT_unpack_subimage-commit.patch | 109 ++++++++----------
  ...ston_14.0.%.bbappend => weston_%.bbappend} |   0
  2 files changed, 51 insertions(+), 58 deletions(-)

rename meta-ti-bsp/recipes-graphics/wayland/{weston_14.0.%.bbappend => weston_%.bbappend} (100%)

meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch +51 -58
index fbe8f2bb..4b3b4a1f 100644
@@ -1,6 +1,6 @@
-From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <[email protected]>
-Date: Thu, 6 Jul 2023 01:48:41 +0000
+From 3cddacaa9ea3cfd75732ea9a84312fa68e0bfda7 Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <[email protected]>
+Date: Tue, 24 Mar 2026 10:52:59 -0500
  Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
 
  This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
@@ -13,83 +13,76 @@ Upstream-Status: Inappropriate [specific to TI SGX]
 
  Signed-off-by: Andrew Davis <[email protected]>
  Signed-off-by: Denys Dmytriyenko <[email protected]>
-
+Signed-off-by: Ryan Eatmon <[email protected]>
  ---
   libweston/renderer-gl/gl-renderer-internal.h |  2 ++
- libweston/renderer-gl/gl-renderer.c          | 29 ++++++++++++++++----
- 2 files changed, 26 insertions(+), 5 deletions(-)
+ libweston/renderer-gl/gl-renderer.c          | 26 ++++++++++++++++----
+ 2 files changed, 23 insertions(+), 5 deletions(-)
 
  diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
-index 5032035..85616c9 100644
+index 1afffbda..dbf7b1c3 100644
  --- a/libweston/renderer-gl/gl-renderer-internal.h
  +++ b/libweston/renderer-gl/gl-renderer-internal.h
-@@ -229,6 +229,8 @@ struct gl_renderer {
-	PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
-	bool has_platform_base;
-
-+	bool has_unpack_subimage;
+@@ -526,6 +526,8 @@ struct gl_renderer {
+ 	struct weston_log_scope *shader_scope;
+
+ 	struct dmabuf_allocator *allocator;
  +
-	PFNEGLBINDWAYLANDDISPLAYWL bind_display;
-	PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
-	PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
++    bool has_unpack_subimage;
+ };
+
+ static inline uint32_t
  diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
-index e694418b..2be6d621 100644
+index 45a2a148..8b238208 100644
  --- a/libweston/renderer-gl/gl-renderer.c
  +++ b/libweston/renderer-gl/gl-renderer.c
-@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-	struct weston_surface *surface = pnode->surface;
-	const struct weston_testsuite_quirks *quirks =
-		&surface->compositor->test_data.test_quirks;
-+	struct gl_renderer *gr = get_renderer(surface->compositor);
-	struct weston_buffer *buffer = surface->buffer_ref.buffer;
-	struct gl_surface_state *gs = get_surface_state(surface);
-	struct gl_buffer_state *gb = gs->buffer;
-@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-
-	data = wl_shm_buffer_get_data(buffer->shm_buffer);
-
+@@ -3021,6 +3021,22 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+
+ 	data = wl_shm_buffer_get_data(buffer->shm_buffer);
+
  +	if (!gr->has_unpack_subimage) {
  +		wl_shm_buffer_begin_access(buffer->shm_buffer);
-+		for (j = 0; j < gs->buffer->num_textures; j++) {
-+			glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
-+			glTexImage2D(GL_TEXTURE_2D, 0,
-+				     gs->buffer->gl_format[j],
-+				     gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
-+				     buffer->height / pixel_format_vsub(buffer->pixel_format, j),
-+				     0,
-+				     gl_format_from_internal(gs->buffer->gl_format[j]),
-+				     gs->buffer->gl_pixel_type,
-+				     data + gs->buffer->offset[j]);
++		for (j = 0; j < gb->num_textures; j++) {
++			glBindTexture(GL_TEXTURE_2D, gb->textures[j]);
++			gl_texture_2d_store(gr, 0, 0, 0,
++                        gb->pitch / pixel_format_hsub(buffer->pixel_format, j),
++				        buffer->height / pixel_format_vsub(buffer->pixel_format, j),
++					    gb->texture_format[j].external,
++					    gb->texture_format[j].type,
++					    data + gb->offset[j]);
  +		}
  +		wl_shm_buffer_end_access(buffer->shm_buffer);
  +
  +		goto done;
  +	}
  +
-	if (gb->needs_full_upload || quirks->gl_force_full_upload) {
-		wl_shm_buffer_begin_access(buffer->shm_buffer);
-
-@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
-	else
-		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
-
--	if (gr->gl_version < gr_gl_version(3, 0) &&
--	    !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
+ 	if (gb->needs_full_upload || quirks->force_full_upload) {
+ 		wl_shm_buffer_begin_access(buffer->shm_buffer);
+
+@@ -5171,11 +5187,9 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 	else
+ 		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
+
+-	if (gr->gl_version < gl_version(3, 0) &&
+-	    !gl_extensions_has(gr, EXTENSION_EXT_UNPACK_SUBIMAGE)) {
  -		weston_log("GL_EXT_unpack_subimage not available.\n");
  -		return -1;
  -	}
-+	if (gr->gl_version >= gr_gl_version(3, 0) ||
++	if (gr->gl_version >= gl_version(3, 0) ||
  +	    weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
  +		gr->has_unpack_subimage = true;
-
-	if (gr->gl_version >= gr_gl_version(3, 0) ||
-	    weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
-@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
-		   gr_gl_version_minor(gr->gl_version));
-	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
-			    ec->read_format->drm_format_name);
+
+ 	if (gl_extensions_has(gr, EXTENSION_OES_MAPBUFFER))
+ 		GET_PROC_ADDRESS(gr->unmap_buffer, "glUnmapBufferOES");
+@@ -5303,6 +5317,8 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 		   gl_version_minor(gr->gl_version));
+ 	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
+ 			    ec->read_format->drm_format_name);
  +	weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
  +			    gr->has_unpack_subimage ? "yes" : "no");
-	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
-			    yesno(gr->has_pack_reverse));
-	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
+ 			    yesno(gl_extensions_has(gr, EXTENSION_ANGLE_PACK_REVERSE_ROW_ORDER)));
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+--
+2.43.0
+
meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend renamed from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend +0 -0
similarity index 100%
rename from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
rename to meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend
Signature · 1 line
2.43.0
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#4 lore raw
Quoted 20 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 10 lines · Denys Dmytriyenko
Quoted 5 lines · Ryan Eatmon via lists.yoctoproject.org

oe-core has bumped the version to 15.0.0 [1].

We need to adjust the bbappend version to % to better match future version changes.

You shouldn't be doing this rename.

Quoted 6 lines
Quoted 2 lines

Additionally, the patch needs to be updated to match the weston code changes.

The bbappend is version-specific on purpose exactly due to the fact that the patch won't apply against different versions - it has to be massaged every time there's a major version bump, we've done it many times before.

Quoted 7 lines

But... if the patch won't apply then the build will fail. But it fails in a manner that is more obvious then just an upfront error about the bbappend not applying to a recipe.

Either way, with the new bbappend logic they put in, the build will not go through. So what does it really matter if the bbappend if version specific or not?

Yes, the build will fail in both cases now.

I guess from my perspective, getting a patch failing to apply all of a sudden is less clear indication that a major version update just happened upstream. Versus an error message saying no recipe is available for this versioned bbappend. Moreover, do_patch() error happens much further down the build process, vs. a dangling bbappend error comes very early during parsing...

On the other hand, with your way, if the patch happens to apply cleanly to the next major version, no intervention will be required.

So, pros and cons for both ways - I'll be fine with either...

Quoted 158 lines
Quoted 158 lines
Quoted 158 lines

[1] https://git.openembedded.org/openembedded-core/commit/?id=a1ed6fddd99171536e23d63a5d5b180019d672ad

---
 ...equire-GL_EXT_unpack_subimage-commit.patch | 109 ++++++++----------
 ...ston_14.0.%.bbappend => weston_%.bbappend} |   0
 2 files changed, 51 insertions(+), 58 deletions(-)
 rename meta-ti-bsp/recipes-graphics/wayland/{weston_14.0.%.bbappend => weston_%.bbappend} (100%)
meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch +51 -58
index fbe8f2bb..4b3b4a1f 100644
@@ -1,6 +1,6 @@
-From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <[email protected]>
-Date: Thu, 6 Jul 2023 01:48:41 +0000
+From 3cddacaa9ea3cfd75732ea9a84312fa68e0bfda7 Mon Sep 17 00:00:00 2001
+From: Ryan Eatmon <[email protected]>
+Date: Tue, 24 Mar 2026 10:52:59 -0500
 Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
 This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
@@ -13,83 +13,76 @@ Upstream-Status: Inappropriate [specific to TI SGX]
 Signed-off-by: Andrew Davis <[email protected]>
 Signed-off-by: Denys Dmytriyenko <[email protected]>
-
+Signed-off-by: Ryan Eatmon <[email protected]>
 ---
  libweston/renderer-gl/gl-renderer-internal.h |  2 ++
- libweston/renderer-gl/gl-renderer.c          | 29 ++++++++++++++++----
- 2 files changed, 26 insertions(+), 5 deletions(-)
+ libweston/renderer-gl/gl-renderer.c          | 26 ++++++++++++++++----
+ 2 files changed, 23 insertions(+), 5 deletions(-)
 diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
-index 5032035..85616c9 100644
+index 1afffbda..dbf7b1c3 100644
 --- a/libweston/renderer-gl/gl-renderer-internal.h
 +++ b/libweston/renderer-gl/gl-renderer-internal.h
-@@ -229,6 +229,8 @@ struct gl_renderer {
-	PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
-	bool has_platform_base;
-
-+	bool has_unpack_subimage;
+@@ -526,6 +526,8 @@ struct gl_renderer {
+ 	struct weston_log_scope *shader_scope;
+
+ 	struct dmabuf_allocator *allocator;
 +
-	PFNEGLBINDWAYLANDDISPLAYWL bind_display;
-	PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
-	PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
++    bool has_unpack_subimage;
+ };
+
+ static inline uint32_t
 diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
-index e694418b..2be6d621 100644
+index 45a2a148..8b238208 100644
 --- a/libweston/renderer-gl/gl-renderer.c
 +++ b/libweston/renderer-gl/gl-renderer.c
-@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-	struct weston_surface *surface = pnode->surface;
-	const struct weston_testsuite_quirks *quirks =
-		&surface->compositor->test_data.test_quirks;
-+	struct gl_renderer *gr = get_renderer(surface->compositor);
-	struct weston_buffer *buffer = surface->buffer_ref.buffer;
-	struct gl_surface_state *gs = get_surface_state(surface);
-	struct gl_buffer_state *gb = gs->buffer;
-@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
-
-	data = wl_shm_buffer_get_data(buffer->shm_buffer);
-
+@@ -3021,6 +3021,22 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+
+ 	data = wl_shm_buffer_get_data(buffer->shm_buffer);
+
 +	if (!gr->has_unpack_subimage) {
 +		wl_shm_buffer_begin_access(buffer->shm_buffer);
-+		for (j = 0; j < gs->buffer->num_textures; j++) {
-+			glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
-+			glTexImage2D(GL_TEXTURE_2D, 0,
-+				     gs->buffer->gl_format[j],
-+				     gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
-+				     buffer->height / pixel_format_vsub(buffer->pixel_format, j),
-+				     0,
-+				     gl_format_from_internal(gs->buffer->gl_format[j]),
-+				     gs->buffer->gl_pixel_type,
-+				     data + gs->buffer->offset[j]);
++		for (j = 0; j < gb->num_textures; j++) {
++			glBindTexture(GL_TEXTURE_2D, gb->textures[j]);
++			gl_texture_2d_store(gr, 0, 0, 0,
++                        gb->pitch / pixel_format_hsub(buffer->pixel_format, j),
++				        buffer->height / pixel_format_vsub(buffer->pixel_format, j),
++					    gb->texture_format[j].external,
++					    gb->texture_format[j].type,
++					    data + gb->offset[j]);
 +		}
 +		wl_shm_buffer_end_access(buffer->shm_buffer);
 +
 +		goto done;
 +	}
 +
-	if (gb->needs_full_upload || quirks->gl_force_full_upload) {
-		wl_shm_buffer_begin_access(buffer->shm_buffer);
-
-@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
-	else
-		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
-
--	if (gr->gl_version < gr_gl_version(3, 0) &&
--	    !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
+ 	if (gb->needs_full_upload || quirks->force_full_upload) {
+ 		wl_shm_buffer_begin_access(buffer->shm_buffer);
+
+@@ -5171,11 +5187,9 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 	else
+ 		ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
+
+-	if (gr->gl_version < gl_version(3, 0) &&
+-	    !gl_extensions_has(gr, EXTENSION_EXT_UNPACK_SUBIMAGE)) {
 -		weston_log("GL_EXT_unpack_subimage not available.\n");
 -		return -1;
 -	}
-+	if (gr->gl_version >= gr_gl_version(3, 0) ||
++	if (gr->gl_version >= gl_version(3, 0) ||
 +	    weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
 +		gr->has_unpack_subimage = true;
-
-	if (gr->gl_version >= gr_gl_version(3, 0) ||
-	    weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
-@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
-		   gr_gl_version_minor(gr->gl_version));
-	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
-			    ec->read_format->drm_format_name);
+
+ 	if (gl_extensions_has(gr, EXTENSION_OES_MAPBUFFER))
+ 		GET_PROC_ADDRESS(gr->unmap_buffer, "glUnmapBufferOES");
+@@ -5303,6 +5317,8 @@ gl_renderer_setup(struct weston_compositor *ec)
+ 		   gl_version_minor(gr->gl_version));
+ 	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
+ 			    ec->read_format->drm_format_name);
 +	weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
 +			    gr->has_unpack_subimage ? "yes" : "no");
-	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
-			    yesno(gr->has_pack_reverse));
-	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
+ 			    yesno(gl_extensions_has(gr, EXTENSION_ANGLE_PACK_REVERSE_ROW_ORDER)));
+ 	weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
+--
+2.43.0
+
meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend renamed from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend +0 -0
similarity index 100%
rename from meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
rename to meta-ti-bsp/recipes-graphics/wayland/weston_%.bbappend
Signature · 1 line
2.43.0
#5 lore raw
Quoted 37 lines · Denys Dmytriyenko
Quoted 20 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 10 lines · Denys Dmytriyenko
Quoted 5 lines · Ryan Eatmon via lists.yoctoproject.org

oe-core has bumped the version to 15.0.0 [1].

We need to adjust the bbappend version to % to better match future version changes.

You shouldn't be doing this rename.

Quoted 6 lines
Quoted 2 lines

Additionally, the patch needs to be updated to match the weston code changes.

The bbappend is version-specific on purpose exactly due to the fact that the patch won't apply against different versions - it has to be massaged every time there's a major version bump, we've done it many times before.

Quoted 7 lines

But... if the patch won't apply then the build will fail. But it fails in a manner that is more obvious then just an upfront error about the bbappend not applying to a recipe.

Either way, with the new bbappend logic they put in, the build will not go through. So what does it really matter if the bbappend if version specific or not?

Yes, the build will fail in both cases now.

I guess from my perspective, getting a patch failing to apply all of a sudden is less clear indication that a major version update just happened upstream. Versus an error message saying no recipe is available for this versioned bbappend. Moreover, do_patch() error happens much further down the build process, vs. a dangling bbappend error comes very early during parsing...

Quoted 5 lines

On the other hand, with your way, if the patch happens to apply cleanly to the next major version, no intervention will be required.

So, pros and cons for both ways - I'll be fine with either...

Hi Ryan,
Hi Denys,

We have our own weston_9.0.0.bb recipe in a layer that is used alongside meta-ti. Because of this rename, the bbappend from meta-ti started to apply onto this recipe as well, and of course the patch is not compatible with that version of weston.

Probably we should not be keeping such an old version around, but while I initially also thought that it is just a choice of which error, this situation shows that there is a real reason to keep the bbappend version specific. It's not just about getting an error during parsing vs during patching (which personally I do prefer) but also about not applying to the wrong version where the patch might be irrelevant. Please let me know if I misunderstood the situation here.

Thanks and kind regards,
Ernest

#6 lore raw
Quoted 52 lines · Ernest Van Hoecke
Quoted 37 lines · Denys Dmytriyenko
Quoted 20 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 10 lines · Denys Dmytriyenko
Quoted 5 lines · Ryan Eatmon via lists.yoctoproject.org

oe-core has bumped the version to 15.0.0 [1].

We need to adjust the bbappend version to % to better match future version changes.

You shouldn't be doing this rename.

Quoted 6 lines
Quoted 2 lines

Additionally, the patch needs to be updated to match the weston code changes.

The bbappend is version-specific on purpose exactly due to the fact that the patch won't apply against different versions - it has to be massaged every time there's a major version bump, we've done it many times before.

Quoted 7 lines

But... if the patch won't apply then the build will fail. But it fails in a manner that is more obvious then just an upfront error about the bbappend not applying to a recipe.

Either way, with the new bbappend logic they put in, the build will not go through. So what does it really matter if the bbappend if version specific or not?

Yes, the build will fail in both cases now.

I guess from my perspective, getting a patch failing to apply all of a sudden is less clear indication that a major version update just happened upstream. Versus an error message saying no recipe is available for this versioned bbappend. Moreover, do_patch() error happens much further down the build process, vs. a dangling bbappend error comes very early during parsing...

Quoted 5 lines

On the other hand, with your way, if the patch happens to apply cleanly to the next major version, no intervention will be required.

So, pros and cons for both ways - I'll be fine with either...

Hi Ryan,
Hi Denys,

We have our own weston_9.0.0.bb recipe in a layer that is used alongside meta-ti. Because of this rename, the bbappend from meta-ti started to apply onto this recipe as well, and of course the patch is not compatible with that version of weston.

Quoted 7 lines

Probably we should not be keeping such an old version around, but while I initially also thought that it is just a choice of which error, this situation shows that there is a real reason to keep the bbappend version specific. It's not just about getting an error during parsing vs during patching (which personally I do prefer) but also about not applying to the wrong version where the patch might be irrelevant. Please let me know if I misunderstood the situation here.

You are spot on. And this is a good reason to keep the bbappend version specific. I'll send a patch to fix this.

Quoted 3 lines

Thanks and kind regards,
Ernest

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#7 lore raw
Quoted 17 lines · Ryan Eatmon
Quoted 9 lines

Hi Ryan,
Hi Denys,

We have our own weston_9.0.0.bb recipe in a layer that is used alongside meta-ti. Because of this rename, the bbappend from meta-ti started to apply onto this recipe as well, and of course the patch is not compatible with that version of weston.

Quoted 7 lines

Probably we should not be keeping such an old version around, but while I initially also thought that it is just a choice of which error, this situation shows that there is a real reason to keep the bbappend version specific. It's not just about getting an error during parsing vs during patching (which personally I do prefer) but also about not applying to the wrong version where the patch might be irrelevant. Please let me know if I misunderstood the situation here.

Quoted 2 lines

You are spot on. And this is a good reason to keep the bbappend version specific. I'll send a patch to fix this.

Hi Ryan,

Only a gentle ping on this. Otherwise, we could also send a patch for this.

Thanks

Franz