piglit: backported fixes and configs
cover piglit: backported fixes and configs
From: Randolph Sapp <[email protected]>
This is a set of patches for piglit from master that are relevant to kirkstone.
The following patch was lightly modified since it referenced other patches that were not necessary here:
piglit: Add PACKAGECONFIG for glx and opencl
Tom Hochstein (2):
piglit: Add PACKAGECONFIG for glx and opencl
piglit: Add missing glslang dependencies
Zoltan Boszormenyi (1):
piglit: Fix build time dependency
...roper-WAYLAND_INCLUDE_DIRS-variable.patch} | 0
...-shader.c-do-not-hardcode-build-pat.patch} | 0
...n-t-enable-GLX-if-tests-are-disabled.patch | 32 +++++++++++++++++++
meta/recipes-graphics/piglit/piglit_git.bb | 13 +++++---
4 files changed, 40 insertions(+), 5 deletions(-)
rename meta/recipes-graphics/piglit/piglit/{0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch => 0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch} (100%)
rename meta/recipes-graphics/piglit/piglit/{0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch => 0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch} (100%)
create mode 100644 meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patchSignature · 1 line
2.40.1
PATCH 1/3 piglit: Add PACKAGECONFIG for glx and opencl
From: Tom Hochstein <[email protected]>
- Allow GLX tests to be disabled for systems that don't support it.
- Allow OpenCL tests to be enabled.
---
...roper-WAYLAND_INCLUDE_DIRS-variable.patch} | 0
...-shader.c-do-not-hardcode-build-pat.patch} | 0
...n-t-enable-GLX-if-tests-are-disabled.patch | 32 +++++++++++++++++++
meta/recipes-graphics/piglit/piglit_git.bb | 11 ++++---
4 files changed, 39 insertions(+), 4 deletions(-)
rename meta/recipes-graphics/piglit/piglit/{0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch => 0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch} (100%)
rename meta/recipes-graphics/piglit/piglit/{0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch => 0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch} (100%)
create mode 100644 meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patchmeta/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 -0
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 -0
meta/recipes-graphics/piglit/piglit/0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 13ff43fe760ac343b33d8e8c84b89886aac07116 Mon Sep 17 00:00:00 2001 +From: Tom Hochstein <[email protected]> +Date: Fri, 3 Jun 2022 10:44:29 -0500 +Subject: [PATCH] cmake: Don't enable GLX if tests are disabled + +Allow building for systems that don't support GLX. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/720] +Signed-off-by: Tom Hochstein <[email protected]> +--- + CMakeLists.txt | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e1aeb5ddf..85e171aba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -134,10 +134,7 @@ if(PIGLIT_BUILD_CL_TESTS) + endif(PIGLIT_BUILD_CL_TESTS) + + IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +- if(X11_FOUND AND OPENGL_gl_LIBRARY) +- # Assume the system has GLX. In the future, systems may exist +- # with libGL and libX11 but no GLX, but that world hasn't +- # arrived yet. ++ if(X11_FOUND AND OPENGL_gl_LIBRARY AND PIGLIT_BUILD_GLX_TESTS) + set(PIGLIT_HAS_GLX True) + add_definitions(-DPIGLIT_HAS_GLX) + endif() +-- +2.17.1 +
meta/recipes-graphics/piglit/piglit_git.bb +7 -4
@@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \ file://0001-cmake-install-bash-completions-in-the-right-place.patch \ - file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ file://0001-Add-a-missing-include-for-htobe32-definition.patch \ - file://0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ - " + file://0002-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ + file://0003-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ + file://0005-cmake-Don-t-enable-GLX-if-tests-are-disabled.patch" + UPSTREAM_CHECK_COMMITS = "1" SRCREV = "2f80c7cc9c02d37574dc8ba3140b7dd8eb3cbf82"
@@ -36,8 +37,10 @@ REQUIRED_DISTRO_FEATURES += "opengl" export TEMP = "${B}/temp/" do_compile[dirs] =+ "${B}/temp/" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}" PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," +PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF" +PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,opencl-icd-loader" PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader"
Signature · 1 line
2.40.1
PATCH 2/3 piglit: Fix build time dependency
In reply to [email protected]From: Zoltan Boszormenyi <[email protected]>
Replace explicit opencl-icd-loader with virtual/opencl-icd.
--- meta/recipes-graphics/piglit/piglit_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/piglit/piglit_git.bb +1 -1
@@ -40,7 +40,7 @@ do_compile[dirs] =+ "${B}/temp/" PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glx', '', d)}" PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF" -PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,opencl-icd-loader" +PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd" PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader"
Signature · 1 line
2.40.1
PATCH 3/3 piglit: Add missing glslang dependencies
In reply to [email protected]From: Tom Hochstein <[email protected]>
The vulkan configuration requires glslangValidator for build and runtime.
Fixes configure error:
``` | CMake Error at CMakeLists.txt:191 (message): | glslangValidator required by vulkan tests not found ```
Fixes runtime error:
```
name: vulkan@shaders@fs-large-local-array
result: fail
returncode: 1
out:
err: glslangValidator: No such file or directory
glslangValidator failed
```--- meta/recipes-graphics/piglit/piglit_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/piglit/piglit_git.bb +1 -1
@@ -42,7 +42,7 @@ PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," PACKAGECONFIG[glx] = "-DPIGLIT_BUILD_GLX_TESTS=ON,-DPIGLIT_BUILD_GLX_TESTS=OFF" PACKAGECONFIG[opencl] = "-DPIGLIT_BUILD_CL_TESTS=ON,-DPIGLIT_BUILD_CL_TESTS=OFF,virtual/opencl-icd" PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" -PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader" +PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang" export PIGLIT_BUILD_DIR = "../../../../git"
Signature · 1 line
2.40.1