@@ -827,6 +827,7 @@ RECIPE_MAINTAINER:pn-vulkan-headers = "Anuj Mittal <anuj.mittal@intel.com>"
RECIPE_MAINTAINER:pn-vulkan-loader = "Anuj Mittal <anuj.mittal@intel.com>"
RECIPE_MAINTAINER:pn-vulkan-samples = "Ross Burton <ross.burton@arm.com>"
RECIPE_MAINTAINER:pn-vulkan-tools = "Anuj Mittal <anuj.mittal@intel.com>"
+RECIPE_MAINTAINER:pn-vulkan-validation-layers = "Vincent Davis Jr <vince@underview.tech>"
RECIPE_MAINTAINER:pn-waffle = "Ross Burton <ross.burton@arm.com>"
RECIPE_MAINTAINER:pn-watchdog = "Alexander Kanavin <alex.kanavin@gmail.com>"
RECIPE_MAINTAINER:pn-watchdog-config = "Alexander Kanavin <alex.kanavin@gmail.com>"
new file mode 100644
@@ -0,0 +1,73 @@
+SUMMARY = "Vulkan Validation layers"
+DESCRIPTION = "Khronos official Vulkan validation layers to assist developers \
+in verifying that their applications correctly use the Vulkan API"
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-ValidationLayers"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8df9e8826734226d08cb412babfa599c"
+
+SRC_URI = "git://git@github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=sdk-1.3.243;protocol=https"
+SRCREV = "4ac0fd8e6cb3d49105d707d9ec07f0f3aa0943d6"
+
+S = "${WORKDIR}/git"
+
+REQUIRED_DISTRO_FEATURES = "vulkan"
+
+DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang"
+
+# BUILD_TESTS - Not required for OE builds
+# USE_ROBIN_HOOD_HASHING - Provides substantial performance improvements on all platforms.
+# Yocto project doesn't contain a recipe for package so disabled it.
+EXTRA_OECMAKE = "\
+ -DBUILD_TESTS=OFF \
+ -DUSE_ROBIN_HOOD_HASHING=OFF \
+ -DGLSLANG_INSTALL_DIR=${STAGING_DATADIR} \
+ -DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
+ -DSPIRV_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR} \
+ "
+
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
+PACKAGECONFIG ?= "\
+ ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
+ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
+ "
+
+inherit cmake features_check pkgconfig
+
+# error: '../recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it
+# Taking a look into ${B}/build.ninja
+# LINK_LIBRARIES = \
+# layers/libVkLayer_utils.a
+# <absolute path>/vulkan-validation-layers/1.3.243.0-r0/recipe-sysroot/usr/lib64/libSPIRV-Tools-opt.so
+# <absolute path>/vulkan-validation-layers/1.3.243.0-r0/recipe-sysroot/usr/lib64/libSPIRV-Tools.so
+# <absolute path>/vulkan-validation-layers/1.3.243.0-r0/recipe-sysroot/usr/lib
+# "../recipe-sysroot/usr/lib" doesn't exists when base_libdir = lib64. After research there appears
+# to be no solution to fix "../recipe-sysroot/usr/lib" from being included in cmake LINK_LIBARIES.
+# Temporarily create it "../recipes-sysroot/usr/lib" to bypass build issues.
+do_configure:prepend:class-target () {
+ if [ "${libdir}" = "/usr/lib64" ]; then
+ ln -sfv "${STAGING_LIBDIR}" "${STAGING_DIR_TARGET}/usr/lib"
+ fi
+}
+
+do_compile:append:class-target () {
+ if [ "${libdir}" = "/usr/lib64" ]; then
+ rm -rf "${STAGING_DIR_TARGET}/usr/lib"
+ fi
+}
+
+FILES:${PN} += "${datadir}/vulkan ${libdir}"
+
+SOLIBS = ".so"
+FILES_SOLIBSDEV = ""
+
+# These recipes need to be updated in lockstep with each other:
+# glslang, vulkan-headers, vulkan-loader, vulkan-tools,
+# vulkan-validation-layers, spirv-headers, spirv-tools
+# The tags versions should always be sdk-x.y.z, as this is what
+# upstream considers a release.
+UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
Recipe added with a fix to error: '../recipe-sysroot/usr/lib', needed by 'layers/libVkLayer_khronos_validation.so', missing and no known rule to make it Taking a look into ${B}/build.ninja LINK_LIBRARIES = \ layers/libVkLayer_utils.a <absolute path>/recipe-sysroot/usr/lib64/libSPIRV-Tools-opt.so <absolute path>/recipe-sysroot/usr/lib64/libSPIRV-Tools.so <absolute path>/recipe-sysroot/usr/lib "../recipe-sysroot/usr/lib" doesn't exists when base_libdir = lib64. After research there appears to be no solution to fix "../recipe-sysroot/usr/lib" from being included in cmake LINK_LIBARIES. Solution is to temporarily create it "../recipes-sysroot/usr/lib" to bypass build issues. Signed-off-by: Vincent Davis Jr <vince@underview.tech> --- meta/conf/distro/include/maintainers.inc | 1 + .../vulkan-validation-layers_1.3.243.0.bb | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.243.0.bb