diff --git a/meta-digi-dey/recipes-graphics/vulkan/assimp_5.0.1.bbappend b/meta-digi-dey/recipes-graphics/vulkan/assimp_5.0.1.bbappend deleted file mode 100644 index 8ffc95ab9..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/assimp_5.0.1.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -# The line is in the 4.0.0 recipe but removed for some reason in -# the 4.1.0 recipe. It seems to still be needed. -FILES_${PN}-dev += "${libdir}/cmake/" diff --git a/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb b/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb deleted file mode 100644 index 1ee5b60f4..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/glslang_git.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "An OpenGL and OpenGL ES shader front end and validator." -DESCRIPTION = "Glslang is the official reference compiler front end \ - for the OpenGL ES and OpenGL shading languages. It \ - implements a strict interpretation of the specifications \ - for these languages. It is open and free for anyone to use, \ - either from a command line or programmatically." -SECTION = "graphics" -HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler" - -inherit cmake - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://glslang/Include/Types.h;beginline=1;endline=36;md5=26473d85c7f85d955e24663f67a53818" - -S = "${WORKDIR}/git" - -SRCREV = "1bc601c674aecc2fee0dee8ff7a118db76b4c439" -SRC_URI = "git://github.com/KhronosGroup/glslang \ -" - -FILES_${PN} += "${libdir}/*" - -BBCLASSEXTEND = "native nativesdk" - -do_install_append() { - # Some of the vulkan samples/test require these headers - install -d ${D}${includedir}/SPIRV - cp -f ${S}/SPIRV/GlslangToSpv.h ${D}${includedir}/SPIRV - cp -f ${S}/SPIRV/Logger.h ${D}${includedir}/SPIRV - cp -f ${S}/SPIRV/SPVRemapper.h ${D}${includedir}/SPIRV - cp -f ${S}/SPIRV/spvIR.h ${D}${includedir}/SPIRV - - # Remove redundant headers from spirv-headers - rm -rf ${D}${includedir}/SPIRV/GLSL.std.450.h - rm -rf ${D}${includedir}/SPIRV/spirv.hpp - - install -d ${D}${includedir}/glslang/Include - cp -f ${S}/glslang/Include/*.h ${D}${includedir}/glslang/Include - install -d ${D}${includedir}/glslang/Public - cp -f ${S}/glslang/Public/*.h ${D}${includedir}/glslang/Public - install -d ${D}${includedir}/glslang/MachineIndependent - cp -f ${S}/glslang/MachineIndependent/Versions.h ${D}${includedir}/glslang/MachineIndependent -} diff --git a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools/0001-Avoid-GCC8-warning-in-text_handler.cpp.-2197.patch b/meta-digi-dey/recipes-graphics/vulkan/spirv-tools/0001-Avoid-GCC8-warning-in-text_handler.cpp.-2197.patch deleted file mode 100644 index 7e7b84443..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools/0001-Avoid-GCC8-warning-in-text_handler.cpp.-2197.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c512c6864080ff617afb422a3d04dd902809a6cf Mon Sep 17 00:00:00 2001 -From: Steven Perron -Date: Thu, 13 Dec 2018 15:03:28 -0500 -Subject: [PATCH] Avoid GCC8 warning in text_handler.cpp. (#2197) - -In the function `AssemblyContext::binaryEncodeString`, we want to copy -a nul terminated string to an instruction. When coping the string, we -did not copy the nul at the end of the source. It was added by setting -the entire last word to 0, which is mandated by the spir-v spec. This -is not a bug, but it does trigger a warning in GCC8 when doing a release -build. - -To avoid the warning, we will copy the nul character at the end of the -string too. - -Fixes #1541. ---- - source/text_handler.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/text_handler.cpp b/source/text_handler.cpp -index 5f6e8c4..c31f34a 100644 ---- a/source/text_handler.cpp -+++ b/source/text_handler.cpp -@@ -313,7 +313,7 @@ spv_result_t AssemblyContext::binaryEncodeString(const char* value, - pInst->words.back() = 0; - - char* dest = (char*)&pInst->words[oldWordCount]; -- strncpy(dest, value, length); -+ strncpy(dest, value, length + 1); - - return SPV_SUCCESS; - } --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools/0001-tools-lesspipe-Allow-generic-shell.patch b/meta-digi-dey/recipes-graphics/vulkan/spirv-tools/0001-tools-lesspipe-Allow-generic-shell.patch deleted file mode 100644 index e9a45c24f..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools/0001-tools-lesspipe-Allow-generic-shell.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 03127fd5a6eff5ae2ebea2e9c6c01fbf1a0a421a Mon Sep 17 00:00:00 2001 -From: Ankit Navik -Date: Tue, 25 Dec 2018 14:34:09 +0530 -Subject: [PATCH] tools/lesspipe: Allow generic shell - -Upstream-Status: Submitted [https://github.com/KhronosGroup/SPIRV-Tools/pull/2255] -Signed-off-by: Ankit Navik ---- - tools/lesspipe/spirv-lesspipe.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lesspipe/spirv-lesspipe.sh b/tools/lesspipe/spirv-lesspipe.sh -index 81e3355..f955259 100644 ---- a/tools/lesspipe/spirv-lesspipe.sh -+++ b/tools/lesspipe/spirv-lesspipe.sh -@@ -1,4 +1,4 @@ --#!/bin/bash -+#!/usr/bin/env sh - # Copyright (c) 2016 The Khronos Group Inc. - - # Licensed under the Apache License, Version 2.0 (the "License"); --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb b/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb deleted file mode 100644 index 9c1c69c5c..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/spirv-tools_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "The SPIR-V Tools project provides an API and commands for \ -processing SPIR-V modules" -DESCRIPTION = "The project includes an assembler, binary module parser, \ -disassembler, validator, and optimizer for SPIR-V." -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SECTION = "graphics" - -S = "${WORKDIR}/git" -DEST_DIR = "${S}/external" -SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;name=spirv-tools \ - git://github.com/KhronosGroup/SPIRV-Headers.git;name=spirv-headers;destsuffix=${DEST_DIR}/spirv-headers \ -" -SRCREV_spirv-tools = "9b3cc3e05337358d0bd9fec1b7a51e3cbf55312b" -SRCREV_spirv-headers = "38cafab379e5d16137cb97a485b9385191039b92" - -inherit cmake python3native - -do_install_append() { - install -d ${D}/${includedir}/SPIRV - install -m 0644 ${DEST_DIR}/spirv-headers/include/spirv/unified1/* ${D}/${includedir}/SPIRV -} - -FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/*.so" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vkmark/0001-src-meson.build-Prepend-sysroot-for-the-includedir.patch b/meta-digi-dey/recipes-graphics/vulkan/vkmark/0001-src-meson.build-Prepend-sysroot-for-the-includedir.patch new file mode 100644 index 000000000..72da97484 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vkmark/0001-src-meson.build-Prepend-sysroot-for-the-includedir.patch @@ -0,0 +1,31 @@ +From 3e3da71c62a36516fa16cfb1d5d55e9e5c86e573 Mon Sep 17 00:00:00 2001 +From: Neena Busireddy +Date: Mon, 3 May 2021 11:44:46 -0700 +Subject: [PATCH] src/meson.build: Prepend sysroot for the includedir + +Need to prepend PKG_CONFIG_SYSROOT_DIR to the dir path for cross compilation + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Neena Busireddy +--- + src/meson.build | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/meson.build b/src/meson.build +index 35813c5..9032706 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -6,6 +6,9 @@ vulkan_hpp = join_paths([ + 'vulkan.hpp' + ]) + ++pkgconf_sysroot = run_command(prog_python, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() ++vulkan_hpp = pkgconf_sysroot + vulkan_hpp ++ + format_map_gen_h = custom_target( + 'format_map_gen.h', + output: 'format_map_gen.h', +-- +2.17.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb b/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb deleted file mode 100644 index 871e9c5da..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vkmark_1.0.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "Vulkan benchmarking suite." -DESCRIPTION = "vkmark is an extensible Vulkan benchmarking suite with \ - targeted, configurable scenes." -SECTION = "graphics" - -LICENSE = "LGPL-2.1" -LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=4fbd65380cdd255951079008b364516c" - -inherit meson - -S = "${WORKDIR}/git" - -SRCREV = "1ebd49364f03372a710f010c01dedd0d79456413" -SRC_URI = "git://github.com/vkmark/vkmark;protocol=https" -SRC_URI += "file://0001-scenes-Use-depth-format-supported-by-i.MX.patch" - -VKMARK_INSTALL_DIR = "${WORKDIR}/vm-install" - -DEPENDS = " vulkan-headers vulkan-loader imx-gpu-viv assimp glm ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', ' libxcb','libdrm libgbm', d), d)}" -do_compile() { - - ninja -C ${WORKDIR}/build -} - -do_install() { - - DESTDIR=${VKMARK_INSTALL_DIR} ninja -C ${WORKDIR}/build install - install -d ${D}${bindir} - install -d ${D}${datadir} - install -d ${D}${libdir} - cp -r ${VKMARK_INSTALL_DIR}${bindir}/* ${D}${bindir}/ - cp -r ${VKMARK_INSTALL_DIR}${datadir}/* ${D}${datadir}/ - cp -r ${VKMARK_INSTALL_DIR}${libdir}/* ${D}${libdir}/ -} - -FILES_${PN} += "${bindir} ${datadir}" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vkmark_git.bb b/meta-digi-dey/recipes-graphics/vulkan/vkmark_git.bb new file mode 100644 index 000000000..988f44db2 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vkmark_git.bb @@ -0,0 +1,28 @@ +SUMMARY = "Vulkan benchmarking suite." +DESCRIPTION = "vkmark is an extensible Vulkan benchmarking suite with \ + targeted, configurable scenes." +SECTION = "graphics" +LICENSE = "LGPL-2.1" +LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "vulkan-loader assimp glm" + +SRC_URI = " \ + git://github.com/vkmark/vkmark;protocol=https \ + file://0001-scenes-Use-depth-format-supported-by-i.MX.patch \ + file://0001-src-meson.build-Prepend-sysroot-for-the-includedir.patch \ +" +SRCREV = "53abc4f660191051fba91ea30de084f412e7c68e" +S = "${WORKDIR}/git" + +inherit meson + +PACKAGECONFIG ?= " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ + bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \ + 'fb', d), d)} \ +" + +PACKAGECONFIG[fb] = ",,libdrm libgbm" +PACKAGECONFIG[wayland] = ",,wayland-native wayland-protocols" +PACKAGECONFIG[x11] = ",,libxcb" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch index 5c0d7e54a..c4a8dff01 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch @@ -34,28 +34,24 @@ Upstream-Status: Inappropriate [configuration] Signed-off-by: Jussi Kukkonen Signed-off-by: Maxin B. John --- - examples/CMakeLists.txt | 13 ------------- - 1 file changed, 13 deletions(-) + examples/CMakeLists.txt | 14 -------------- + 1 file changed, 14 deletions(-) -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 2ad87f79..3800ab6e 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -70,25 +70,19 @@ set(EXAMPLES - computeraytracing - computeshader +Index: git/examples/CMakeLists.txt +=================================================================== +--- git.orig/examples/CMakeLists.txt ++++ git/examples/CMakeLists.txt +@@ -72,9 +72,6 @@ set(EXAMPLES conditionalrender conservativeraster debugmarker - deferred - deferredmultisampling - deferredshadows + descriptorindexing descriptorsets displacement - distancefieldfonts - dynamicuniformbuffer - gears - geometryshader +@@ -85,9 +82,6 @@ set(EXAMPLES gltfloading gltfscenerendering gltfskinning @@ -65,11 +61,7 @@ index 2ad87f79..3800ab6e 100644 inlineuniformblocks inputattachments instancing - multisampling - multithreading -@@ -98,12 +92,10 @@ set(EXAMPLES - offscreen - oit +@@ -101,8 +95,6 @@ set(EXAMPLES parallaxmapping particlefire pbrbasic @@ -78,12 +70,8 @@ index 2ad87f79..3800ab6e 100644 pipelines pipelinestatistics pushconstants - pushdescriptors - radialblur -@@ -112,16 +104,12 @@ set(EXAMPLES - raytracingcallable - raytracingreflections - raytracingshadows +@@ -115,12 +107,8 @@ set(EXAMPLES + raytracingshadows renderheadless screenshot - shadowmapping @@ -95,15 +83,11 @@ index 2ad87f79..3800ab6e 100644 stencilbuffer subpasses terraintessellation - tessellation - textoverlay -@@ -133,9 +121,8 @@ set(EXAMPLES - texturemipmapgen - texturesparseresidency +@@ -136,7 +124,6 @@ set(EXAMPLES triangle variablerateshading viewportarray - vulkanscene ) - + buildExamples() diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Fix-bug-in-computeheadless-and-renderheadless.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Fix-bug-in-computeheadless-and-renderheadless.patch deleted file mode 100644 index d3ee68f92..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Fix-bug-in-computeheadless-and-renderheadless.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 55949fea34b4392c988b902e4835939d9a8d5574 Mon Sep 17 00:00:00 2001 -From: "yuan.tian" -Date: Thu, 17 Dec 2020 14:19:31 +0800 -Subject: [PATCH] Fix bug in computeheadless and renderheadless. - -The bug passed invalid pointer value to vkCreateInstance. - -Upstream-Status: Submitted [https://github.com/SaschaWillems/Vulkan/issues/792] - -Signed-off-by: yuan.tian ---- - examples/computeheadless/computeheadless.cpp | 4 ++-- - examples/renderheadless/renderheadless.cpp | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/examples/computeheadless/computeheadless.cpp b/examples/computeheadless/computeheadless.cpp -index 49566394..002f74a4 100644 ---- a/examples/computeheadless/computeheadless.cpp -+++ b/examples/computeheadless/computeheadless.cpp -@@ -154,6 +154,7 @@ public: - vkEnumerateInstanceLayerProperties(&instanceLayerCount, nullptr); - std::vector instanceLayers(instanceLayerCount); - vkEnumerateInstanceLayerProperties(&instanceLayerCount, instanceLayers.data()); -+ const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; - - bool layersAvailable = true; - for (auto layerName : validationLayers) { -@@ -172,7 +173,6 @@ public: - - if (layersAvailable) { - instanceCreateInfo.ppEnabledLayerNames = validationLayers; -- const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; - instanceCreateInfo.enabledLayerCount = layerCount; - instanceCreateInfo.enabledExtensionCount = 1; - instanceCreateInfo.ppEnabledExtensionNames = &validationExt; -@@ -562,4 +562,4 @@ int main() { - delete(vulkanExample); - return 0; - } --#endif -\ No newline at end of file -+#endif -diff --git a/examples/renderheadless/renderheadless.cpp b/examples/renderheadless/renderheadless.cpp -index a0126cf3..295346c0 100644 ---- a/examples/renderheadless/renderheadless.cpp -+++ b/examples/renderheadless/renderheadless.cpp -@@ -184,6 +184,7 @@ public: - vkEnumerateInstanceLayerProperties(&instanceLayerCount, nullptr); - std::vector instanceLayers(instanceLayerCount); - vkEnumerateInstanceLayerProperties(&instanceLayerCount, instanceLayers.data()); -+ const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; - - bool layersAvailable = true; - for (auto layerName : validationLayers) { -@@ -202,7 +203,6 @@ public: - - if (layersAvailable) { - instanceCreateInfo.ppEnabledLayerNames = validationLayers; -- const char *validationExt = VK_EXT_DEBUG_REPORT_EXTENSION_NAME; - instanceCreateInfo.enabledLayerCount = layerCount; - instanceCreateInfo.enabledExtensionCount = 1; - instanceCreateInfo.ppEnabledExtensionNames = &validationExt; -@@ -894,4 +894,4 @@ int main() { - delete(vulkanExample); - return 0; - } --#endif -\ No newline at end of file -+#endif --- -2.17.1 - diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch index 82e2a7c1d..56d1e2c18 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos/0001-Modify-parameter-in-vulkan-demo-computenbody.patch @@ -21,15 +21,15 @@ index 84d1c278..0837d424 100644 -#define PARTICLES_PER_ATTRACTOR 4 * 1024 +#define PARTICLES_PER_ATTRACTOR 4 * 64 #endif - + class VulkanExample : public VulkanExampleBase @@ -902,4 +902,4 @@ public: } }; - + -VULKAN_EXAMPLE_MAIN() \ No newline at end of file +VULKAN_EXAMPLE_MAIN() --- +-- 2.17.1 diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend deleted file mode 100644 index 3d54c5394..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI_append = " file://0001-Modify-parameter-in-vulkan-demo-computenbody.patch \ - file://0001-Fix-bug-in-computeheadless-and-renderheadless.patch" -SRCREV = "21f9cd52519fab405827ecc965910bf269af3342" -DEPENDS_remove = "vulkan" -DEPENDS_append = " vulkan-headers vulkan-loader" - -# Digi: The vulkan-validationlayers package is necessary for the demos to work -RDEPENDS_${PN} = "vulkan-validationlayers" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_git.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_git.bb new file mode 100644 index 000000000..757a5361e --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_git.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Collection of Vulkan examples" +LICENSE = "MIT" +DEPENDS = "zlib" + +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=dcf473723faabf17baa9b5f2207599d0 \ + file://examples/triangle/triangle.cpp;endline=12;md5=bccd1bf9cadd9e10086cf7872157e4fa" + +SRCREV_glm = "1ad55c5016339b83b7eec98c31007e0aee57d2bf" +SRCREV_ktx = "726d14d02c95bb21ec9e43807751b491d295dd3c" + +SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \ + git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm \ + git://github.com/KhronosGroup/KTX-Software;destsuffix=git/external/ktx;name=ktx;lfs=0 \ + file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \ + " +UPSTREAM_CHECK_COMMITS = "1" +SRCREV = "a2a604be473c829763854ffb34f7978bc0358afb" +UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = 'vulkan' + +inherit cmake features_check +DEPENDS = "vulkan-loader assimp wayland-protocols wayland-native" + +do_install_append () { + + mv ${D}${bindir}/screenshot ${D}${bindir}/vulkan-screenshot +} + +EXTRA_OECMAKE = "-DRESOURCE_INSTALL_DIR=${datadir}/vulkan-demos" + +ANY_OF_DISTRO_FEATURES = "x11 wayland" + +# Can only pick one of [wayland,xcb] +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}" +PACKAGECONFIG[wayland] = "-DUSE_WAYLAND_WSI=ON, -DUSE_WAYLAND_WSI=OFF, wayland" +PACKAGECONFIG[xcb] = ",,libxcb" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_git.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_git.bbappend new file mode 100644 index 000000000..652ac30f2 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-demos_git.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-Modify-parameter-in-vulkan-demo-computenbody.patch \ +" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_%.bbappend deleted file mode 100644 index 92e0a02a5..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ - -COMPATIBLE_MACHINE = "(mx8)" -COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_1.1.121.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_1.1.121.bb deleted file mode 100644 index ac1165f98..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-headers_1.1.121.bb +++ /dev/null @@ -1,20 +0,0 @@ -SUMMARY = "Vulkan Header files and API registry" -DESCRIPTION = "Vulkan is a new generation graphics and compute API \ -that provides efficient access to modern GPUs." -HOMEPAGE = "https://www.khronos.org/vulkan/" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=sdk-1.1.121 \ - " -SRCREV = "5671d014bc1792a116d374792f8a6cfba2e6f512" -UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -REQUIRED_DISTRO_FEATURES = "vulkan" - -inherit cmake features_check -ANY_OF_DISTRO_FEATURES = "x11 wayland" - -FILES_${PN} += "${datadir}/vulkan/registry" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.121.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.121.bb deleted file mode 100644 index b2c19079a..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.121.bb +++ /dev/null @@ -1,38 +0,0 @@ -SUMMARY = "3D graphics and compute API common loader" -DESCRIPTION = "Vulkan is a new generation graphics and compute API \ -that provides efficient access to modern GPUs. These packages \ -provide only the common vendor-agnostic library loader, headers and \ -the vulkaninfo utility." -HOMEPAGE = "https://www.khronos.org/vulkan/" -BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader" -SECTION = "libs" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=sdk-${PV}" -SRCREV = "a34eada3197b96e46bea3ad4b83bfa4b4396e2ea" - -S = "${WORKDIR}/git" - -REQUIRED_DISTRO_FEATURES = "vulkan" - -inherit cmake features_check python3native lib_package -ANY_OF_DISTRO_FEATURES = "x11 wayland" - -DEPENDS += "vulkan-headers" - -EXTRA_OECMAKE = "-DBUILD_TESTS=OFF" - -# must choose x11 or wayland or both -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" - -PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr" -PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" - -UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" - -# libvulkan.so is loaded dynamically, so put it in the main package -# instead of -dev -FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}" -INSANE_SKIP_${PN} += "dev-so" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.121.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.121.bbappend deleted file mode 100644 index a49e8a46c..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.1.121.bbappend +++ /dev/null @@ -1,12 +0,0 @@ - -# choose wayland -PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" - -SRC_URI_append = " file://0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch" - -# The i.MX implementation is dynamically loaded, so it requires an -# explicit runtime dependency. -RRECOMMENDS_${PN}_append_imxgpu = " libvulkan-imx" - -COMPATIBLE_MACHINE = "(mx8)" -COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.2.170.0.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.2.170.0.bbappend new file mode 100644 index 000000000..b057f2970 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-loader_1.2.170.0.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-STDIO-844-No-need-to-change-the-App-s-apiVersion-to-.patch" + +# libvulkan.so is loaded dynamically, so put it in the main package +FILES_SOLIBSDEV = "" +FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}" +INSANE_SKIP_${PN} += "dev-so" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0001-Add-support-for-wayland.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0001-Add-support-for-wayland.patch new file mode 100644 index 000000000..66681f7fb --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0001-Add-support-for-wayland.patch @@ -0,0 +1,87 @@ +From 7b27a46d14acf050e6e836c41ca2f286680e6edc Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Tue, 11 May 2021 17:28:06 -0500 +Subject: [PATCH 1/3] Add support for wayland. + +Use VKB_BUILD_WAYLAND=1 and GLFW_USE_WAYLAND=1 to enable wayland + +Signed-off-by: Hugo Osornio +Signed-off-by: Prabhu Sundararaj +--- + bldsys/cmake/template/entrypoint_main.cpp.in | 2 ++ + framework/platform/unix/unix_platform.cpp | 7 +++++++ + third_party/CMakeLists.txt | 19 ++++++++++++------- + 3 files changed, 21 insertions(+), 7 deletions(-) + +diff --git a/bldsys/cmake/template/entrypoint_main.cpp.in b/bldsys/cmake/template/entrypoint_main.cpp.in +index 92ec703..eaf158e 100644 +--- a/bldsys/cmake/template/entrypoint_main.cpp.in ++++ b/bldsys/cmake/template/entrypoint_main.cpp.in +@@ -47,6 +47,8 @@ int main(int argc, char *argv[]) + vkb::UnixPlatform platform{vkb::UnixType::Mac, argc, argv}; + # elif defined(VK_USE_PLATFORM_XCB_KHR) + vkb::UnixPlatform platform{vkb::UnixType::Linux, argc, argv}; ++# elif defined(VK_USE_PLATFORM_WAYLAND_KHR) ++ vkb::UnixPlatform platform{vkb::UnixType::Linux, argc, argv}; + # endif + #endif + +diff --git a/framework/platform/unix/unix_platform.cpp b/framework/platform/unix/unix_platform.cpp +index 53a0502..84e8f79 100644 +--- a/framework/platform/unix/unix_platform.cpp ++++ b/framework/platform/unix/unix_platform.cpp +@@ -35,6 +35,10 @@ VKBP_ENABLE_WARNINGS() + # define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" + #endif + ++#ifndef VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME ++# define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" ++#endif ++ + namespace vkb + { + namespace +@@ -95,6 +99,9 @@ const char *UnixPlatform::get_surface_extension() + } + else + { ++#ifdef VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME ++ return VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME; ++#endif + return VK_KHR_XCB_SURFACE_EXTENSION_NAME; + } + } +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index 499fe9a..de13c11 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -57,14 +57,19 @@ elseif(WIN32) + elseif(APPLE) + target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_MACOS_MVK) + elseif(UNIX) +- # See whether X11 is available. If not, fall back to direct-to-display mode. +- find_package(X11 QUIET) +- if (X11_FOUND) +- target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_XCB_KHR) ++ if (VKB_BUILD_WAYLAND) ++ message(STATUS "Using Vulkan platform wayland") ++ target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_WAYLAND_KHR) + else() +- set(DIRECT_TO_DISPLAY TRUE) +- set(DIRECT_TO_DISPLAY TRUE PARENT_SCOPE) +- target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_DISPLAY_KHR) ++ # See whether X11 is available. If not, fall back to direct-to-display mode. ++ find_package(X11 QUIET) ++ if (X11_FOUND) ++ target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_XCB_KHR) ++ else() ++ set(DIRECT_TO_DISPLAY TRUE) ++ set(DIRECT_TO_DISPLAY TRUE PARENT_SCOPE) ++ target_compile_definitions(vulkan INTERFACE VK_USE_PLATFORM_DISPLAY_KHR) ++ endif() + endif() + endif() + +-- +2.25.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0002-Wayland-support-Use-local-context-window-size.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0002-Wayland-support-Use-local-context-window-size.patch new file mode 100644 index 000000000..8584241e2 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0002-Wayland-support-Use-local-context-window-size.patch @@ -0,0 +1,66 @@ +From 49198f6ccb388e511e40c963744033b9732b4de8 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Tue, 11 May 2021 17:29:48 -0500 +Subject: [PATCH 2/3] Wayland support : Use local context window size. + +The default extent will use 0xFFFFFFFF for W and H. + +Signed-off-by: Hugo Osornio +Signed-off-by: Prabhu Sundararaj +--- + framework/core/swapchain.cpp | 4 +++- + framework/rendering/render_target.cpp | 9 +++++---- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/framework/core/swapchain.cpp b/framework/core/swapchain.cpp +index 3821889..bed25a5 100644 +--- a/framework/core/swapchain.cpp ++++ b/framework/core/swapchain.cpp +@@ -356,7 +356,9 @@ Swapchain::Swapchain(Swapchain & old_swapchain, + + // Chose best properties based on surface capabilities + properties.image_count = choose_image_count(image_count, surface_capabilities.minImageCount, surface_capabilities.maxImageCount); +- properties.extent = choose_extent(extent, surface_capabilities.minImageExtent, surface_capabilities.maxImageExtent, surface_capabilities.currentExtent); ++ VkExtent2D localExtent{800,800}; ++ LOGI("Using local Extent"); ++ properties.extent = localExtent;//choose_extent(extent, surface_capabilities.minImageExtent, surface_capabilities.maxImageExtent, surface_capabilities.currentExtent); + properties.array_layers = choose_image_array_layers(1U, surface_capabilities.maxImageArrayLayers); + properties.surface_format = choose_surface_format(properties.surface_format, surface_formats, surface_format_priority_list); + VkFormatProperties format_properties; +diff --git a/framework/rendering/render_target.cpp b/framework/rendering/render_target.cpp +index f9940b2..068cafa 100644 +--- a/framework/rendering/render_target.cpp ++++ b/framework/rendering/render_target.cpp +@@ -40,8 +40,9 @@ Attachment::Attachment(VkFormat format, VkSampleCountFlagBits samples, VkImageUs + } + const RenderTarget::CreateFunc RenderTarget::DEFAULT_CREATE_FUNC = [](core::Image &&swapchain_image) -> std::unique_ptr { + VkFormat depth_format = get_suitable_depth_format(swapchain_image.get_device().get_gpu().get_handle()); +- +- core::Image depth_image{swapchain_image.get_device(), swapchain_image.get_extent(), ++ VkExtent3D localExtent{800,800,1}; // = swapchain_image.get_extent(); ++ LOGI("About to create Depth Image {}, {}, {}", localExtent.width, localExtent.height, localExtent.depth); ++ core::Image depth_image{swapchain_image.get_device(), /*swapchain_image.get_extent()*/ localExtent, + depth_format, + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, + VMA_MEMORY_USAGE_GPU_ONLY}; +@@ -70,7 +71,7 @@ vkb::RenderTarget::RenderTarget(std::vector &&images) : + // Allow only one extent size for a render target + if (unique_extent.size() != 1) + { +- throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"}; ++ //throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"}; + } + + extent = *unique_extent.begin(); +@@ -109,7 +110,7 @@ vkb::RenderTarget::RenderTarget(std::vector &&image_views) : + std::transform(views.begin(), views.end(), std::inserter(unique_extent, unique_extent.end()), get_view_extent); + if (unique_extent.size() != 1) + { +- throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"}; ++ //throw VulkanException{VK_ERROR_INITIALIZATION_FAILED, "Extent size is not unique"}; + } + extent = *unique_extent.begin(); + +-- +2.25.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0003-wayland-support-for-Hello-triangle-sample.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0003-wayland-support-for-Hello-triangle-sample.patch new file mode 100644 index 000000000..2c4bdf3a4 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0003-wayland-support-for-Hello-triangle-sample.patch @@ -0,0 +1,36 @@ +From 01cc6cdf6ceb6a8b20dab4338adb771373cdbbfe Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Tue, 11 May 2021 17:31:25 -0500 +Subject: [PATCH 3/3] wayland support for Hello triangle sample + +Signed-off-by: Hugo Osornio +Signed-off-by: Prabhu Sundararaj +--- + samples/api/hello_triangle/hello_triangle.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/samples/api/hello_triangle/hello_triangle.cpp b/samples/api/hello_triangle/hello_triangle.cpp +index 3f2b8e7..b62ef82 100644 +--- a/samples/api/hello_triangle/hello_triangle.cpp ++++ b/samples/api/hello_triangle/hello_triangle.cpp +@@ -187,6 +187,8 @@ void HelloTriangle::init_instance(Context & context, + active_instance_extensions.push_back(VK_MVK_MACOS_SURFACE_EXTENSION_NAME); + #elif defined(VK_USE_PLATFORM_XCB_KHR) + active_instance_extensions.push_back(VK_KHR_XCB_SURFACE_EXTENSION_NAME); ++#elif defined(VK_USE_PLATFORM_WAYLAND_KHR) ++ active_instance_extensions.push_back(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME); + #elif defined(VK_USE_PLATFORM_DISPLAY_KHR) + active_instance_extensions.push_back(VK_KHR_DISPLAY_EXTENSION_NAME); + #else +@@ -466,7 +468,7 @@ void HelloTriangle::init_swapchain(Context &context) + } + } + +- VkExtent2D swapchain_size = surface_properties.currentExtent; ++ VkExtent2D swapchain_size{800,800}; + + // FIFO must be supported by all implementations. + VkPresentModeKHR swapchain_present_mode = VK_PRESENT_MODE_FIFO_KHR; +-- +2.25.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0004-glfw-define-GLFW_INCLUDE_NONE-to-avoid-using-default.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0004-glfw-define-GLFW_INCLUDE_NONE-to-avoid-using-default.patch new file mode 100644 index 000000000..2d41482b6 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0004-glfw-define-GLFW_INCLUDE_NONE-to-avoid-using-default.patch @@ -0,0 +1,25 @@ +From 01e6667afa4b11e541f78d74076a780d046f5fa7 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Wed, 12 May 2021 16:44:32 -0500 +Subject: [PATCH 4/4] glfw : define GLFW_INCLUDE_NONE to avoid using default GL + +Signed-off-by: Prabhu Sundararaj +--- + framework/platform/glfw_window.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/framework/platform/glfw_window.cpp b/framework/platform/glfw_window.cpp +index 0f2de95..91e9228 100644 +--- a/framework/platform/glfw_window.cpp ++++ b/framework/platform/glfw_window.cpp +@@ -22,6 +22,7 @@ + #include "common/error.h" + + VKBP_DISABLE_WARNINGS() ++#define GLFW_INCLUDE_NONE + #include + #include + #include +-- +2.25.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0005-glfw-fix-glfw3.h-gl-error.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0005-glfw-fix-glfw3.h-gl-error.patch new file mode 100644 index 000000000..11bbfb2a3 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples/0005-glfw-fix-glfw3.h-gl-error.patch @@ -0,0 +1,32 @@ +From 69bfc75b74c4b554fb576562684ba0b970771fb4 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Wed, 12 May 2021 17:20:50 -0500 +Subject: [PATCH 5/5] glfw: fix glfw3.h gl error + +Signed-off-by: Prabhu Sundararaj +--- + samples/extensions/open_gl_interop/offscreen_context.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/samples/extensions/open_gl_interop/offscreen_context.h b/samples/extensions/open_gl_interop/offscreen_context.h +index c125aeb..7260c11 100644 +--- a/samples/extensions/open_gl_interop/offscreen_context.h ++++ b/samples/extensions/open_gl_interop/offscreen_context.h +@@ -57,6 +57,7 @@ struct ContextData + }; + #else + // Desktop ++#define GLFW_INCLUDE_ES31 + # include + # include + +@@ -87,4 +88,4 @@ class OffscreenContext + ContextData data; + + GLuint load_shader(const char *shader_source, GLenum shader_type); +-}; +\ No newline at end of file ++}; +-- +2.25.1 + diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples_%.bbappend new file mode 100644 index 000000000..cfc36610b --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-samples_%.bbappend @@ -0,0 +1,24 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://0001-Add-support-for-wayland.patch \ + file://0002-Wayland-support-Use-local-context-window-size.patch \ + file://0003-wayland-support-for-Hello-triangle-sample.patch \ + file://0004-glfw-define-GLFW_INCLUDE_NONE-to-avoid-using-default.patch \ + file://0005-glfw-fix-glfw3.h-gl-error.patch \ +" + +DEPENDS = "extra-cmake-modules" + +# Can only pick one of [wayland,xcb] +PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'xcb', d)}" +PACKAGECONFIG[wayland] = "-DVKB_BUILD_WAYLAND=1 -DGLFW_USE_WAYLAND=1, ,wayland wayland-native wayland-protocols libxkbcommon" +PACKAGECONFIG[xcb] = ",,libxcb" + +do_install() { + install -d ${D}${bindir} + cp ${B}/app/bin/aarch64/vulkan_samples ${D}${bindir}/ + chmod a+x ${D}${bindir}/vulkan_samples + cp -r ${S}/assets ${D}${bindir}/ + cp -r ${S}/shaders ${D}${bindir}/ +} diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_%.bbappend deleted file mode 100644 index c088df979..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ - -# choose wayland -PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" - -EXTRA_OECMAKE = "-DBUILD_CUBE=OFF" - -COMPATIBLE_MACHINE = "(mx8)" -COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_1.1.121.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_1.1.121.bb deleted file mode 100644 index 2baa30b90..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-tools_1.1.121.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Vulkan Tools" -DESCRIPTION = "This project provides Vulkan tools and utilities that \ - can assist development by enabling developers to verify their \ - applications correct use of the Vulkan API." -SECTION = "graphics" -HOMEPAGE = "https://github.com/LunarG/VulkanTools" - -DEPENDS = "vulkan-headers vulkan-loader" - -inherit cmake python3native - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -S = "${WORKDIR}/git" - -SRCREV = "ea8f6f0a3cdfc79bddf3566bf3f4b8350436695b" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-${PV} \ -" -# must choose x11 or wayland or both -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" - -PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DCUBE_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DCUBE_WSI_SELECTION=WAYLAND, libxcb libx11" -PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch index ce6fe91bf..effe45326 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers/0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch @@ -12,11 +12,11 @@ Signed-off-by: Neena Busireddy layers/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt -index 5541816..579c8b8 100644 ---- a/layers/CMakeLists.txt -+++ b/layers/CMakeLists.txt -@@ -98,7 +98,7 @@ if(BUILD_LAYERS) +Index: git/layers/CMakeLists.txt +=================================================================== +--- git.orig/layers/CMakeLists.txt ++++ git/layers/CMakeLists.txt +@@ -93,7 +93,7 @@ if(BUILD_LAYERS) elseif(UNIX) # UNIX includes APPLE foreach(TARGET_NAME ${TARGET_NAMES}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/staging-json/${TARGET_NAME}.json @@ -25,8 +25,8 @@ index 5541816..579c8b8 100644 endforeach() endif() endif() -@@ -256,7 +256,7 @@ if(BUILD_LAYERS) - -DVK_VERSION=1.1.${vk_header_version}) +@@ -270,7 +270,7 @@ if(BUILD_LAYERS) + -DVK_VERSION=1.2.${vk_header_version}) # If this json file is not a metalayer, get the needed properties from that target if(TARGET ${TARGET_NAME}) - set(INSTALL_DEFINES ${INSTALL_DEFINES} -DRELATIVE_LAYER_BINARY="$") @@ -34,6 +34,3 @@ index 5541816..579c8b8 100644 endif() add_custom_target(${TARGET_NAME}-staging-json ALL COMMAND ${CMAKE_COMMAND} ${INSTALL_DEFINES} -P "${CMAKE_CURRENT_BINARY_DIR}/generator.cmake") --- -2.7.4 - diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_%.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_%.bbappend deleted file mode 100644 index 88002489e..000000000 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_%.bbappend +++ /dev/null @@ -1,30 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" - -SRC_URI += " \ - file://icd_VSI.json \ - file://0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch \ -" -# choose wayland -PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" - -DEPENDS += " virtual/egl glslang spirv-tools" - -EXTRA_OECMAKE_remove = "-DBUILD_LAYERS=OFF" -# Enable validation layers -EXTRA_OECMAKE_append = " -DBUILD_LAYERS=ON" - -do_install_append () { - - install -d ${D}${sysconfdir}/vulkan/icd.d - cp ${WORKDIR}/icd_VSI.json ${D}${sysconfdir}/vulkan/icd.d - sed -i "s,/usr/lib,${libdir}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json - sed -i "s,1.0.30,${PV}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json -} - -FILES_SOLIBSDEV = "" -FILES_${PN} += "${libdir}/libVkLayer_*.so" - -INSANE_SKIP_${PN} = "dev-so" - -COMPATIBLE_MACHINE = "(mx8)" -COMPATIBLE_MACHINE_mx8mm = "(^$)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.1.121.bb b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.2.170.0.bb similarity index 72% rename from meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.1.121.bb rename to meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.2.170.0.bb index 3c528ed84..ceb60a9f6 100644 --- a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.1.121.bb +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.2.170.0.bb @@ -8,28 +8,35 @@ SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=7dbefed23242760aa3475ee42801c5ac" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;nobranch=1 \ - " -SRCREV = "88fcbab512e449203649d984317ff7b9a9f80b9d" -UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.2.170" + +SRCREV = "4fdcd0eebfed3505732720fc6fd98293e847d697" S = "${WORKDIR}/git" REQUIRED_DISTRO_FEATURES = "vulkan" -inherit cmake python3native lib_package features_check +inherit cmake features_check ANY_OF_DISTRO_FEATURES = "x11 wayland" -DEPENDS = "vulkan-headers vulkan-loader" +DEPENDS = "vulkan-headers glslang spirv-tools spirv-headers" EXTRA_OECMAKE = " \ - -DBUILD_LAYERS=OFF \ -DGLSLANG_INSTALL_DIR=${STAGING_DIR_HOST}/usr \ + -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_DIR_HOST}/usr \ + -DSPIRV_TOOLS_INSTALL_DIR=${STAGING_DIR_HOST}/usr \ " + # must choose x11 or wayland or both -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" + PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr" PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" +# The output library is unversioned +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + RRECOMMENDS_${PN} = "mesa-vulkan-drivers" + +UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P\d+(\.\d+)+)" diff --git a/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.2.170.0.bbappend b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.2.170.0.bbappend new file mode 100644 index 000000000..745a859c5 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/vulkan/vulkan-validationlayers_1.2.170.0.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://icd_VSI.json \ + file://0001-CMakeLists.txt-Change-the-installation-path-of-JSON-.patch \ +" + +do_install_append () { + install -d ${D}${sysconfdir}/vulkan/icd.d + cp ${WORKDIR}/icd_VSI.json ${D}${sysconfdir}/vulkan/icd.d + sed -i "s,/usr/lib,${libdir}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json + sed -i "s,1.0.30,${PV}," ${D}${sysconfdir}/vulkan/icd.d/icd_VSI.json +}