summaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorMohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com>2020-11-04 13:11:36 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-11-04 15:12:43 +0800
commit84f3d83f41abe93f26e8de4d79f7bee48cf01854 (patch)
treee0569e6d8cb958aad67b435289f702efe39bb144 /recipes-core
parent8089e92d77bc11051463580eb0b0687e768bc8d2 (diff)
downloadmeta-intel-84f3d83f41abe93f26e8de4d79f7bee48cf01854.tar.gz
libxcam: Fix compilation error due to unrecognized micros
Vulkan micros was not recognized during compilation. Log as follows | x86_64-poky-linux-libtool: compile: x86_64-poky-linux-g++ -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/pokybuild/yocto-autobuilder-new/yocto-worker/nightly-meta-intel-world/build/build/tmp/work/corei7-64-poky-linux/libxcam/1.4.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../git/modules/vulkan -I../.. -fPIC -Wall -fstack-protector -std=c++0x -I../../../git/xcore -I../../../git/modules -I../../../git/shaders/spv -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/pokybuild/yocto-autobuilder-new/yocto-worker/nightly-meta-intel-world/build/build/tmp/work/corei7-64-poky-linux/libxcam/1.4.0-r0=/usr/src/debug/libxcam/1.4.0-r0 -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder-new/yocto-worker/nightly-meta-intel-world/build/build/tmp/work/corei7-64-poky-linux/libxcam/1.4.0-r0=/usr/src/debug/libxcam/1.4.0-r0 -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder-new/yocto-worker/nightly-meta-intel-world/build/build/tmp/work/corei7-64-poky-linux/libxcam/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder-new/yocto-worker/nightly-meta-intel-world/build/build/tmp/work/corei7-64-poky-linux/libxcam/1.4.0-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -c ../../../git/modules/vulkan/vk_geomap_handler.cpp -fPIC -DPIC -o .libs/libxcam_vulkan_la-vk_geomap_handler.o | ../../../git/modules/vulkan/vk_instance.cpp: In member function 'XCamReturn XCam::VKInstance::query_physical_info()': | ../../../git/modules/vulkan/vk_instance.cpp:134:30: error: 'VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE' was not declared in this scope; did you mean 'VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM'? | 134 | VkPhysicalDevice gpu_dev[VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE] = {}; | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM | ../../../git/modules/vulkan/vk_instance.cpp:140:35: error: 'VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE' was not declared in this scope; did you mean 'VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM'? | 140 | if (dev_prop.deviceType < VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE || | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM | ../../../git/modules/vulkan/vk_instance.cpp:141:39: error: 'VK_PHYSICAL_DEVICE_TYPE_END_RANGE' was not declared in this scope; did you mean 'VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM'? | 141 | dev_prop.deviceType > VK_PHYSICAL_DEVICE_TYPE_END_RANGE) { | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM | ../../../git/modules/vulkan/vk_instance.cpp:144:13: error: 'gpu_dev' was not declared in this scope | 144 | if (gpu_dev[dev_prop.deviceType]) { | | ^~~~~~~ | ../../../git/modules/vulkan/vk_instance.cpp:150:9: error: 'gpu_dev' was not declared in this scope | 150 | gpu_dev[dev_prop.deviceType] = devs[i]; | | ^~~~~~~ | ../../../git/modules/vulkan/vk_instance.cpp:158:9: error: 'gpu_dev' was not declared in this scope | 158 | if (gpu_dev[VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU]) | | ^~~~~~~ Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/libxcam/libxcam/0002-fix-build-with-vulkan-1.2.140.patch37
-rw-r--r--recipes-core/libxcam/libxcam_1.4.0.bb4
2 files changed, 40 insertions, 1 deletions
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 @@
1Upstream-Status: Backport
2[https://github.com/intel/libxcam/commit/ebd4d0e034c6536b8a365f5a079749041ab6a7b7]
3
4From ebd4d0e034c6536b8a365f5a079749041ab6a7b7 Mon Sep 17 00:00:00 2001
5From: StefanBruens <stefan.bruens@rwth-aachen.de>
6Date: Thu, 23 Jul 2020 22:03:06 +0200
7Subject: [PATCH] Fix build with Vulkan 1.2.140 and later
8
91.2.140 removed the various _BEGIN_RANGE, _END_RANGE
10and _RANGE_SIZE macros, see e.g.
11https://gitlab.freedesktop.org/mesa/mesa/-/commit/b0cb38f36085ccee6e71b6e50cb4f094d7f03c58#b04a2be508b96c4286a9f20523ba531cd4f7176a_1050_1032
12---
13 modules/vulkan/vk_instance.cpp | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/modules/vulkan/vk_instance.cpp b/modules/vulkan/vk_instance.cpp
17index e856be64..6bc2c38c 100644
18--- a/modules/vulkan/vk_instance.cpp
19+++ b/modules/vulkan/vk_instance.cpp
20@@ -131,14 +131,14 @@ VKInstance::query_physical_info ()
21 dev_num = XCAM_MIN (dev_num, MAX_DEV_NUM);
22 vkEnumeratePhysicalDevices (_instance_id, &dev_num, devs);
23
24- VkPhysicalDevice gpu_dev[VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE] = {};
25+ VkPhysicalDevice gpu_dev[VK_PHYSICAL_DEVICE_TYPE_CPU + 1] = {};
26
27 VkPhysicalDeviceProperties dev_prop;
28 for (uint32_t i = 0; i < dev_num; ++i) {
29 vkGetPhysicalDeviceProperties (devs[i], &dev_prop);
30
31- if (dev_prop.deviceType < VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE ||
32- dev_prop.deviceType > VK_PHYSICAL_DEVICE_TYPE_END_RANGE) {
33+ if (dev_prop.deviceType < VK_PHYSICAL_DEVICE_TYPE_OTHER ||
34+ dev_prop.deviceType > VK_PHYSICAL_DEVICE_TYPE_CPU) {
35 continue;
36 }
37 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
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10SRCREV = "e0d740f0706f7902d4f262b649d42b1b48c5e4e3" 10SRCREV = "e0d740f0706f7902d4f262b649d42b1b48c5e4e3"
11SRC_URI = "git://github.com/intel/libxcam.git;branch=1.4.0; \ 11SRC_URI = "git://github.com/intel/libxcam.git;branch=1.4.0; \
12 file://0001-test-soft-image.cpp-fix-header-path.patch" 12 file://0001-test-soft-image.cpp-fix-header-path.patch \
13 file://0002-fix-build-with-vulkan-1.2.140.patch \
14"
13 15
14COMPATIBLE_HOST_libc-musl = "null" 16COMPATIBLE_HOST_libc-musl = "null"
15 17