All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-ti][master][PATCH] graphics/weston: Update patch for weston 11
@ 2023-03-01 21:30 Ryan Eatmon
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan Eatmon @ 2023-03-01 21:30 UTC (permalink / raw)
  To: Praneeth Bajjuri, Denys Dmytriyenko, meta-ti

The patch needed to be updated due changes in the files being patched so
that it would build with weston 11.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 ...equire-GL_EXT_unpack_subimage-commit.patch | 39 ++++++++++---------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch b/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
index 8b03ddd6..13ab5e98 100644
--- a/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
+++ b/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
@@ -19,7 +19,7 @@ diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-g
 index 72101b47..7a6e2f48 100644
 --- a/libweston/renderer-gl/gl-renderer-internal.h
 +++ b/libweston/renderer-gl/gl-renderer-internal.h
-@@ -133,6 +133,8 @@ struct gl_renderer {
+@@ -148,6 +148,8 @@ struct gl_renderer {
 	PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
 	bool has_platform_base;
 
@@ -32,42 +32,42 @@ diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-rend
 index a5f5eae4..410ba85c 100644
 --- a/libweston/renderer-gl/gl-renderer.c
 +++ b/libweston/renderer-gl/gl-renderer.c
-@@ -1835,6 +1835,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+@@ -1793,6 +1793,7 @@ 			 struct weston_buffer *buffer)
  {
 	const struct weston_testsuite_quirks *quirks =
 		&surface->compositor->test_data.test_quirks;
 +	struct gl_renderer *gr = get_renderer(surface->compositor);
 	struct gl_surface_state *gs = get_surface_state(surface);
-	struct weston_buffer *buffer = gs->buffer_ref.buffer;
+	struct gl_buffer_state *gb = gs->buffer;
 	struct weston_view *view;
-@@ -1872,6 +1873,24 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+@@ -1835,6 +1836,24 @@ 			 struct weston_buffer *buffer)
 
 	glActiveTexture(GL_TEXTURE0);
 
 +	if (!gr->has_unpack_subimage) {
 +		wl_shm_buffer_begin_access(buffer->shm_buffer);
-+		for (j = 0; j < gs->num_textures; j++) {
-+			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++		for (j = 0; j < gs->buffer->num_textures; j++) {
++			glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
 +			glTexImage2D(GL_TEXTURE_2D, 0,
-+				     gs->gl_format[j],
-+				     gs->pitch / gs->hsub[j],
-+				     buffer->height / gs->vsub[j],
++				     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->gl_format[j]),
-+				     gs->gl_pixel_type,
-+				     data + gs->offset[j]);
++				     gl_format_from_internal(gs->buffer->gl_format[j]),
++				     gs->buffer->gl_pixel_type,
++				     data + gs->buffer->offset[j]);
 +		}
 +		wl_shm_buffer_end_access(buffer->shm_buffer);
 +
 +		goto done;
 +	}
 +
-	if (gs->needs_full_upload || quirks->gl_force_full_upload) {
+	if (gb->needs_full_upload || quirks->gl_force_full_upload) {
 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
-@@ -3932,11 +3951,9 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
+@@ -3896,11 +3915,9 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
 	else
-		ec->read_format = PIXMAN_a8b8g8r8;
+		ec->read_format = pixel_format_get_info_by_pixman(PIXMAN_a8b8g8r8);
 
 -	if (gr->gl_version < gr_gl_version(3, 0) &&
 -	    !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
@@ -80,11 +80,12 @@ index a5f5eae4..410ba85c 100644
 
 	if (gr->gl_version >= gr_gl_version(3, 0) ||
 	    weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
-@@ -3977,6 +3994,8 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
+@@ -3945,6 +3962,8 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
 		   gr_gl_version_minor(gr->gl_version));
 	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
-		ec->read_format == PIXMAN_a8r8g8b8 ? "BGRA" : "RGBA");
+			    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 "EGL Wayland extension: %s\n",
-			    gr->has_bind_display ? "yes" : "no");
+	weston_log_continue(STAMP_SPACE "wl_shm 10 bpc formats: %s\n",
+			    yesno(gr->has_texture_type_2_10_10_10_rev));
+	weston_log_continue(STAMP_SPACE "wl_shm 16 bpc formats: %s\n",
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-ti][master][PATCH] graphics/weston: Update patch for weston 11
       [not found] <174868EB6168E29B.6892@lists.yoctoproject.org>
@ 2023-03-01 21:31 ` Ryan Eatmon
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan Eatmon @ 2023-03-01 21:31 UTC (permalink / raw)
  To: Praneeth Bajjuri, Denys Dmytriyenko, meta-ti


Wrong repo and mailing list... long day.. Ignore this patch...


On 3/1/2023 3:30 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
> The patch needed to be updated due changes in the files being patched so
> that it would build with weston 11.
> 
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
>   ...equire-GL_EXT_unpack_subimage-commit.patch | 39 ++++++++++---------
>   1 file changed, 20 insertions(+), 19 deletions(-)
> 
> diff --git a/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch b/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
> index 8b03ddd6..13ab5e98 100644
> --- a/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
> +++ b/meta-arago-distro/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
> @@ -19,7 +19,7 @@ diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-g
>   index 72101b47..7a6e2f48 100644
>   --- a/libweston/renderer-gl/gl-renderer-internal.h
>   +++ b/libweston/renderer-gl/gl-renderer-internal.h
> -@@ -133,6 +133,8 @@ struct gl_renderer {
> +@@ -148,6 +148,8 @@ struct gl_renderer {
>   	PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
>   	bool has_platform_base;
>   
> @@ -32,42 +32,42 @@ diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-rend
>   index a5f5eae4..410ba85c 100644
>   --- a/libweston/renderer-gl/gl-renderer.c
>   +++ b/libweston/renderer-gl/gl-renderer.c
> -@@ -1835,6 +1835,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> +@@ -1793,6 +1793,7 @@ 			 struct weston_buffer *buffer)
>    {
>   	const struct weston_testsuite_quirks *quirks =
>   		&surface->compositor->test_data.test_quirks;
>   +	struct gl_renderer *gr = get_renderer(surface->compositor);
>   	struct gl_surface_state *gs = get_surface_state(surface);
> -	struct weston_buffer *buffer = gs->buffer_ref.buffer;
> +	struct gl_buffer_state *gb = gs->buffer;
>   	struct weston_view *view;
> -@@ -1872,6 +1873,24 @@ gl_renderer_flush_damage(struct weston_surface *surface)
> +@@ -1835,6 +1836,24 @@ 			 struct weston_buffer *buffer)
>   
>   	glActiveTexture(GL_TEXTURE0);
>   
>   +	if (!gr->has_unpack_subimage) {
>   +		wl_shm_buffer_begin_access(buffer->shm_buffer);
> -+		for (j = 0; j < gs->num_textures; j++) {
> -+			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
> ++		for (j = 0; j < gs->buffer->num_textures; j++) {
> ++			glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
>   +			glTexImage2D(GL_TEXTURE_2D, 0,
> -+				     gs->gl_format[j],
> -+				     gs->pitch / gs->hsub[j],
> -+				     buffer->height / gs->vsub[j],
> ++				     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->gl_format[j]),
> -+				     gs->gl_pixel_type,
> -+				     data + gs->offset[j]);
> ++				     gl_format_from_internal(gs->buffer->gl_format[j]),
> ++				     gs->buffer->gl_pixel_type,
> ++				     data + gs->buffer->offset[j]);
>   +		}
>   +		wl_shm_buffer_end_access(buffer->shm_buffer);
>   +
>   +		goto done;
>   +	}
>   +
> -	if (gs->needs_full_upload || quirks->gl_force_full_upload) {
> +	if (gb->needs_full_upload || quirks->gl_force_full_upload) {
>   		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
>   		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
> -@@ -3932,11 +3951,9 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
> +@@ -3896,11 +3915,9 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
>   	else
> -		ec->read_format = PIXMAN_a8b8g8r8;
> +		ec->read_format = pixel_format_get_info_by_pixman(PIXMAN_a8b8g8r8);
>   
>   -	if (gr->gl_version < gr_gl_version(3, 0) &&
>   -	    !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
> @@ -80,11 +80,12 @@ index a5f5eae4..410ba85c 100644
>   
>   	if (gr->gl_version >= gr_gl_version(3, 0) ||
>   	    weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
> -@@ -3977,6 +3994,8 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
> +@@ -3945,6 +3962,8 @@ gl_renderer_setup(struct weston_compositor *ec, EGLSurface egl_surface)
>   		   gr_gl_version_minor(gr->gl_version));
>   	weston_log_continue(STAMP_SPACE "read-back format: %s\n",
> -		ec->read_format == PIXMAN_a8r8g8b8 ? "BGRA" : "RGBA");
> +			    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 "EGL Wayland extension: %s\n",
> -			    gr->has_bind_display ? "yes" : "no");
> +	weston_log_continue(STAMP_SPACE "wl_shm 10 bpc formats: %s\n",
> +			    yesno(gr->has_texture_type_2_10_10_10_rev));
> +	weston_log_continue(STAMP_SPACE "wl_shm 16 bpc formats: %s\n",
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#15968): https://lists.yoctoproject.org/g/meta-ti/message/15968
> Mute This Topic: https://lists.yoctoproject.org/mt/97326059/6551054
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/leave/10828724/6551054/1815494134/xyzzy [reatmon@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-01 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 21:30 [meta-ti][master][PATCH] graphics/weston: Update patch for weston 11 Ryan Eatmon
     [not found] <174868EB6168E29B.6892@lists.yoctoproject.org>
2023-03-01 21:31 ` Ryan Eatmon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.