diff options
author | Valentin Jec <valentin.jec@nxp.com> | 2024-07-26 18:25:22 +0300 |
---|---|---|
committer | Valentin Jec <valentin.jec@nxp.com> | 2024-08-08 14:14:04 +0300 |
commit | 6204783c642c92e3d59d0cbea494df59d5958cd7 (patch) | |
tree | c194ef7388902f6297ce4d44351e3b33a71bfabf /recipes-graphics | |
parent | 46949846a64108f4fec63b33c4d64cfe7415009a (diff) | |
download | meta-freescale-6204783c642c92e3d59d0cbea494df59d5958cd7.tar.gz |
mesa-demos: Add patch for egl clear backgrounds black color
mesa: Add patches for video showing wrong frame and fix virgl driver assert issue
Signed-off-by: Valentin Jec <valentin.jec@nxp.com>
Diffstat (limited to 'recipes-graphics')
5 files changed, 115 insertions, 1 deletions
diff --git a/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch b/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch new file mode 100644 index 00000000..fa46823f --- /dev/null +++ b/recipes-graphics/mesa/mesa-demos/0001-egl-clear-backgrounds-black.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From cad7eb0f0487aea64c4460bd6ad95b5c9537d35a Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiyu Yang <jiyu.yang@nxp.com> | ||
3 | Date: Thu, 11 Apr 2024 16:30:50 +0800 | ||
4 | Subject: [PATCH] egl: clear backgrounds black | ||
5 | |||
6 | if 50% translucency used, the application render result can vary | ||
7 | depending on the format chosen, such as R10G10B10A2 or RGB24. | ||
8 | |||
9 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/demos/-/merge_requests/174] | ||
10 | Signed-off-by: Jiyu Yang <jiyu.yang@nxp.com> | ||
11 | --- | ||
12 | src/egl/opengles2/es2gears.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/egl/opengles2/es2gears.c b/src/egl/opengles2/es2gears.c | ||
16 | index db67f3a9..4e81afe7 100644 | ||
17 | --- a/src/egl/opengles2/es2gears.c | ||
18 | +++ b/src/egl/opengles2/es2gears.c | ||
19 | @@ -515,7 +515,7 @@ gears_draw(void) | ||
20 | GLfloat transform[16]; | ||
21 | identity(transform); | ||
22 | |||
23 | - glClearColor(0.0, 0.0, 0.0, 0.0); | ||
24 | + glClearColor(0.0, 0.0, 0.0, 1.0); | ||
25 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | ||
26 | |||
27 | /* Translate and rotate the view */ | ||
28 | -- | ||
29 | 2.34.1 | ||
30 | |||
diff --git a/recipes-graphics/mesa/mesa-demos_%.bbappend b/recipes-graphics/mesa/mesa-demos_%.bbappend index ff5d71ae..1c5dd3da 100644 --- a/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/recipes-graphics/mesa/mesa-demos_%.bbappend | |||
@@ -2,7 +2,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | |||
2 | 2 | ||
3 | SRC_URI:append:imxgpu = " \ | 3 | SRC_URI:append:imxgpu = " \ |
4 | file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ | 4 | file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ |
5 | file://fix-clear-build-break.patch" | 5 | file://fix-clear-build-break.patch \ |
6 | file://0001-egl-clear-backgrounds-black.patch" | ||
6 | 7 | ||
7 | REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" | 8 | REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" |
8 | 9 | ||
diff --git a/recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch b/recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch new file mode 100644 index 00000000..3dc8db09 --- /dev/null +++ b/recipes-graphics/mesa/mesa/0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 612c3dc98d5d050b9cfee16ec77ca3c8358caa0d Mon Sep 17 00:00:00 2001 | ||
2 | From: Wujian Sun <wujian.sun_1@nxp.com> | ||
3 | Date: Mon, 29 Apr 2024 17:29:16 +0800 | ||
4 | Subject: [PATCH] MGS-7599 cso: fix virgl driver assert issue | ||
5 | |||
6 | A workaround that remove PIPE_MAX_SAMPLERS and | ||
7 | PIPE_MAX_CONSTANT_BUFFERS assert. | ||
8 | |||
9 | Upstream-Status: Inappropriate [i.MX-specific] | ||
10 | |||
11 | Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com> | ||
12 | --- | ||
13 | src/gallium/auxiliary/cso_cache/cso_context.c | 2 -- | ||
14 | src/gallium/drivers/virgl/virgl_screen.c | 2 +- | ||
15 | 2 files changed, 1 insertion(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c | ||
18 | index 3e86def31c5..ffc6d22da9c 100644 | ||
19 | --- a/src/gallium/auxiliary/cso_cache/cso_context.c | ||
20 | +++ b/src/gallium/auxiliary/cso_cache/cso_context.c | ||
21 | @@ -403,10 +403,8 @@ cso_unbind_context(struct cso_context *ctx) | ||
22 | PIPE_SHADER_CAP_MAX_CONST_BUFFERS); | ||
23 | int maximg = scr->get_shader_param(scr, sh, | ||
24 | PIPE_SHADER_CAP_MAX_SHADER_IMAGES); | ||
25 | - assert(maxsam <= PIPE_MAX_SAMPLERS); | ||
26 | assert(maxview <= PIPE_MAX_SHADER_SAMPLER_VIEWS); | ||
27 | assert(maxssbo <= PIPE_MAX_SHADER_BUFFERS); | ||
28 | - assert(maxcb <= PIPE_MAX_CONSTANT_BUFFERS); | ||
29 | assert(maximg <= PIPE_MAX_SHADER_IMAGES); | ||
30 | if (maxsam > 0) { | ||
31 | ctx->base.pipe->bind_sampler_states(ctx->base.pipe, sh, 0, maxsam, zeros); | ||
32 | diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c | ||
33 | index 389a1935cc3..7c7f8ba576b 100644 | ||
34 | --- a/src/gallium/drivers/virgl/virgl_screen.c | ||
35 | +++ b/src/gallium/drivers/virgl/virgl_screen.c | ||
36 | @@ -435,7 +435,7 @@ virgl_get_shader_param(struct pipe_screen *screen, | ||
37 | return 1; | ||
38 | case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: | ||
39 | return MIN2(vscreen->caps.caps.v2.max_shader_sampler_views, | ||
40 | - PIPE_MAX_SHADER_SAMPLER_VIEWS); | ||
41 | + PIPE_MAX_SAMPLERS); | ||
42 | case PIPE_SHADER_CAP_INTEGERS: | ||
43 | return vscreen->caps.caps.v1.glsl_level >= 130; | ||
44 | case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: | ||
45 | -- | ||
46 | 2.17.1 | ||
47 | |||
diff --git a/recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch b/recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch new file mode 100644 index 00000000..0cdcbfca --- /dev/null +++ b/recipes-graphics/mesa/mesa/0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 188d7b01037e5a0249e63c2600cf15a288a9ff3f Mon Sep 17 00:00:00 2001 | ||
2 | From: Wujian Sun <wujian.sun_1@nxp.com> | ||
3 | Date: Fri, 19 Apr 2024 18:38:17 +0800 | ||
4 | Subject: [PATCH] MGS-7673 egl/dri2: fix video showing wrong frame | ||
5 | |||
6 | Softpipe driver doesn't support EGL_EXT_image_dma_buf_import_modifiers | ||
7 | extension. | ||
8 | Should not report the extension. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com> | ||
13 | --- | ||
14 | src/egl/drivers/dri2/egl_dri2.c | 3 ++- | ||
15 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c | ||
18 | index 992f0e3d46d..6ee209d4b47 100644 | ||
19 | --- a/src/egl/drivers/dri2/egl_dri2.c | ||
20 | +++ b/src/egl/drivers/dri2/egl_dri2.c | ||
21 | @@ -942,7 +942,8 @@ dri2_setup_screen(_EGLDisplay *disp) | ||
22 | |||
23 | #ifdef HAVE_LIBDRM | ||
24 | if (dri2_dpy->image->base.version >= 8 && | ||
25 | - dri2_dpy->image->createImageFromDmaBufs) { | ||
26 | + dri2_dpy->image->createImageFromDmaBufs && | ||
27 | + strcmp("softpipe", pscreen->get_name(pscreen))) { | ||
28 | disp->Extensions.EXT_image_dma_buf_import = EGL_TRUE; | ||
29 | disp->Extensions.EXT_image_dma_buf_import_modifiers = EGL_TRUE; | ||
30 | } | ||
31 | -- | ||
32 | 2.17.1 | ||
33 | |||
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index acddfbc6..f2375a55 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend | |||
@@ -1,6 +1,9 @@ | |||
1 | PROVIDES:remove:imxgpu = "virtual/egl" | 1 | PROVIDES:remove:imxgpu = "virtual/egl" |
2 | PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" | 2 | PROVIDES:remove:imxgpu3d = "virtual/libgl virtual/libgles1 virtual/libgles2" |
3 | 3 | ||
4 | SRC_URI:append:mx93-nxp-bsp = " file://0001-MGS-7673-egl-dri2-fix-video-showing-wrong-frame.patch" | ||
5 | SRC_URI:append:imx-nxp-bsp = " file://0001-MGS-7599-cso-fix-virgl-driver-assert-issue.patch" | ||
6 | |||
4 | PACKAGECONFIG:remove:imxgpu = "egl gbm" | 7 | PACKAGECONFIG:remove:imxgpu = "egl gbm" |
5 | PACKAGECONFIG:remove:imxgpu3d = "gles" | 8 | PACKAGECONFIG:remove:imxgpu3d = "gles" |
6 | 9 | ||