deleted file mode 100644
@@ -1,33 +0,0 @@
-From 0c97d5eacae4f584313c9251e585bb0246cceffc Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex@linutronix.de>
-Date: Fri, 22 Nov 2024 22:52:31 +0100
-Subject: [PATCH] tests/egl/spec: make egl_ext_surface_compression conditional
- to X11
-
-Otherwise, this error occurs:
-| In file included from /srv/storage/alex/yocto/build-64/workspace/sources/piglit/tests/egl/spec/egl_ext_surface_compression/create_surface.c:28:
-| /srv/storage/alex/yocto/build-64/workspace/sources/piglit/tests/egl/spec/egl_ext_surface_compression/../../egl-util.h:12:10: fatal error: X11/Xlib.h: No such file or directory
-| 12 | #include <X11/Xlib.h>
-| | ^~~~~~~~~~~~
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/974]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- tests/egl/spec/CMakeLists.txt | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/tests/egl/spec/CMakeLists.txt b/tests/egl/spec/CMakeLists.txt
-index 33c504978..1dea6d8fc 100644
---- a/tests/egl/spec/CMakeLists.txt
-+++ b/tests/egl/spec/CMakeLists.txt
-@@ -7,7 +7,9 @@ add_subdirectory (egl_ext_device_drm)
- add_subdirectory (egl_ext_platform_device)
- add_subdirectory (egl_ext_image_dma_buf_import_modifiers)
- add_subdirectory (egl_ext_protected_content)
--add_subdirectory (egl_ext_surface_compression)
-+if (PIGLIT_HAS_X11)
-+ add_subdirectory (egl_ext_surface_compression)
-+endif (PIGLIT_HAS_X11)
- add_subdirectory (egl_khr_create_context)
- add_subdirectory (egl_khr_display_reference)
- add_subdirectory (egl_khr_get_all_proc_addresses)
new file mode 100644
@@ -0,0 +1,50 @@
+From ea48657a33015ad1f94c0d639fd9ee76e0e374c4 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Date: Fri, 6 Dec 2024 01:55:28 +0200
+Subject: [PATCH 1/2] tests/egl_ext_surface_compression: stop using egl_utils
+
+Otherwise, if X11 includes are not available, the build fails:
+| In file included from <PATH>/piglit/tests/egl/spec/egl_ext_surface_compression/create_surface.c:28:
+| <PATH>/piglit/tests/egl/spec/egl_ext_surface_compression/../../egl-util.h:12:10: fatal error: X11/Xlib.h: No such file or directory
+| 12 | #include <X11/Xlib.h>
+| | ^~~~~~~~~~~~
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/977]
+---
+ .../egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt | 4 ++--
+ tests/egl/spec/egl_ext_surface_compression/create_surface.c | 1 -
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt b/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt
+index d9540bcfde27..2daf8167c81d 100644
+--- a/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt
++++ b/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt
+@@ -2,10 +2,10 @@ link_libraries(
+ piglitutil_${piglit_target_api}
+ )
+
+-piglit_add_executable(egl_ext_surface_compression-create ../../egl-util.c
++piglit_add_executable(egl_ext_surface_compression-create
+ ../../egl-wayland.c create_surface.c)
+
+-piglit_add_executable(egl_ext_surface_compression-image ../../egl-util.c
++piglit_add_executable(egl_ext_surface_compression-image
+ image_storage.c)
+
+ # vim: ft=cmake:
+diff --git a/tests/egl/spec/egl_ext_surface_compression/create_surface.c b/tests/egl/spec/egl_ext_surface_compression/create_surface.c
+index e3d55d4331fb..35f13fd007b4 100644
+--- a/tests/egl/spec/egl_ext_surface_compression/create_surface.c
++++ b/tests/egl/spec/egl_ext_surface_compression/create_surface.c
+@@ -25,7 +25,6 @@
+ #include "piglit-util.h"
+ #include "piglit-util-egl.h"
+ #include "piglit-util-gl.h"
+-#include "../../egl-util.h"
+ #include "../../egl-wayland.h"
+
+ static enum piglit_result
+--
+2.39.5
+
new file mode 100644
@@ -0,0 +1,37 @@
+From 0a985979d68b181b9014e49c0eb1908dd51345e4 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Date: Fri, 6 Dec 2024 01:57:18 +0200
+Subject: [PATCH 2/2] tests/egl_ext_surface_compression: make create test
+ wayland-only
+
+The egl_ext_surface_compression-create uses egl-wayland.c, it should not
+be enabled if Wayland is not available:
+
+<PATH>/tests/egl/egl-wayland.c:29:10: fatal error: wayland-client.h: No such file or directory
+ 29 | #include <wayland-client.h>
+ | ^~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/977]
+---
+ tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt b/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt
+index 2daf8167c81d..01a70164f444 100644
+--- a/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt
++++ b/tests/egl/spec/egl_ext_surface_compression/CMakeLists.gles3.txt
+@@ -2,8 +2,10 @@ link_libraries(
+ piglitutil_${piglit_target_api}
+ )
+
++if (PIGLIT_HAS_WAYLAND)
+ piglit_add_executable(egl_ext_surface_compression-create
+ ../../egl-wayland.c create_surface.c)
++endif (PIGLIT_HAS_WAYLAND)
+
+ piglit_add_executable(egl_ext_surface_compression-image
+ image_storage.c)
+--
+2.39.5
+
@@ -11,7 +11,8 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma
file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \
file://0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch \
- file://0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch \
+ file://0001-tests-egl_ext_surface_compression-stop-using-egl_uti.patch \
+ file://0002-tests-egl_ext_surface_compression-make-create-test-w.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
Fix the following error appearing if building on a pure-X11 distros: <PATH>/git/tests/egl/egl-wayland.c:29:10: fatal error: wayland-client.h: No such file or directory 29 | #include <wayland-client.h> | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- ...ake-egl_ext_surface_compression-cond.patch | 33 ------------ ...rface_compression-stop-using-egl_uti.patch | 50 +++++++++++++++++++ ...rface_compression-make-create-test-w.patch | 37 ++++++++++++++ meta/recipes-graphics/piglit/piglit_git.bb | 3 +- 4 files changed, 89 insertions(+), 34 deletions(-) delete mode 100644 meta/recipes-graphics/piglit/piglit/0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch create mode 100644 meta/recipes-graphics/piglit/piglit/0001-tests-egl_ext_surface_compression-stop-using-egl_uti.patch create mode 100644 meta/recipes-graphics/piglit/piglit/0002-tests-egl_ext_surface_compression-make-create-test-w.patch