Skip to contentSkip to conversation

vk-gl-cts: copy recipe from meta-oe with my patches

PATCH New [email protected] 1 participant 1 message Jun 20, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vk-gl-cts: copy recipe from meta-oe with my patches

From: Randolph Sapp <[email protected]>

I'm backporting a series of patches but it sounds like meta-oe won't be taking them before our next release. Adding them here for our testing at least.

To be dropped when the following is accepted upstream:
https://lists.openembedded.org/g/openembedded-devel/message/103326

---
 .../files/0001-Include-missing-cstdint.patch  |  34 ++++++
 .../files/0001-Remove-dead-variable-984.patch |  34 ++++++
 ...LAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch |  37 ++++++
 .../files/0001-include-missing-cstdint.patch  |  61 ++++++++++
 ...0001-use-library-sonames-for-linking.patch | 114 ++++++++++++++++++
 ...01-vulkancts-Include-missing-cstdint.patch |  32 +++++
 .../files/fix-clang-private-operator.patch    |  13 ++
 .../vk-gl-cts/files/fix-musl.patch            |  20 +++
 .../vk-gl-cts/files/gen-framework-path.patch  |  20 +++
 .../vk-gl-cts/khronos-cts.inc                 |  84 +++++++++++++
 .../vk-gl-cts/opengl-es-cts_3.2.9.3.bb        |  36 ++++++
 .../vk-gl-cts/vulkan-cts_1.3.3.1.bb           |  34 ++++++
 12 files changed, 519 insertions(+)
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-Include-missing-cstdint.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-Remove-dead-variable-984.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-include-missing-cstdint.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-use-library-sonames-for-linking.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/fix-musl.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/khronos-cts.inc
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb
 create mode 100644 meta-arago-distro/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.3.1.bb
meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-Include-missing-cstdint.patch new file +34 -0
new file mode 100644
index 00000000..0dd59713
@@ -0,0 +1,34 @@
+From b07f6ecd6ab83b788301a555dc546b9a5c9dd8a2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-Remove-dead-variable-984.patch new file +34 -0
new file mode 100644
index 00000000..c29d80aa
@@ -0,0 +1,34 @@
+From 0d863b444c9a54a92dab176b1b656c116923e1ca Mon Sep 17 00:00:00 2001
+From: alan-baker <[email protected]>
+Date: Wed, 30 Mar 2022 12:59:28 -0400
+Subject: [PATCH] Remove dead variable (#984)
+
+Upstream-Status: Backport [https://github.com/google/amber/commit/627ee453d6047ced0e2dd13cde983b341d0615e3]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/vkscript/command_parser.cc | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/vkscript/command_parser.cc b/src/vkscript/command_parser.cc
+index 610c7e6..3429d4d 100644
+--- a/src/vkscript/command_parser.cc
++++ b/src/vkscript/command_parser.cc
+@@ -486,7 +486,6 @@ Result CommandParser::ParseValues(const std::string& name,
+                                   std::vector<Value>* values) {
+   assert(values);
+ 
+-  uint32_t row_index = 0;
+   auto token = tokenizer_->NextToken();
+   size_t seen = 0;
+   while (!token->IsEOL() && !token->IsEOS()) {
+@@ -515,7 +514,6 @@ Result CommandParser::ParseValues(const std::string& name,
+     values->push_back(v);
+     token = tokenizer_->NextToken();
+ 
+-    ++row_index;
+     ++seen;
+   }
+ 
+-- 
+2.37.3
+
meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch new file +37 -0
new file mode 100644
index 00000000..d7000b7d
@@ -0,0 +1,37 @@
+From ec12bb7bda60cdf2c848e13df67452a7d30a42be Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ framework/platform/CMakeLists.txt | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/framework/platform/CMakeLists.txt b/framework/platform/CMakeLists.txt
+index c3ac463e4..030163f6c 100644
+--- a/framework/platform/CMakeLists.txt
++++ b/framework/platform/CMakeLists.txt
+@@ -73,8 +73,12 @@ 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)
+-			pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
++			if (NOT DEFINED WAYLAND_PROTOCOLS_DIR)
++				pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
++			endif()
++			if (NOT DEFINED WAYLAND_SCANNER)
++				pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
++			endif()
+ 
+ 			set(DEQP_XDG_SHELL_PROTOCOL ${WAYLAND_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml)
+ 			set(DEQP_XDG_SHELL_GEN_OUTPUTS_DIR ${PROJECT_BINARY_DIR}/framework/platform)
+-- 
+2.37.3
+
meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-include-missing-cstdint.patch new file +61 -0

61 lines not on this page · raw message

meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-use-library-sonames-for-linking.patch new file +114 -0

114 lines not on this page · raw message

meta-arago-distro/recipes-graphics/vk-gl-cts/files/0001-vulkancts-Include-missing-cstdint.patch new file +32 -0
new file mode 100644
index 00000000..40aea8f2
@@ -0,0 +1,32 @@
+From 1b7646ced0f0b969f818084887885827ed1a4244 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ .../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
+
meta-arago-distro/recipes-graphics/vk-gl-cts/files/fix-clang-private-operator.patch new file +13 -0
new file mode 100644
index 00000000..ea7659c6
@@ -0,0 +1,13 @@
+--- 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
+     size_t totalBytes;      // just an interesting statistic
+-private:
++public:
+     TPoolAllocator& operator=(const TPoolAllocator&);  // don't allow assignment operator
++private:
+     TPoolAllocator(const TPoolAllocator&);  // don't allow default copy constructor
+ };
+ 
meta-arago-distro/recipes-graphics/vk-gl-cts/files/fix-musl.patch new file +20 -0
new file mode 100644
index 00000000..99cb87b3
@@ -0,0 +1,20 @@
+--- 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)
+ 	add_definitions(-D_GNU_SOURCE)
+ 
+ 	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()
+ 	add_definitions(-D_XOPEN_SOURCE=600)
++	set(QPHELPER_LIBS ${QPHELPER_LIBS} execinfo)
+ endif ()
+ 
+ if (DE_OS_IS_WIN32 AND DE_COMPILER_IS_MSC)
meta-arago-distro/recipes-graphics/vk-gl-cts/files/gen-framework-path.patch new file +20 -0
new file mode 100644
index 00000000..8a8d8d2c
@@ -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 <[email protected]>
+
+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"))
meta-arago-distro/recipes-graphics/vk-gl-cts/khronos-cts.inc new file +84 -0

84 lines not on this page · raw message

meta-arago-distro/recipes-graphics/vk-gl-cts/opengl-es-cts_3.2.9.3.bb new file +36 -0
new file mode 100644
index 00000000..67ce5f2b
@@ -0,0 +1,36 @@
+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"
+
+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 = ""
+
meta-arago-distro/recipes-graphics/vk-gl-cts/vulkan-cts_1.3.3.1.bb new file +34 -0
new file mode 100644
index 00000000..d086c012
@@ -0,0 +1,34 @@
+DESCRIPTION = "Vulkan CTS"
+
+require khronos-cts.inc
+# vulkan-cts-1.3.3.1
+SRCREV_vk-gl-cts = "6024a88390942876147a88dce82bbed73b866c1b"
+SRCREV_amber = "8b145a6c89dcdb4ec28173339dd176fb7b6f43ed"
+SRCREV_glslang = "7dda6a6347b0bd550e202942adee475956ef462a"
+SRCREV_spirv-headers = "b765c355f488837ca4c77980ba69484f3ff277f5"
+SRCREV_spirv-tools = "b930e734ea198b7aabbbf04ee1562cf6f57962f0"
+SRCREV_jsoncpp = "9059f5cad030ba11d37818847443a53918c327b1"
+SRCREV_vulkan-docs = "9b5562187a8ad72c171410b036ceedbc450153ba"
+SRC_URI[renderdoc.sha256sum] = "e7b5f0aa5b1b0eadc63a1c624c0ca7f5af133aa857d6a4271b0ef3d0bdb6868e"
+# Not yet needed
+SRCREV_ESExtractor = "ce5d7ebcf0ebb0d78385ee4cc34653eb6764bfc4"
+SRCREV_video-parser = "7d68747d3524842afaf050c5e00a10f5b8c07904"
+
+SRC_URI += "file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch \
+            file://0001-Include-missing-cstdint.patch \
+            file://0001-include-missing-cstdint.patch;patchdir=external/amber/src \
+"
+
+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
+}
Signature · 1 line
2.41.0