diff options
Diffstat (limited to 'meta/recipes-graphics/vulkan')
15 files changed, 448 insertions, 190 deletions
diff --git a/meta/recipes-graphics/vulkan/assimp_4.1.0.bb b/meta/recipes-graphics/vulkan/assimp_4.1.0.bb deleted file mode 100644 index 194cbe33cc..0000000000 --- a/meta/recipes-graphics/vulkan/assimp_4.1.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \ - various well-known 3D model formats in a uniform manner." -HOMEPAGE = "http://www.assimp.org/" -SECTION = "devel" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=2119edef0916b0bd511cb3c731076271" - -DEPENDS = "zlib" - -SRC_URI = "git://github.com/assimp/assimp.git" -UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))" - -SRCREV = "80799bdbf90ce626475635815ee18537718a05b1" - -S = "${WORKDIR}/git" - -inherit cmake - -EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}" diff --git a/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch b/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch deleted file mode 100644 index 93bcfbf851..0000000000 --- a/meta/recipes-graphics/vulkan/vulkan-demos/0001-Don-t-build-demos-with-questionably-licensed-data.patch +++ /dev/null @@ -1,98 +0,0 @@ -From 0a27144d43b70121f57f6036514d069ca9d2b971 Mon Sep 17 00:00:00 2001 -From: "Maxin B. John" <maxin.john@intel.com> -Date: Mon, 30 Jul 2018 17:23:29 +0300 -Subject: [PATCH] Don't build demos with questionably licensed data - -Some of the models don't have open source compatible licenses: -don't build demos using those. Also don't build demos that need -resources that are not included. - -ssao: -scenerendering: - Sibenik model, no license found - -deferred: -deferredmultisampling: -deferredshadows: - armor model, CC-BY-3.0 - -vulkanscene: -imgui: -shadowmapping: - vulkanscene model, no license found - -indirectdraw: - plant model, no license found - -hdr: -pbribl: -pbrtexture: - Require external Vulkan Asset Pack - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- - examples/CMakeLists.txt | 14 -------------- - 1 file changed, 14 deletions(-) - -diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt -index 8eee3a4..698d3b3 100644 ---- a/examples/CMakeLists.txt -+++ b/examples/CMakeLists.txt -@@ -47,18 +47,12 @@ set(EXAMPLES - computeshader - conservativeraster - debugmarker -- deferred -- deferredmultisampling -- deferredshadows - descriptorsets - displacement - distancefieldfonts - dynamicuniformbuffer - gears - geometryshader -- hdr -- imgui -- indirectdraw - inputattachments - instancing - mesh -@@ -70,8 +64,6 @@ set(EXAMPLES - parallaxmapping - particlefire - pbrbasic -- pbribl -- pbrtexture - pipelines - pipelinestatistics - pushconstants -@@ -79,15 +71,10 @@ set(EXAMPLES - radialblur - raytracing - renderheadless -- scenerendering - screenshot -- shadowmapping -- shadowmappingomni -- shadowmappingcascade - skeletalanimation - specializationconstants - sphericalenvmapping -- ssao - stencilbuffer - subpasses - terraintessellation -@@ -101,7 +88,6 @@ set(EXAMPLES - texturesparseresidency - triangle - viewportarray -- vulkanscene - ) - - buildExamples() --- -2.4.0 - diff --git a/meta/recipes-graphics/vulkan/vulkan-demos_git.bb b/meta/recipes-graphics/vulkan/vulkan-demos_git.bb deleted file mode 100644 index d2041d7d4c..0000000000 --- a/meta/recipes-graphics/vulkan/vulkan-demos_git.bb +++ /dev/null @@ -1,44 +0,0 @@ -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 = "01f9ab5b6d21e5062ac0f6e0f205c7fa2ca9d769" -SRCREV_gli = "8e43030b3e12bb58a4663d85adc5c752f89099c0" - -SRC_URI = "git://github.com/SaschaWillems/Vulkan.git \ - git://github.com/g-truc/glm;destsuffix=git/external/glm;name=glm \ - git://github.com/g-truc/gli;destsuffix=git/external/gli;name=gli \ - file://0001-Don-t-build-demos-with-questionably-licensed-data.patch \ -" -UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "ae0b59c6e2e8630a2ae26f4a0b7a72cbe7547948" -UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" -S = "${WORKDIR}/git" - -REQUIRED_DISTRO_FEATURES = 'vulkan' - -inherit cmake distro_features_check -DEPENDS = "vulkan-loader assimp" - -do_install_append () { - # Remove assets that have uncertain licenses - rm ${D}${datadir}/vulkan-demos/models/armor/* \ - ${D}${datadir}/vulkan-demos/models/sibenik/* \ - ${D}${datadir}/vulkan-demos/models/vulkanscene* \ - ${D}${datadir}/vulkan-demos/models/plants.dae \ - ${D}${datadir}/vulkan-demos/textures/texturearray_plants* - - 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/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb b/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb deleted file mode 100644 index 284c19d797..0000000000 --- a/meta/recipes-graphics/vulkan/vulkan-headers_1.1.108.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Vulkan Header files and API registry" -HOMEPAGE = "https://www.khronos.org/vulkan/" -BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers" -SECTION = "libs" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=sdk-${PV}" - -SRCREV = "097a1045098213919fd56442f52c716fc78eeb27" - -S = "${WORKDIR}/git" - -inherit cmake - -FILES_${PN} += "${datadir}/vulkan" - -UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)" diff --git a/meta/recipes-graphics/vulkan/vulkan-headers_1.3.283.0.bb b/meta/recipes-graphics/vulkan/vulkan-headers_1.3.283.0.bb new file mode 100644 index 0000000000..6423ef9df6 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-headers_1.3.283.0.bb @@ -0,0 +1,28 @@ +SUMMARY = "Vulkan Header files and API registry" +DESCRIPTION = "Vulkan is a 3D graphics and compute API providing cross-platform access \ +to modern GPUs with low overhead and targeting realtime graphics applications such as \ +games and interactive media. This package contains the development headers \ +for packages wanting to make use of Vulkan." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers" +SECTION = "libs" + +LICENSE = "Apache-2.0 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1bc355d8c4196f774c8b87ed1a8dd625" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;branch=main;protocol=https" + +SRCREV = "eaa319dade959cb61ed2229c8ea42e307cc8f8b3" + +S = "${WORKDIR}/git" + +inherit cmake + +FILES:${PN} += "${datadir}/vulkan" +RDEPENDS:${PN} += "python3-core" + +# These recipes need to be updated in lockstep with each other: +# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools, +# vulkan-validation-layers, vulkan-utility-libraries, vulkan-volk. +# 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+)+)" diff --git a/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb b/meta/recipes-graphics/vulkan/vulkan-loader_1.3.283.0.bb index 2fd6c44480..6c3197e13f 100644 --- a/meta/recipes-graphics/vulkan/vulkan-loader_1.1.108.bb +++ b/meta/recipes-graphics/vulkan/vulkan-loader_1.3.283.0.bb @@ -9,29 +9,35 @@ 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 = "ecb0b1e69fb2f4d3cae262e6da24c170ce62ae13" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;branch=vulkan-sdk-1.3.283;protocol=https" +SRCREV = "720be5198aad4696381d2e3eeadc131c9f56bdc6" S = "${WORKDIR}/git" REQUIRED_DISTRO_FEATURES = "vulkan" -inherit cmake distro_features_check -ANY_OF_DISTRO_FEATURES = "x11 wayland" +inherit cmake features_check pkgconfig DEPENDS += "vulkan-headers" EXTRA_OECMAKE = "\ -DBUILD_TESTS=OFF \ -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ + -DASSEMBLER_WORKS=FALSE \ + -DVulkanHeaders_INCLUDE_DIR=${STAGING_INCDIR} \ + -DVulkanRegistry_DIR=${RECIPE_SYSROOT}/${datadir} \ " -# 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, -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" -RRECOMMENDS_${PN} = "mesa-vulkan-drivers" +RRECOMMENDS:${PN} = "mesa-vulkan-drivers" +# These recipes need to be updated in lockstep with each other: +# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools, +# vulkan-validation-layers, vulkan-utility-libraries, vulkan-volk. +# 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+)+)" diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch new file mode 100644 index 0000000000..c2304bdd48 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Deprecate-u8string_view.patch @@ -0,0 +1,59 @@ +From 93987b1ce7d6f91387202495aac61026070597df Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Jan 2023 21:37:52 -0800 +Subject: [PATCH] Deprecate u8string_view + +Use basic_string_view instead + +Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/dea7fde8b7d649923dd41b0766bdf076033c62a2] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + include/spdlog/fmt/bundled/core.h | 3 ++- + include/spdlog/fmt/bundled/format.h | 15 ++------------- + 2 files changed, 4 insertions(+), 14 deletions(-) + +diff --git a/include/spdlog/fmt/bundled/core.h b/include/spdlog/fmt/bundled/core.h +index 50b79351..e8b029ef 100644 +--- a/include/spdlog/fmt/bundled/core.h ++++ b/include/spdlog/fmt/bundled/core.h +@@ -1484,7 +1484,8 @@ FMT_API void vprint(wstring_view format_str, wformat_args args); + + /** + \rst +- Prints formatted data to ``stdout``. ++ Formats ``args`` according to specifications in ``format_str`` and writes the ++ output to ``stdout``. + + **Example**:: + +diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h +index 1bb24a52..39426361 100644 +--- a/include/spdlog/fmt/bundled/format.h ++++ b/include/spdlog/fmt/bundled/format.h +@@ -407,21 +407,10 @@ void basic_buffer<T>::append(const U *begin, const U *end) { + enum char8_t: unsigned char {}; + #endif + +-// A UTF-8 string view. +-class u8string_view : public basic_string_view<char8_t> { +- public: +- typedef char8_t char_type; +- +- u8string_view(const char *s): +- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s)) {} +- u8string_view(const char *s, size_t count) FMT_NOEXCEPT: +- basic_string_view<char8_t>(reinterpret_cast<const char8_t*>(s), count) {} +-}; +- + #if FMT_USE_USER_DEFINED_LITERALS + inline namespace literals { +-inline u8string_view operator"" _u(const char *s, std::size_t n) { +- return {s, n}; ++inline basic_string_view<char8_t> operator"" _u(const char* s, std::size_t n) { ++ return {reinterpret_cast<const char8_t*>(s), n}; + } + } + #endif +-- +2.39.0 + diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch new file mode 100644 index 0000000000..f2bd7e510b --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-Do-not-use-LFS64-functions-on-linux-musl.patch @@ -0,0 +1,37 @@ +From ce7a593e74c8e0c2ece15c73e7614d4f13a19a53 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 30 Dec 2022 13:04:08 -0800 +Subject: [PATCH] Do not use LFS64 functions on linux/musl + +On musl, off_t is 64bit always ( even on 32bit platforms ), therefore using +LFS64 funcitons is not needed on such platforms. Moreover, musl has stopped +providing aliases for these functions [1] which means it wont compile on +newer musl systems. Therefore only use it on 32bit glibc/linux platforms +and exclude musl like cygwin or OSX + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4 + +Upstream-Status: Submitted [https://github.com/gabime/spdlog/pull/2589] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + include/spdlog/details/os.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/include/spdlog/details/os.h b/include/spdlog/details/os.h +index 8e8476f0..be0a67b8 100644 +--- a/include/spdlog/details/os.h ++++ b/include/spdlog/details/os.h +@@ -227,7 +227,9 @@ inline size_t filesize(FILE *f) + #else // unix + int fd = fileno(f); + // 64 bits(but not in osx or cygwin, where fstat64 is deprecated) +-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) ++#if !defined(__FreeBSD__) && !defined(__APPLE__) && \ ++ (defined(__linux__) && defined(__GLIBC__)) && \ ++ (defined(__x86_64__) || defined(__ppc64__)) && !defined(__CYGWIN__) + struct stat64 st; + if (::fstat64(fd, &st) == 0) + { +-- +2.39.0 + diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch new file mode 100644 index 0000000000..c16e05112f --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/0001-vulkan-samples-Fix-reproducibility-issue.patch @@ -0,0 +1,43 @@ +From d998c753254649c7cf7c64e3fed78e41c11ad7ed Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Wed, 23 Aug 2023 09:38:37 +0200 +Subject: [PATCH] vulkan-samples: Fix reproducibility issue + +There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths +used for logging with LOGE() in the code. We need to make this match the value we use +in the debug source remapping from CFLAGS + +We export the right path to use in the recipe with: + +EXTRA_OECMAKE = "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" + +and we then patch this into the code instead of the broken use +of CMAKE_SOURCE_DIR since __FILENAME__ will match our path prefix +changes. + +This also breaks reproducibility since the path length of the build directory +will currently change the output! + +Upstream-Status: Pending [needs to be discussed upstream] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Signed-off-by: Julien Stephan <jstephan@baylibre.com> +--- + bldsys/cmake/global_options.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bldsys/cmake/global_options.cmake b/bldsys/cmake/global_options.cmake +index b15c2da..d8952e5 100644 +--- a/bldsys/cmake/global_options.cmake ++++ b/bldsys/cmake/global_options.cmake +@@ -62,7 +62,7 @@ set(CMAKE_CXX_STANDARD 14) + set(CMAKE_DISABLE_SOURCE_CHANGES ON) + set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE) ++string(LENGTH "${CMAKE_DEBUG_SRCDIR}/" ROOT_PATH_SIZE) + add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE}) + + set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}") +-- +2.41.0 diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch b/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch new file mode 100644 index 0000000000..644c3b6167 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples/32bit.patch @@ -0,0 +1,101 @@ +From 49761ca63797014223d8e3ff6fb2c0235803c19c Mon Sep 17 00:00:00 2001 +From: asuessenbach <asuessenbach@nvidia.com> +Date: Wed, 3 May 2023 09:50:08 +0200 +Subject: [PATCH] Resolve some Vulkan-Hpp-related issues on Win32. + +This patch fixes vulkan-samples compilation on 32-bit hosts. + +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@arm.com> + +--- + framework/common/hpp_vk_common.h | 4 ++-- + framework/core/hpp_buffer.cpp | 4 ++-- + framework/core/hpp_buffer.h | 2 +- + framework/core/hpp_image.cpp | 2 +- + samples/api/hpp_texture_loading/hpp_texture_loading.cpp | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/framework/common/hpp_vk_common.h b/framework/common/hpp_vk_common.h +index 39ed3dcde..0cbbe479e 100644 +--- a/framework/common/hpp_vk_common.h ++++ b/framework/common/hpp_vk_common.h +@@ -92,7 +92,7 @@ inline bool is_dynamic_buffer_descriptor_type(vk::DescriptorType descriptor_type + + inline vk::ShaderModule load_shader(const std::string &filename, vk::Device device, vk::ShaderStageFlagBits stage) + { +- return vkb::load_shader(filename, device, static_cast<VkShaderStageFlagBits>(stage)); ++ return static_cast<vk::ShaderModule>(vkb::load_shader(filename, device, static_cast<VkShaderStageFlagBits>(stage))); + } + + inline void set_image_layout(vk::CommandBuffer command_buffer, +@@ -104,7 +104,7 @@ inline void set_image_layout(vk::CommandBuffer command_buffer, + vk::PipelineStageFlags dst_mask = vk::PipelineStageFlagBits::eAllCommands) + { + vkb::set_image_layout(command_buffer, +- image, ++ static_cast<VkImage>(image), + static_cast<VkImageLayout>(old_layout), + static_cast<VkImageLayout>(new_layout), + static_cast<VkImageSubresourceRange>(subresource_range), +diff --git a/framework/core/hpp_buffer.cpp b/framework/core/hpp_buffer.cpp +index 8da265acb..e6509b9f4 100644 +--- a/framework/core/hpp_buffer.cpp ++++ b/framework/core/hpp_buffer.cpp +@@ -84,7 +84,7 @@ HPPBuffer::~HPPBuffer() + if (get_handle() && (allocation != VK_NULL_HANDLE)) + { + unmap(); +- vmaDestroyBuffer(get_device().get_memory_allocator(), get_handle(), allocation); ++ vmaDestroyBuffer(get_device().get_memory_allocator(), static_cast<VkBuffer>(get_handle()), allocation); + } + } + +@@ -93,7 +93,7 @@ VmaAllocation HPPBuffer::get_allocation() const + return allocation; + } + +-VkDeviceMemory HPPBuffer::get_memory() const ++vk::DeviceMemory HPPBuffer::get_memory() const + { + return memory; + } +diff --git a/framework/core/hpp_buffer.h b/framework/core/hpp_buffer.h +index 7a243c265..bad47406d 100644 +--- a/framework/core/hpp_buffer.h ++++ b/framework/core/hpp_buffer.h +@@ -55,7 +55,7 @@ class HPPBuffer : public vkb::core::HPPVulkanResource<vk::Buffer> + + VmaAllocation get_allocation() const; + const uint8_t *get_data() const; +- VkDeviceMemory get_memory() const; ++ vk::DeviceMemory get_memory() const; + + /** + * @return Return the buffer's device address (note: requires that the buffer has been created with the VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT usage fla) +diff --git a/framework/core/hpp_image.cpp b/framework/core/hpp_image.cpp +index 00fa89ba7..5e6f27363 100644 +--- a/framework/core/hpp_image.cpp ++++ b/framework/core/hpp_image.cpp +@@ -138,7 +138,7 @@ HPPImage::~HPPImage() + if (get_handle() && memory) + { + unmap(); +- vmaDestroyImage(get_device().get_memory_allocator(), get_handle(), memory); ++ vmaDestroyImage(get_device().get_memory_allocator(), static_cast<VkImage>(get_handle()), memory); + } + } + +diff --git a/samples/api/hpp_texture_loading/hpp_texture_loading.cpp b/samples/api/hpp_texture_loading/hpp_texture_loading.cpp +index 11a1f24c1..cbdd22773 100644 +--- a/samples/api/hpp_texture_loading/hpp_texture_loading.cpp ++++ b/samples/api/hpp_texture_loading/hpp_texture_loading.cpp +@@ -170,7 +170,7 @@ void HPPTextureLoading::load_texture() + memory_allocate_info = {memory_requirements.size, + get_device()->get_gpu().get_memory_type(memory_requirements.memoryTypeBits, vk::MemoryPropertyFlagBits::eDeviceLocal)}; + texture.device_memory = get_device()->get_handle().allocateMemory(memory_allocate_info); +- VK_CHECK(vkBindImageMemory(get_device()->get_handle(), texture.image, texture.device_memory, 0)); ++ get_device()->get_handle().bindImageMemory(texture.image, texture.device_memory, 0); + + vk::CommandBuffer copy_command = get_device()->create_command_buffer(vk::CommandBufferLevel::ePrimary, true); + diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb new file mode 100644 index 0000000000..d60c0f3190 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb @@ -0,0 +1,39 @@ +SUMMARY = "The Vulkan Samples is collection of resources to help develop optimized Vulkan applications." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Samples/issues" +LICENSE = "Apache-2.0" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a" + +SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \ + file://0001-vulkan-samples-Fix-reproducibility-issue.patch \ + file://0001-Do-not-use-LFS64-functions-on-linux-musl.patch;patchdir=third_party/spdlog \ + file://0001-Deprecate-u8string_view.patch;patchdir=third_party/spdlog \ + file://32bit.patch \ + " + +UPSTREAM_CHECK_COMMITS = "1" +SRCREV = "2307c3eb5608cb1205fa3514b3a31dbfb857d00c" + +UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = 'vulkan' + +inherit cmake features_check + +FILES:${PN} += "${datadir}" + +# +# There is code to remove the prefix CMAKE_SOURCE_DIR from __FILENAME__ paths +# used for logging with LOGE in the code. We need to make this match the value we use +# in the debug source remapping from CFLAGS +# +EXTRA_OECMAKE += "-DCMAKE_DEBUG_SRCDIR=${TARGET_DBGSRC_DIR}/" +# Binaries built with PCH enabled don't appear reproducible, differing results were seen +# from some builds depending on the point the PCH was compiled. Disable it to be +# deterministic +EXTRA_OECMAKE += "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON" + +# This needs to be specified explicitly to avoid xcb/xlib dependencies +EXTRA_OECMAKE += "-DVKB_WSI_SELECTION=D2D" diff --git a/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb b/meta/recipes-graphics/vulkan/vulkan-tools_1.3.283.0.bb index 26cdee3c14..a76f60735f 100644 --- a/meta/recipes-graphics/vulkan/vulkan-tools_1.1.108.bb +++ b/meta/recipes-graphics/vulkan/vulkan-tools_1.3.283.0.bb @@ -1,20 +1,21 @@ SUMMARY = "Vulkan Utilities and Tools" +DESCRIPTION = "Assist development by enabling developers to verify their applications correct use of the Vulkan API." HOMEPAGE = "https://www.khronos.org/vulkan/" BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools" SECTION = "libs" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=sdk-${PV}" -SRCREV = "3ccd7f6ebae3e1919adf837718c04feb6c2acc61" +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;branch=vulkan-sdk-1.3.283;protocol=https" +SRCREV = "38321da9031f5909f1ca2dbafac8840ef6b2c144" S = "${WORKDIR}/git" -inherit cmake distro_features_check +inherit cmake features_check pkgconfig ANY_OF_DISTRO_FEATURES = "x11 wayland" REQUIRED_DISTRO_FEATURES = "vulkan" -DEPENDS += "vulkan-headers vulkan-loader" +DEPENDS += "vulkan-headers vulkan-loader vulkan-volk" EXTRA_OECMAKE = "\ -DBUILD_TESTS=OFF \ @@ -28,4 +29,9 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" 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" +# These recipes need to be updated in lockstep with each other: +# glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools +# vulkan-validation-layers, vulkan-utility-libraries, vulkan-volk. +# 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+)+)" diff --git a/meta/recipes-graphics/vulkan/vulkan-utility-libraries_1.3.283.0.bb b/meta/recipes-graphics/vulkan/vulkan-utility-libraries_1.3.283.0.bb new file mode 100644 index 0000000000..3274bea8fd --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-utility-libraries_1.3.283.0.bb @@ -0,0 +1,33 @@ +SUMMARY = "Vulkan Utility Libraries" +DESCRIPTION = "Common libraries created to share code across various \ +Vulkan repositories, solving long standing issues for Vulkan SDK \ +developers and users." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Utility-Libraries" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=4ca2d6799091aaa98a8520f1b793939b" + +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Utility-Libraries.git;branch=main;protocol=https" +SRCREV = "ad7f699a7b2b5deb66eb3de19f24aa33597ed65b" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +DEPENDS = "vulkan-headers" + +EXTRA_OECMAKE = "\ + -DBUILD_TESTS=OFF \ + " + +inherit cmake features_check pkgconfig + +# 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, +# vulkan-utility-libraries, vulkan-volk. +# 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+)+)" diff --git a/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.283.0.bb b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.283.0.bb new file mode 100644 index 0000000000..2f1efba856 --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-validation-layers_1.3.283.0.bb @@ -0,0 +1,49 @@ +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 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=cd3c0bc366cd9b6a906e22f0bcb5910f" + +SRC_URI = "git://github.com/KhronosGroup/Vulkan-ValidationLayers.git;branch=vulkan-sdk-1.3.283;protocol=https" +SRCREV = "d5bed3e26b3d487e8d21f0cc39039351eac921a7" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +DEPENDS = "vulkan-headers vulkan-loader spirv-headers spirv-tools glslang vulkan-utility-libraries" + +# 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_LIBDIR} \ + -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 wayland', d)}" + +inherit cmake features_check pkgconfig + +FILES:${PN} += "${datadir}/vulkan" + +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, +# vulkan-utility-libraries, vulkan-volk. +# 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+)+)" diff --git a/meta/recipes-graphics/vulkan/vulkan-volk_1.3.283.0.bb b/meta/recipes-graphics/vulkan/vulkan-volk_1.3.283.0.bb new file mode 100644 index 0000000000..5485aa0b0d --- /dev/null +++ b/meta/recipes-graphics/vulkan/vulkan-volk_1.3.283.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "A meta-loader for Vulkan" +DESCRIPTION = "Volk allows one to dynamically load entrypoints required \ +to use Vulkan without linking to vulkan-1.dll or statically linking Vulkan loader. \ +" +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/zeux/volk" +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=12e6af3a0e2a5e5dbf7796aa82b64626" + +SRC_URI = "git://github.com/zeux/volk.git;branch=master;protocol=https" +SRCREV = "3a8068a57417940cf2bf9d837a7bb60d015ca2f1" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +DEPENDS = "vulkan-headers" + +EXTRA_OECMAKE = "\ + -DVOLK_INSTALL=ON \ + " + +inherit cmake features_check pkgconfig + +# 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, +# vulkan-utility-libraries, vulkan-volk. +# 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+)+)" + +do_install:append() { + sed -i -e 's,${STAGING_DIR_TARGET},,g' ${D}${libdir}/cmake/volk/volkTargets.cmake +} |