diff --git a/recipes-core/libxcam/libxcam/0002-fix-build-with-vulkan-1.2.140.patch b/recipes-core/libxcam/libxcam/0002-fix-build-with-vulkan-1.2.140.patch new file mode 100644 index 00000000..05c391ab --- /dev/null +++ b/recipes-core/libxcam/libxcam/0002-fix-build-with-vulkan-1.2.140.patch @@ -0,0 +1,37 @@ +Upstream-Status: Backport +[https://github.com/intel/libxcam/commit/ebd4d0e034c6536b8a365f5a079749041ab6a7b7] + +From ebd4d0e034c6536b8a365f5a079749041ab6a7b7 Mon Sep 17 00:00:00 2001 +From: StefanBruens +Date: Thu, 23 Jul 2020 22:03:06 +0200 +Subject: [PATCH] Fix build with Vulkan 1.2.140 and later + +1.2.140 removed the various _BEGIN_RANGE, _END_RANGE +and _RANGE_SIZE macros, see e.g. +https://gitlab.freedesktop.org/mesa/mesa/-/commit/b0cb38f36085ccee6e71b6e50cb4f094d7f03c58#b04a2be508b96c4286a9f20523ba531cd4f7176a_1050_1032 +--- + modules/vulkan/vk_instance.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules/vulkan/vk_instance.cpp b/modules/vulkan/vk_instance.cpp +index e856be64..6bc2c38c 100644 +--- a/modules/vulkan/vk_instance.cpp ++++ b/modules/vulkan/vk_instance.cpp +@@ -131,14 +131,14 @@ VKInstance::query_physical_info () + dev_num = XCAM_MIN (dev_num, MAX_DEV_NUM); + vkEnumeratePhysicalDevices (_instance_id, &dev_num, devs); + +- VkPhysicalDevice gpu_dev[VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE] = {}; ++ VkPhysicalDevice gpu_dev[VK_PHYSICAL_DEVICE_TYPE_CPU + 1] = {}; + + VkPhysicalDeviceProperties dev_prop; + for (uint32_t i = 0; i < dev_num; ++i) { + vkGetPhysicalDeviceProperties (devs[i], &dev_prop); + +- if (dev_prop.deviceType < VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE || +- dev_prop.deviceType > VK_PHYSICAL_DEVICE_TYPE_END_RANGE) { ++ if (dev_prop.deviceType < VK_PHYSICAL_DEVICE_TYPE_OTHER || ++ dev_prop.deviceType > VK_PHYSICAL_DEVICE_TYPE_CPU) { + continue; + } + if (gpu_dev[dev_prop.deviceType]) { diff --git a/recipes-core/libxcam/libxcam_1.4.0.bb b/recipes-core/libxcam/libxcam_1.4.0.bb index 987f94ee..bcbd14ac 100644 --- a/recipes-core/libxcam/libxcam_1.4.0.bb +++ b/recipes-core/libxcam/libxcam_1.4.0.bb @@ -9,7 +9,9 @@ inherit autotools pkgconfig S = "${WORKDIR}/git" SRCREV = "e0d740f0706f7902d4f262b649d42b1b48c5e4e3" SRC_URI = "git://github.com/intel/libxcam.git;branch=1.4.0; \ - file://0001-test-soft-image.cpp-fix-header-path.patch" + file://0001-test-soft-image.cpp-fix-header-path.patch \ + file://0002-fix-build-with-vulkan-1.2.140.patch \ +" COMPATIBLE_HOST_libc-musl = "null"