From 61d344636cf59ad11805923665543cde4eb6cbd7 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Sun, 1 Dec 2024 01:13:31 +0200 Subject: [PATCH] piglit: update the patch to fix building the test without wayland Fix the following error appearing if building on a pure-X11 distros: /git/tests/egl/egl-wayland.c:29:10: fatal error: wayland-client.h: No such file or directory 29 | #include | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Dmitry Baryshkov Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- ...ake-egl_ext_surface_compression-cond.patch | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch index 47f8b03961c..69cc302912e 100644 --- a/meta/recipes-graphics/piglit/piglit/0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch +++ b/meta/recipes-graphics/piglit/piglit/0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch @@ -11,23 +11,45 @@ Otherwise, this error occurs: | | ^~~~~~~~~~~~ Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/974] +Co-developed-by: Dmitry Baryshkov +Signed-off-by: Dmitry Baryshkov Signed-off-by: Alexander Kanavin --- - tests/egl/spec/CMakeLists.txt | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + .../spec/egl_ext_surface_compression/CMakeLists.gles3.txt | 6 ++++-- + tests/egl/spec/egl_ext_surface_compression/create_surface.c | 1 - + 2 files changed, 4 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..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,10 +2,12 @@ link_libraries( + piglitutil_${piglit_target_api} + ) + +-piglit_add_executable(egl_ext_surface_compression-create ../../egl-util.c ++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 ../../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 -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) -- 2.47.3