diff options
Diffstat (limited to 'meta-oe/recipes-graphics/vk-gl-cts')
13 files changed, 496 insertions, 74 deletions
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch new file mode 100644 index 0000000000..f659e36066 --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch @@ -0,0 +1,29 @@ +From ec12bb7bda60cdf2c848e13df67452a7d30a42be Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 3 Sep 2022 18:52:42 -0700 +Subject: [PATCH] cmake: Define WAYLAND_SCANNER and WAYLAND_PROTOCOLS_DIR if + not already defined + +This helps with cross compiling and providing these knobs from cmake +cmdline + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + framework/platform/CMakeLists.txt | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/framework/platform/CMakeLists.txt ++++ b/framework/platform/CMakeLists.txt +@@ -73,8 +73,9 @@ if (NOT DEFINED TCUTIL_PLATFORM_SRCS) + add_definitions(-DDEQP_SUPPORT_WAYLAND=1) + include_directories(lnx/wayland) + +- pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) +- ++ if (NOT WAYLAND_PROTOCOLS_DIR) ++ pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir) ++ endif() + if (NOT WAYLAND_SCANNER) + pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner) + endif() diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch new file mode 100644 index 0000000000..0dd59713a1 --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkan-cts-include-missing-cstdint.patch @@ -0,0 +1,34 @@ +From b07f6ecd6ab83b788301a555dc546b9a5c9dd8a2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 25 Jan 2023 19:19:34 -0800 +Subject: [PATCH] Include missing <cstdint> + +This error is seen with gcc-13 where include headers are not implicitly +included [1] + +Fixes errors e.g. +error: 'uint32_t' does not name a type + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/378] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + framework/common/tcuDefs.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/framework/common/tcuDefs.hpp b/framework/common/tcuDefs.hpp +index ad3d0736d..6dfac10fb 100644 +--- a/framework/common/tcuDefs.hpp ++++ b/framework/common/tcuDefs.hpp +@@ -26,6 +26,7 @@ + #include "deDefs.hpp" + #include "qpTestLog.h" + ++#include <cstdint> + #include <string> + #include <stdexcept> + +-- +2.39.1 + diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch new file mode 100644 index 0000000000..40aea8f203 --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch @@ -0,0 +1,32 @@ +From 1b7646ced0f0b969f818084887885827ed1a4244 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 31 May 2021 17:31:33 -0700 +Subject: [PATCH] vulkancts: Include missing <cstdint> + +Fixes build with gcc-13 + +../git/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp:2798:102: error: 'uintptr_t' in namespace 'std' does not name a type + 2798 | BufferDataType type = static_cast<BufferDataType>(reinterpret_cast<std::uintptr_t>(expectedOutputs[resultIndex].getUserData())); + | ^~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/378] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp +index ab02be1dc..3d3ee4829 100644 +--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp ++++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmFloatControlsTests.cpp +@@ -33,6 +33,7 @@ + #include "deFloat16.h" + #include "vkQueryUtil.hpp" + #include "vkRefUtil.hpp" ++#include <cstdint> + #include <cstring> + #include <vector> + #include <limits> +-- +2.39.1 + diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch index b4573b38b5..4ecc371ca4 100644 --- a/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch +++ b/meta-oe/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch @@ -1,7 +1,7 @@ -Index: git/external/glslang/src/glslang/Include/PoolAlloc.h -=================================================================== ---- git.orig/external/glslang/src/glslang/Include/PoolAlloc.h -+++ git/external/glslang/src/glslang/Include/PoolAlloc.h +Upstream-Status: Pending + +--- a/external/glslang/src/glslang/Include/PoolAlloc.h ++++ b/external/glslang/src/glslang/Include/PoolAlloc.h @@ -240,8 +240,9 @@ protected: int numCalls; // just an interesting statistic diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch index 4116ae7d14..58dc1f24dd 100644 --- a/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch +++ b/meta-oe/recipes-graphics/vk-gl-cts/files/fix-musl.patch @@ -1,19 +1,17 @@ -Index: git/framework/delibs/dethread/CMakeLists.txt -=================================================================== ---- git.orig/framework/delibs/dethread/CMakeLists.txt -+++ git/framework/delibs/dethread/CMakeLists.txt -@@ -39,6 +39,7 @@ include_directories( - - if (DE_OS_IS_UNIX) - add_definitions(-D_GNU_SOURCE) +Upstream-Status: Pending + +--- a/framework/delibs/dethread/CMakeLists.txt ++++ b/framework/delibs/dethread/CMakeLists.txt +@@ -42,6 +42,7 @@ if (DE_OS_IS_UNIX) + add_definitions(-D__BSD_VISIBLE) + add_definitions(-D_XOPEN_SOURCE=600) + endif () + add_definitions(-D_XOPEN_SOURCE=600) - set(DETHREAD_LIBS ${DETHREAD_LIBS} pthread) - endif () + add_definitions(-D_GNU_SOURCE) -Index: git/framework/qphelper/CMakeLists.txt -=================================================================== ---- git.orig/framework/qphelper/CMakeLists.txt -+++ git/framework/qphelper/CMakeLists.txt + set(DETHREAD_LIBS ${DETHREAD_LIBS} pthread) +--- a/framework/qphelper/CMakeLists.txt ++++ b/framework/qphelper/CMakeLists.txt @@ -28,6 +28,7 @@ set(QPHELPER_LIBS if (DE_OS_IS_UNIX OR DE_OS_IS_QNX) # For vsnprintf() diff --git a/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch b/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch new file mode 100644 index 0000000000..8a8d8d2c32 --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch @@ -0,0 +1,20 @@ +Prepend instead of append to the module search path, as this script needs to use +the local module build, not the host module build. + +Upstream-Status: Submitted +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/external/vulkancts/scripts/gen_framework.py b/external/vulkancts/scripts/gen_framework.py +index 83c5329ce..10e720910 100755 +--- a/external/vulkancts/scripts/gen_framework.py ++++ b/external/vulkancts/scripts/gen_framework.py +@@ -33 +33 @@ from collections import OrderedDict +-sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) ++sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) +diff --git a/external/vulkancts/scripts/gen_framework_c.py b/external/vulkancts/scripts/gen_framework_c.py +index 95587e642..84b878cb2 100644 +--- a/external/vulkancts/scripts/gen_framework_c.py ++++ b/external/vulkancts/scripts/gen_framework_c.py +@@ -28 +28 @@ import re +-sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) ++sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "..", "scripts")) diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc index 4a297c313a..09f1fbcaee 100644 --- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc +++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc @@ -2,37 +2,82 @@ LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" SRC_URI = "\ - git://github.com/KhronosGroup/VK-GL-CTS.git;protocol=https;tag=${BPN}-${PV};name=vk-gl-cts \ + git://github.com/KhronosGroup/VK-GL-CTS.git;protocol=https;name=vk-gl-cts;nobranch=1 \ git://github.com/google/amber;protocol=https;destsuffix=git/external/amber/src;name=amber;branch=main \ - git://github.com/KhronosGroup/glslang.git;protocol=https;destsuffix=git/external/glslang/src;name=glslang \ - git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/external/spirv-headers/src;name=spirv-headers \ - git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/external/spirv-tools/src;name=spirv-tools \ - https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;name=renderdoc \ + git://github.com/KhronosGroup/glslang.git;protocol=https;destsuffix=git/external/glslang/src;name=glslang;branch=main \ + git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/external/spirv-headers/src;name=spirv-headers;branch=main \ + git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/external/spirv-tools/src;name=spirv-tools;branch=main \ + git://github.com/open-source-parsers/jsoncpp.git;protocol=https;destsuffix=git/external/jsoncpp/src;name=jsoncpp;branch=master \ + git://github.com/KhronosGroup/Vulkan-Docs.git;protocol=https;destsuffix=git/external/vulkan-docs/src;name=vulkan-docs;branch=main \ + https://raw.githubusercontent.com/baldurk/renderdoc/v1.1/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;name=renderdoc \ + git://github.com/Igalia/ESExtractor.git;protocol=https;destsuffix=git/external/ESExtractor/src;name=ESExtractor;branch=main \ + git://github.com/Igalia/vk_video_samples.git;protocol=https;destsuffix=git/external/nvidia-video-samples/src;name=video-parser;nobranch=1 \ " S = "${WORKDIR}/git" -SRCREV_FORMAT = "vk-gl-cts" +SRCREV_FORMAT = "vk-gl-cts_amber_glslang_spirv-headers_spirv-tools_jsoncpp_vulkan-docs" S = "${WORKDIR}/git" -inherit pkgconfig cmake features_check +inherit pkgconfig cmake features_check python3native qemu -REQUIRED_DISTRO_FEATURES += "opengl" +ANY_OF_DISTRO_FEATURES += "opengl vulkan" -DEPENDS += "libpng zlib virtual/libgles2 virtual/egl" +DEPENDS += "python3-lxml-native libpng zlib virtual/libgles2 qemu-native" -SRC_URI_append_libc-musl = "\ +SRC_URI += " \ + file://0001-vulkancts-Include-missing-cstdint.patch \ + file://0001-use-library-sonames-for-linking.patch \ +" + +SRC_URI:append:libc-musl = "\ file://fix-musl.patch \ " -DEPENDS_append_libc-musl = " libexecinfo" +DEPENDS:append:libc-musl = " libexecinfo" -SRC_URI_append_toolchain-clang = "\ +SRC_URI:append:toolchain-clang = "\ file://fix-clang-private-operator.patch \ " -EXTRA_OECMAKE_append = " -DDEQP_TARGET=surfaceless" +EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols -DAMBER_DISABLE_WERROR=ON" + +# The best thing for the user to do is to not specify any of the following +# PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own +# probing and build what it thinks is appropriate. +# However, if you want, you can specify one of the following PACKAGECONFIGs +# to override this behaviour. +PACKAGECONFIG ??= "" +PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,,,,wayland x11_egl x11_glx x11_egl_glx" +PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland-native wayland wayland-protocols,,,surfaceless x11_egl x11_glx x11_egl_glx" +PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_glx x11_egl_glx" +PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx" +PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx" + +do_configure:append() { + # Write out a qemu wrapper that will be used by cmake + # so that it can run target helper binaries through that. + qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" + cat > ${WORKDIR}/qemuwrapper << EOF +#!/bin/sh +$qemu_binary "\$@" +EOF + chmod +x ${WORKDIR}/qemuwrapper +} + +python __anonymous() { + # if the user doesn't specify any PACKAGECONFIG then the cts build system + # is going to probe the sysroot to try to figure out what to build + # in this case we try to guess whether the user is building for wayland + # or x11 and add the required dependencies automatically + distrofeatures = (d.getVar("DISTRO_FEATURES") or "") + if not bb.utils.contains_any("PACKAGECONFIG", ["surfaceless", "wayland", "x11_egl", "x11_glx", "x11_egl_glx"], True, False, d): + if "wayland" in distrofeatures: + d.appendVar("DEPENDS", " wayland-native ${MLPREFIX}wayland ${MLPREFIX}wayland-protocols") + if "x11" in distrofeatures: + d.appendVar("DEPENDS", " virtual/${MLPREFIX}libx11 virtual/${MLPREFIX}egl ") +} CTSDIR = "/usr/lib/${BPN}" -FILES_${PN} += "${CTSDIR}" +FILES:${PN} += "${CTSDIR}" diff --git a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch new file mode 100644 index 0000000000..b5a1d331ed --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts/0001-use-library-sonames-for-linking.patch @@ -0,0 +1,114 @@ +From acd25c4b8d5b7e420a7a89bdfd6551c70de828b3 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner <twoerner@gmail.com> +Date: Thu, 23 Sep 2021 19:36:43 -0400 +Subject: [PATCH] use library sonames for linking + +The recommended "best practices" for applications is to link to library +sonames (e.g. libGL.so.1) instead of library names (e.g. libGL.so). This +ensures that applications don't try to use libraries if an incompatible ABI +change occurs. + +Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/288] +Signed-off-by: Trevor Woerner <twoerner@gmail.com> +--- + framework/egl/egluGLContextFactory.cpp | 4 ++-- + framework/egl/wrapper/eglwLibrary.cpp | 2 +- + framework/platform/android/tcuAndroidPlatform.cpp | 2 +- + framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp | 2 +- + .../platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp | 2 +- + framework/platform/surfaceless/tcuSurfacelessPlatform.cpp | 6 +++--- + 6 files changed, 9 insertions(+), 9 deletions(-) + +--- a/framework/egl/egluGLContextFactory.cpp ++++ b/framework/egl/egluGLContextFactory.cpp +@@ -63,7 +63,7 @@ using std::vector; + # if (DE_OS == DE_OS_WIN32) + # define DEQP_GLES2_LIBRARY_PATH "libGLESv2.dll" + # else +-# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" ++# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" + # endif + #endif + +@@ -75,7 +75,7 @@ using std::vector; + # if (DE_OS == DE_OS_WIN32) + # define DEQP_OPENGL_LIBRARY_PATH "opengl32.dll" + # else +-# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" ++# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" + # endif + #endif + +--- a/framework/egl/wrapper/eglwLibrary.cpp ++++ b/framework/egl/wrapper/eglwLibrary.cpp +@@ -148,7 +148,7 @@ DefaultLibrary::~DefaultLibrary (void) + const char* DefaultLibrary::getLibraryFileName (void) + { + #if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) +- return "libEGL.so"; ++ return "libEGL.so.1"; + #elif (DE_OS == DE_OS_WIN32) + return "libEGL.dll"; + #else +--- a/framework/platform/android/tcuAndroidPlatform.cpp ++++ b/framework/platform/android/tcuAndroidPlatform.cpp +@@ -57,7 +57,7 @@ static const eglu::NativeWindow::Capabil + class NativeDisplay : public eglu::NativeDisplay + { + public: +- NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so") {} ++ NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so.1") {} + virtual ~NativeDisplay (void) {} + + virtual EGLNativeDisplayType getLegacyNative (void) { return EGL_DEFAULT_DISPLAY; } +--- a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp ++++ b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp +@@ -75,7 +75,7 @@ class Library : public eglw::DefaultLibr + { + public: + Library (void) +- : eglw::DefaultLibrary("libEGL.so") ++ : eglw::DefaultLibrary("libEGL.so.1") + { + } + +--- a/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp ++++ b/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp +@@ -66,7 +66,7 @@ public: + EGL_PLATFORM_WAYLAND_KHR, + "EGL_KHR_platform_wayland") + , m_display (waylandDisplay) +- , m_library ("libEGL.so") {} ++ , m_library ("libEGL.so.1") {} + + ~Display(void) {} + wayland::Display& getWaylandDisplay (void) { return *m_display; } +--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp ++++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp +@@ -69,7 +69,7 @@ using std::vector; + + // Default library names + #if !defined(DEQP_GLES2_LIBRARY_PATH) +-# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" ++# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" + #endif + + #if !defined(DEQP_GLES3_LIBRARY_PATH) +@@ -77,7 +77,7 @@ using std::vector; + #endif + + #if !defined(DEQP_OPENGL_LIBRARY_PATH) +-# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" ++# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" + #endif + + #if !defined(DEQP_VULKAN_LIBRARY_PATH) +@@ -234,7 +234,7 @@ glu::RenderContext* ContextFactory::crea + } + + EglRenderContext::EglRenderContext(const glu::RenderConfig& config, const tcu::CommandLine& cmdLine) +- : m_egl("libEGL.so") ++ : m_egl("libEGL.so.1") + , m_contextType(config.type) + , m_eglDisplay(EGL_NO_DISPLAY) + , m_eglContext(EGL_NO_CONTEXT) diff --git a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb deleted file mode 100644 index 3e336e45c3..0000000000 --- a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.6.1.bb +++ /dev/null @@ -1,19 +0,0 @@ -DESCRIPTION = "OpenGL CTS" - -require khronos-cts.inc - -SRCREV_amber = "d26ee22dd7faab1845a531d410f7ec1db407402a" -SRCREV_glslang = "c538b5d796fb24dd418fdd650c7f76e56bcc3dd8" -SRCREV_spirv-headers = "e4322e3be589e1ddd44afb20ea842a977c1319b8" -SRCREV_spirv-tools = "1eb89172a82b436d8037e8a8c29c80f7e1f7df74" -SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" - -S = "${WORKDIR}/git" - -do_install() { - install -d ${D}/${CTSDIR} - cp -r ${B}/external/openglcts/modules/* ${D}/${CTSDIR} - rm -r ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles - rm -r ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles - rm -r ${D}/${CTSDIR}/common/subgroups/*.a ${D}/${CTSDIR}/common/subgroups/cmake_install.cmake ${D}/${CTSDIR}/common/subgroups/CMakeFiles -} diff --git a/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb new file mode 100644 index 0000000000..0656d724b4 --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "OpenGL CTS" + +require khronos-cts.inc +# opengl-es-cts-3.2.9.3 +SRCREV_vk-gl-cts = "7f5fb62245d535a1fc0bf50b2c7e5a342dc551fe" +SRCREV_amber = "933ecb4d6288675a92eb1650e0f52b1d7afe8273" +SRCREV_glslang = "a0ad0d7067521fff880e36acfb8ce453421c3f25" +SRCREV_spirv-headers = "87d5b782bec60822aa878941e6b13c0a9a954c9b" +SRCREV_spirv-tools = "f98473ceeb1d33700d01e20910433583e5256030" +SRCREV_ESExtractor = "ce5d7ebcf0ebb0d78385ee4cc34653eb6764bfc4" +# Not yet needed +SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" +SRCREV_vulkan-docs = "9a2e576a052a1e65a5d41b593e693ff02745604b" +SRCREV_video-parser = "7d68747d3524842afaf050c5e00a10f5b8c07904" +SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" + +SRC_URI += "\ + git://github.com/nvpro-samples/vk_video_samples.git;protocol=https;destsuffix=git/external/video-parser/src;name=video-parser;branch=main \ + file://gen-framework-path.patch \ + " +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}/${CTSDIR} + cp -r ${B}/external/openglcts/modules/* ${D}/${CTSDIR} + + install -m 0755 ${B}/modules/egl/deqp-egl ${D}/${CTSDIR} + install -m 0755 ${B}/modules/gles2/deqp-gles2 ${D}/${CTSDIR} + install -m 0755 ${B}/modules/gles3/deqp-gles3 ${D}/${CTSDIR} + install -m 0755 ${B}/modules/gles31/deqp-gles31 ${D}/${CTSDIR} + install -m 0755 ${B}/modules/internal/de-internal-tests ${D}/${CTSDIR} + + rm -rf ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles + rm -rf ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles + rm -rf ${D}/${CTSDIR}/common/subgroups/*.a ${D}/${CTSDIR}/common/subgroups/cmake_install.cmake ${D}/${CTSDIR}/common/subgroups/CMakeFiles +} + +SECURITY_CFLAGS:riscv64 = "${SECURITY_NOPIE_CFLAGS}" +LTO = "" + diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch new file mode 100644 index 0000000000..f12abd0c1a --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts/0001-use-library-sonames-for-linking.patch @@ -0,0 +1,114 @@ +From acd25c4b8d5b7e420a7a89bdfd6551c70de828b3 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner <twoerner@gmail.com> +Date: Thu, 23 Sep 2021 19:36:43 -0400 +Subject: [PATCH] use library sonames for linking + +The recommended "best practices" for applications is to link to library +sonames (e.g. libGL.so.1) instead of library names (e.g. libGL.so). This +ensures that applications don't try to use libraries if an incompatible ABI +change occurs. + +Upstream-Status: Submitted [https://github.com/KhronosGroup/VK-GL-CTS/pull/288] +Signed-off-by: Trevor Woerner <twoerner@gmail.com> +--- + framework/egl/egluGLContextFactory.cpp | 4 ++-- + framework/egl/wrapper/eglwLibrary.cpp | 2 +- + framework/platform/android/tcuAndroidPlatform.cpp | 2 +- + framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp | 2 +- + .../platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp | 2 +- + framework/platform/surfaceless/tcuSurfacelessPlatform.cpp | 6 +++--- + 6 files changed, 9 insertions(+), 9 deletions(-) + +--- a/framework/egl/egluGLContextFactory.cpp ++++ b/framework/egl/egluGLContextFactory.cpp +@@ -63,7 +63,7 @@ using std::vector; + # if (DE_OS == DE_OS_WIN32) + # define DEQP_GLES2_LIBRARY_PATH "libGLESv2.dll" + # else +-# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" ++# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" + # endif + #endif + +@@ -75,7 +75,7 @@ using std::vector; + # if (DE_OS == DE_OS_WIN32) + # define DEQP_OPENGL_LIBRARY_PATH "opengl32.dll" + # else +-# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" ++# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" + # endif + #endif + +--- a/framework/egl/wrapper/eglwLibrary.cpp ++++ b/framework/egl/wrapper/eglwLibrary.cpp +@@ -148,7 +148,7 @@ DefaultLibrary::~DefaultLibrary (void) + const char* DefaultLibrary::getLibraryFileName (void) + { + #if (DE_OS == DE_OS_ANDROID) || (DE_OS == DE_OS_UNIX) +- return "libEGL.so"; ++ return "libEGL.so.1"; + #elif (DE_OS == DE_OS_WIN32) + return "libEGL.dll"; + #else +--- a/framework/platform/android/tcuAndroidPlatform.cpp ++++ b/framework/platform/android/tcuAndroidPlatform.cpp +@@ -57,7 +57,7 @@ static const eglu::NativeWindow::Capabil + class NativeDisplay : public eglu::NativeDisplay + { + public: +- NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so") {} ++ NativeDisplay (void) : eglu::NativeDisplay(DISPLAY_CAPABILITIES), m_library("libEGL.so.1") {} + virtual ~NativeDisplay (void) {} + + virtual EGLNativeDisplayType getLegacyNative (void) { return EGL_DEFAULT_DISPLAY; } +--- a/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp ++++ b/framework/platform/lnx/X11/tcuLnxX11EglDisplayFactory.cpp +@@ -75,7 +75,7 @@ class Library : public eglw::DefaultLibr + { + public: + Library (void) +- : eglw::DefaultLibrary("libEGL.so") ++ : eglw::DefaultLibrary("libEGL.so.1") + { + } + +--- a/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp ++++ b/framework/platform/lnx/wayland/tcuLnxWaylandEglDisplayFactory.cpp +@@ -66,7 +66,7 @@ public: + EGL_PLATFORM_WAYLAND_KHR, + "EGL_KHR_platform_wayland") + , m_display (waylandDisplay) +- , m_library ("libEGL.so") {} ++ , m_library ("libEGL.so.1") {} + + ~Display(void) {} + wayland::Display& getWaylandDisplay (void) { return *m_display; } +--- a/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp ++++ b/framework/platform/surfaceless/tcuSurfacelessPlatform.cpp +@@ -69,7 +69,7 @@ using std::vector; + + // Default library names + #if !defined(DEQP_GLES2_LIBRARY_PATH) +-# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so" ++# define DEQP_GLES2_LIBRARY_PATH "libGLESv2.so.2" + #endif + + #if !defined(DEQP_GLES3_LIBRARY_PATH) +@@ -77,7 +77,7 @@ using std::vector; + #endif + + #if !defined(DEQP_OPENGL_LIBRARY_PATH) +-# define DEQP_OPENGL_LIBRARY_PATH "libGL.so" ++# define DEQP_OPENGL_LIBRARY_PATH "libGL.so.1" + #endif + + #if !defined(DEQP_VULKAN_LIBRARY_PATH) +@@ -237,7 +237,7 @@ glu::RenderContext* ContextFactory::crea + } + + EglRenderContext::EglRenderContext(const glu::RenderConfig& config, const tcu::CommandLine& cmdLine, const glu::RenderContext *sharedContext) +- : m_egl("libEGL.so") ++ : m_egl("libEGL.so.1") + , m_contextType(config.type) + , m_eglDisplay(EGL_NO_DISPLAY) + , m_eglContext(EGL_NO_CONTEXT) diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.2.3.0.bb b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.2.3.0.bb deleted file mode 100644 index 77064d4ede..0000000000 --- a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.2.3.0.bb +++ /dev/null @@ -1,23 +0,0 @@ -DESCRIPTION = "Vulkan CTS" - -require khronos-cts.inc - -SRCREV_amber = "a40bef4dba98d2d80b48e5a940d8574fbfceb197" -SRCREV_glslang = "b5f003d7a3ece37db45578a8a3140b370036fc64" -SRCREV_spirv-headers = "f8bf11a0253a32375c32cad92c841237b96696c0" -SRCREV_spirv-tools = "d2b486219495594f2e5d0e8d457fc234a3460b3b" -SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" - -S = "${WORKDIR}/git" - -REQUIRED_DISTRO_FEATURES = "vulkan" -inherit features_check - -DEPENDS += " vulkan-loader" - -do_install() { - install -d ${D}/${CTSDIR} - cp -r ${B}/external/vulkancts/modules/vulkan/* ${D}/${CTSDIR}/ - rm -r ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles - rm -r ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles -} diff --git a/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb new file mode 100644 index 0000000000..1008a5fd42 --- /dev/null +++ b/meta-oe/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.7.3.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Vulkan CTS" + +require khronos-cts.inc + +SRC_URI += "git://github.com/Igalia/vk_video_samples.git;protocol=https;destsuffix=git/external/nvidia-video-samples/src;name=video-parser;nobranch=1" + +# vulkan-cts-1.3.7.3 +SRCREV_vk-gl-cts = "d71a36db16d98313c431829432a136dbda692a08" +SRCREV_amber = "933ecb4d6288675a92eb1650e0f52b1d7afe8273" +SRCREV_glslang = "c5117b328afc86e16edff6ed6afe0fe7872a7cf3" +SRCREV_spirv-headers = "b8b9eb8640c8c0107ba580fbcb10f969022ca32c" +SRCREV_spirv-tools = "bfc94f63a7adbcf8ae166f5f108ac9f69079efc0" +SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1" +SRCREV_vulkan-docs = "b9aad705f0d9e5e6734ac2ad671d5d1de57b05e0" +SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e" +# Not yet needed +SRCREV_ESExtractor = "75ffcaf55bb069f7a23764194742d2fb78c7f71f" +SRCREV_video-parser = "138bbe048221d315962ddf8413aa6a08cc62a381" + +SRC_URI += "file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch \ + file://0001-vulkan-cts-include-missing-cstdint.patch \ +" + +TOOLCHAIN = "gcc" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" +inherit features_check + +DEPENDS += " vulkan-loader" + +do_install() { + install -d ${D}/${CTSDIR} + cp -r ${B}/external/vulkancts/modules/vulkan/* ${D}/${CTSDIR}/ + rm -rf ${D}/${CTSDIR}/*.a ${D}/${CTSDIR}/cmake_install.cmake ${D}/${CTSDIR}/CMakeFiles + rm -rf ${D}/${CTSDIR}/*/*.a ${D}/${CTSDIR}/*/cmake_install.cmake ${D}/${CTSDIR}/*/CMakeFiles +} |