summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2023-05-24 20:44:46 -0500
committerSteve Sakoman <steve@sakoman.com>2023-05-30 04:11:16 -1000
commit950f4c74a6c5c258dc970f2435e242e0846cbb47 (patch)
treeb78614bcab12d9fe089f69b9fbcee2ab19fb83a7
parent9827c473689d5441c94b2a7fddcafb8c3677fa7e (diff)
downloadpoky-950f4c74a6c5c258dc970f2435e242e0846cbb47.tar.gz
piglit: Add PACKAGECONFIG for glx and opencl
- Allow GLX tests to be disabled for systems that don't support it. - Allow OpenCL tests to be enabled. (From OE-Core rev: b0f54a3db7877a95a163bd480b93cfe6f0b97dcd) Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch (renamed from meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch)0
-rw-r--r--meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch (renamed from meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch)0
-rw-r--r--meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch32
-rw-r--r--meta/recipes-graphics/piglit/piglit_git.bb11
4 files changed, 39 insertions, 4 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch b/meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
index 5d6ec368ba..5d6ec368ba 100644
--- a/meta/recipes-graphics/piglit/piglit/0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
+++ b/meta/recipes-graphics/piglit/piglit/0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch
diff --git a/meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch b/meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch
index 16c7c5c803..16c7c5c803 100644
--- a/meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch
+++ b/meta/recipes-graphics/piglit/piglit/0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch
diff --git a/meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch b/meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch
new file mode 100644
index 0000000000..ef6fda0f4e
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch
@@ -0,0 +1,32 @@
1From 13ff43fe760ac343b33d8e8c84b89886aac07116 Mon Sep 17 00:00:00 2001
2From: Tom Hochstein <tom.hochstein@nxp.com>
3Date: Fri, 3 Jun 2022 10:44:29 -0500
4Subject: [PATCH] cmake: Don't enable GLX if tests are disabled
5
6Allow building for systems that don't support GLX.
7
8Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/720]
9Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
10---
11 CMakeLists.txt | 5 +----
12 1 file changed, 1 insertion(+), 4 deletions(-)
13
14diff --git a/CMakeLists.txt b/CMakeLists.txt
15index e1aeb5ddf..85e171aba 100644
16--- a/CMakeLists.txt
17+++ b/CMakeLists.txt
18@@ -134,10 +134,7 @@ if(PIGLIT_BUILD_CL_TESTS)
19 endif(PIGLIT_BUILD_CL_TESTS)
20
21 IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
22- if(X11_FOUND AND OPENGL_gl_LIBRARY)
23- # Assume the system has GLX. In the future, systems may exist
24- # with libGL and libX11 but no GLX, but that world hasn't
25- # arrived yet.
26+ if(X11_FOUND AND OPENGL_gl_LIBRARY AND PIGLIT_BUILD_GLX_TESTS)
27 set(PIGLIT_HAS_GLX True)
28 add_definitions(-DPIGLIT_HAS_GLX)
29 endif()
30--
312.17.1
32
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb
index 3ae7a14e46..5b7a206247 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
8 8
9SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \ 9SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \
10 file://0001-cmake-install-bash-completions-in-the-right-place.patch \ 10 file://0001-cmake-install-bash-completions-in-the-right-place.patch \
11 file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
12 file://0001-Add-a-missing-include-for-htobe32-definition.patch \ 11 file://0001-Add-a-missing-include-for-htobe32-definition.patch \
13 file://0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ 12 file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \
14 " 13 file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \
14 file://0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch"
15
15UPSTREAM_CHECK_COMMITS = "1" 16UPSTREAM_CHECK_COMMITS = "1"
16 17
17SRCREV = "2f80c7cc9c02d37574dc8ba3140b7dd8eb3cbf82" 18SRCREV = "2f80c7cc9c02d37574dc8ba3140b7dd8eb3cbf82"
@@ -36,8 +37,10 @@ REQUIRED_DISTRO_FEATURES += "opengl"
36export TEMP = "${B}/temp/" 37export TEMP = "${B}/temp/"
37do_compile[dirs] =+ "${B}/temp/" 38do_compile[dirs] =+ "${B}/temp/"
38 39
39PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" 40PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}"
40PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," 41PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
42PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF"
43PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,opencl-icd-loader"
41PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" 44PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
42PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader" 45PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader"
43 46