summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2022-08-22 17:22:16 -0500
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-08-26 20:54:38 +0000
commit15648530af61558f7f749e57b68f48a9fc86ad3e (patch)
treeaa79f00728efca42ec851df0991e8989b35de8be
parenta2dbc8fbca79ca15929addbbed5b4dcc6b66f5cf (diff)
downloadmeta-freescale-15648530af61558f7f749e57b68f48a9fc86ad3e.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. - Disable GLX tests for i.MX GPU, the drivers don't support GLX - Enable OpenCL tests for i.MX 8 Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> (cherry picked from commit 866368ac8fda2d8e45558d52867403a9e42a5e9a)
-rw-r--r--recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch32
-rw-r--r--recipes-graphics/piglit/piglit_%.bbappend10
2 files changed, 42 insertions, 0 deletions
diff --git a/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch b/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch
new file mode 100644
index 00000000..ef6fda0f
--- /dev/null
+++ b/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/recipes-graphics/piglit/piglit_%.bbappend b/recipes-graphics/piglit/piglit_%.bbappend
new file mode 100644
index 00000000..6a1b9b98
--- /dev/null
+++ b/recipes-graphics/piglit/piglit_%.bbappend
@@ -0,0 +1,10 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2
3SRC_URI += "file://0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch"
4
5PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}"
6PACKAGECONFIG:remove:imxgpu = "glx"
7PACKAGECONFIG:append:mx8-nxp-bsp = " opencl"
8
9PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF"
10PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,opencl-icd-loader"