diff options
Diffstat (limited to 'recipes-graphics')
| -rw-r--r-- | recipes-graphics/devil/devil_1.8.0.bb | 21 | ||||
| -rw-r--r-- | recipes-graphics/gli/gli_0.8.4.0.bb | 22 | ||||
| -rw-r--r-- | recipes-graphics/glm/glm_%.bbappend | 2 | ||||
| -rw-r--r-- | recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc | 4 | ||||
| -rw-r--r-- | recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb | 145 | ||||
| -rw-r--r-- | recipes-graphics/imx-gpu-sdk/libxdg-shell.bb | 21 | ||||
| -rw-r--r-- | recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch | 38 | ||||
| -rw-r--r-- | recipes-graphics/rapidopencl/rapidopencl_1.1.0.1.bb | 16 | ||||
| -rw-r--r-- | recipes-graphics/rapidopenvx/rapidopenvx_1.1.0.bb | 14 | ||||
| -rw-r--r-- | recipes-graphics/rapidvulkan/rapidvulkan_1.2.162.0.bb | 13 | ||||
| -rw-r--r-- | recipes-graphics/vulkan/assimp/0001-X3D-Fix-invalid-vector-back-usage-6283.patch | 52 | ||||
| -rw-r--r-- | recipes-graphics/vulkan/assimp_5.4.3.bb | 34 |
12 files changed, 382 insertions, 0 deletions
diff --git a/recipes-graphics/devil/devil_1.8.0.bb b/recipes-graphics/devil/devil_1.8.0.bb new file mode 100644 index 000000000..dcbdf3ac1 --- /dev/null +++ b/recipes-graphics/devil/devil_1.8.0.bb | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | DESCRIPTION = "A full featured cross-platform image library" | ||
| 2 | SECTION = "libs" | ||
| 3 | LICENSE = "LGPL-2.1-only" | ||
| 4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780" | ||
| 5 | PR = "r0" | ||
| 6 | |||
| 7 | DEPENDS = "libpng jpeg tiff xz" | ||
| 8 | |||
| 9 | SRC_URI = "http://sourceforge.net/projects/openil/files/DevIL/${PV}/DevIL-${PV}.zip" | ||
| 10 | SRC_URI[sha256sum] = "451337f392c65bfb83698a781370534dc63d7bafca21e9b37178df0518f7e895" | ||
| 11 | |||
| 12 | S = "${UNPACKDIR}/DevIL/DevIL" | ||
| 13 | |||
| 14 | inherit cmake | ||
| 15 | |||
| 16 | TARGET_CFLAGS += "-Dpng_set_gray_1_2_4_to_8=png_set_expand_gray_1_2_4_to_8" | ||
| 17 | |||
| 18 | SOLIBS = ".so" | ||
| 19 | FILES_SOLIBSDEV = "" | ||
| 20 | |||
| 21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/recipes-graphics/gli/gli_0.8.4.0.bb b/recipes-graphics/gli/gli_0.8.4.0.bb new file mode 100644 index 000000000..14d6a75ed --- /dev/null +++ b/recipes-graphics/gli/gli_0.8.4.0.bb | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | SUMMARY = "OpenGL Image Library" | ||
| 2 | DESCRIPTION = "OpenGL Image (GLI) is a header only C++ \ | ||
| 3 | image library for graphics software." | ||
| 4 | HOMEPAGE = "http://gli.g-truc.net" | ||
| 5 | BUGTRACKER = "https://github.com/g-truc/gli/issues" | ||
| 6 | |||
| 7 | SECTION = "libs" | ||
| 8 | |||
| 9 | LICENSE = "MIT" | ||
| 10 | LIC_FILES_CHKSUM = "file://readme.md;beginline=19;endline=20;md5=ab03b667ee630c1abb1add70365a50fb" | ||
| 11 | |||
| 12 | SRC_URI = " \ | ||
| 13 | git://github.com/g-truc/gli;protocol=https;branch=master \ | ||
| 14 | " | ||
| 15 | SRCREV = "0c171ee87fcfe35a7e0e0445adef06f92e0b6a91" | ||
| 16 | |||
| 17 | inherit cmake | ||
| 18 | |||
| 19 | # This is a header-only library, so the main package will be empty. | ||
| 20 | ALLOW_EMPTY:${PN} = "1" | ||
| 21 | |||
| 22 | BBCLASSEXTEND = "native" | ||
diff --git a/recipes-graphics/glm/glm_%.bbappend b/recipes-graphics/glm/glm_%.bbappend new file mode 100644 index 000000000..88a16cb9d --- /dev/null +++ b/recipes-graphics/glm/glm_%.bbappend | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # This is a header-only library, so the main package will be empty. | ||
| 2 | ALLOW_EMPTY:${PN} = "1" | ||
diff --git a/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc new file mode 100644 index 000000000..3c927b587 --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk-src.inc | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | SRC_URI = "${GPU_SDK_SRC};branch=${GPU_SDK_SRC_BRANCH}" | ||
| 2 | GPU_SDK_SRC ?= "git://github.com/nxp-imx/gtec-demo-framework.git;protocol=https" | ||
| 3 | GPU_SDK_SRC_BRANCH ?= "master" | ||
| 4 | SRCREV = "35bbd45ed6eac169a778bd154283771b9bf39be7" | ||
diff --git a/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb new file mode 100644 index 000000000..e1510baf3 --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/imx-gpu-sdk_6.1.1.bb | |||
| @@ -0,0 +1,145 @@ | |||
| 1 | SUMMARY = "i.MX GPU SDK Samples" | ||
| 2 | DESCRIPTION = "Set of sample applications for i.MX GPU" | ||
| 3 | LICENSE = "BSD-3-Clause" | ||
| 4 | LIC_FILES_CHKSUM = "file://License.md;md5=9d58a2573275ce8c35d79576835dbeb8" | ||
| 5 | |||
| 6 | DEPENDS_BACKEND = \ | ||
| 7 | "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libxdg-shell wayland', \ | ||
| 8 | bb.utils.contains('DISTRO_FEATURES', 'x11', ' xrandr', \ | ||
| 9 | '', d), d)}" | ||
| 10 | DEPENDS_MX8 = "" | ||
| 11 | DEPENDS_MX8:mx8-nxp-bsp = " \ | ||
| 12 | glslang-native \ | ||
| 13 | opencv \ | ||
| 14 | rapidopencl \ | ||
| 15 | rapidopenvx \ | ||
| 16 | rapidvulkan \ | ||
| 17 | vulkan-headers \ | ||
| 18 | vulkan-loader \ | ||
| 19 | " | ||
| 20 | DEPENDS_MX8:mx8mm-nxp-bsp = " \ | ||
| 21 | opencv \ | ||
| 22 | " | ||
| 23 | DEPENDS = " \ | ||
| 24 | assimp \ | ||
| 25 | cmake-native \ | ||
| 26 | devil \ | ||
| 27 | fmt \ | ||
| 28 | gli \ | ||
| 29 | glm \ | ||
| 30 | gstreamer1.0 \ | ||
| 31 | gstreamer1.0-plugins-base \ | ||
| 32 | gtest \ | ||
| 33 | half \ | ||
| 34 | ninja-native \ | ||
| 35 | nlohmann-json \ | ||
| 36 | rapidjson \ | ||
| 37 | stb \ | ||
| 38 | zlib \ | ||
| 39 | ${DEPENDS_BACKEND} \ | ||
| 40 | ${DEPENDS_MX8} \ | ||
| 41 | " | ||
| 42 | DEPENDS:append:imxgpu2d = " virtual/libg2d virtual/libopenvg" | ||
| 43 | DEPENDS:append:imxgpu3d = " virtual/libgles2" | ||
| 44 | |||
| 45 | require imx-gpu-sdk-src.inc | ||
| 46 | |||
| 47 | |||
| 48 | WINDOW_SYSTEM = \ | ||
| 49 | "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'Wayland_XDG', \ | ||
| 50 | bb.utils.contains('DISTRO_FEATURES', 'x11', 'X11', \ | ||
| 51 | 'FB', d), d)}" | ||
| 52 | |||
| 53 | FEATURES = "ConsoleHost,EarlyAccess,EGL,GoogleUnitTest,Lib_NlohmannJson,OpenVG,Test_RequireUserInputToExit,WindowHost" | ||
| 54 | FEATURES:append:imxgpu = ",HW_GPU_VIVANTE" | ||
| 55 | FEATURES:append:imxgpu2d = ",G2D" | ||
| 56 | FEATURES:append:imxgpu3d = ",OpenGLES2" | ||
| 57 | FEATURES:append = "${FEATURES_SOC}" | ||
| 58 | |||
| 59 | FEATURES_SOC = "" | ||
| 60 | FEATURES_SOC:mx6q-nxp-bsp = ",OpenGLES3" | ||
| 61 | FEATURES_SOC:mx6dl-nxp-bsp = ",OpenGLES3" | ||
| 62 | FEATURES_SOC:mx8-nxp-bsp = ",OpenCV4,Vulkan1.2,OpenGLES3.2,OpenCL1.2,OpenVX1.2" | ||
| 63 | FEATURES_SOC:mx8mm-nxp-bsp = ",OpenCV4" | ||
| 64 | |||
| 65 | EXTENSIONS = "*" | ||
| 66 | EXTENSIONS:mx6q-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_geometry_shader,OpenGLES3:GL_EXT_tessellation_shader" | ||
| 67 | EXTENSIONS:mx6dl-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_geometry_shader,OpenGLES3:GL_EXT_tessellation_shader" | ||
| 68 | EXTENSIONS:mx8m-nxp-bsp = "OpenGLES:GL_VIV_direct_texture,OpenGLES3:GL_EXT_color_buffer_float" | ||
| 69 | EXTENSIONS:mx8mm-nxp-bsp = "*" | ||
| 70 | |||
| 71 | do_compile () { | ||
| 72 | export FSL_PLATFORM_NAME=Yocto | ||
| 73 | export ROOTFS=${STAGING_DIR_HOST} | ||
| 74 | . ./prepare.sh | ||
| 75 | FslBuild.py -vvvvv -t sdk --UseFeatures [${FEATURES}] --UseExtensions [${EXTENSIONS}] --Variants [WindowSystem=${WINDOW_SYSTEM}] --BuildThreads ${@oe.utils.parallel_make(d)} -c install --CMakeInstallPrefix ${S} | ||
| 76 | } | ||
| 77 | |||
| 78 | REMOVALS = " \ | ||
| 79 | GLES2/DeBayer \ | ||
| 80 | GLES2/DirectMultiSamplingVideoYUV \ | ||
| 81 | GLES3/DirectMultiSamplingVideoYUV \ | ||
| 82 | " | ||
| 83 | REMOVALS:append:imxdpu = " \ | ||
| 84 | G2D/EightLayers \ | ||
| 85 | " | ||
| 86 | REMOVALS:append:mx6q-nxp-bsp = " \ | ||
| 87 | GLES3/HDR02_FBBasicToneMapping \ | ||
| 88 | GLES3/HDR03_SkyboxTonemapping \ | ||
| 89 | GLES3/HDR04_HDRFramebuffer \ | ||
| 90 | " | ||
| 91 | REMOVALS:append:mx6dl-nxp-bsp = " \ | ||
| 92 | GLES3/HDR02_FBBasicToneMapping \ | ||
| 93 | GLES3/HDR03_SkyboxTonemapping \ | ||
| 94 | GLES3/HDR04_HDRFramebuffer \ | ||
| 95 | " | ||
| 96 | |||
| 97 | do_install () { | ||
| 98 | install -d "${D}/opt/${PN}" | ||
| 99 | cp -r ${S}/bin/* ${D}/opt/${PN} | ||
| 100 | for removal in ${REMOVALS}; do | ||
| 101 | rm -rf ${D}/opt/${PN}/$removal | ||
| 102 | done | ||
| 103 | } | ||
| 104 | |||
| 105 | FILES:${PN} += "/opt/${PN}" | ||
| 106 | FILES:${PN}-dbg += "/opt/${PN}/*/*/.debug /usr/src/debug" | ||
| 107 | INSANE_SKIP:${PN} += "already-stripped rpaths" | ||
| 108 | |||
| 109 | # Unfortunately recipes with an empty main package, like header-only libraries, | ||
| 110 | # are not included in the SDK. Use RDEPENDS as a workaround. | ||
| 111 | RDEPENDS_EMPTY_MAIN_PACKAGE = " \ | ||
| 112 | fmt \ | ||
| 113 | gli \ | ||
| 114 | glm \ | ||
| 115 | googletest \ | ||
| 116 | half \ | ||
| 117 | nlohmann-json \ | ||
| 118 | rapidjson \ | ||
| 119 | stb \ | ||
| 120 | " | ||
| 121 | RDEPENDS_EMPTY_MAIN_PACKAGE_MX8 = "" | ||
| 122 | RDEPENDS_EMPTY_MAIN_PACKAGE_MX8:mx8-nxp-bsp = " \ | ||
| 123 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libxdg-shell', '', d)} \ | ||
| 124 | rapidopencl \ | ||
| 125 | rapidopenvx \ | ||
| 126 | rapidvulkan \ | ||
| 127 | " | ||
| 128 | RDEPENDS_EMPTY_MAIN_PACKAGE_MX8:mx8mm-nxp-bsp = "" | ||
| 129 | # vulkan-loader is dynamically loaded, so need to add an explicit | ||
| 130 | # dependency | ||
| 131 | RDEPENDS_VULKAN_LOADER = "" | ||
| 132 | RDEPENDS_VULKAN_LOADER:mx8-nxp-bsp = "vulkan-validation-layers vulkan-loader" | ||
| 133 | RDEPENDS_VULKAN_LOADER:mx8mm-nxp-bsp = "" | ||
| 134 | RDEPENDS:${PN} += " \ | ||
| 135 | ${RDEPENDS_EMPTY_MAIN_PACKAGE} \ | ||
| 136 | ${RDEPENDS_EMPTY_MAIN_PACKAGE_MX8} \ | ||
| 137 | ${RDEPENDS_VULKAN_LOADER} \ | ||
| 138 | " | ||
| 139 | |||
| 140 | # For backwards compatibility | ||
| 141 | RPROVIDES:${PN} = "fsl-gpu-sdk" | ||
| 142 | RREPLACES:${PN} = "fsl-gpu-sdk" | ||
| 143 | RCONFLICTS:${PN} = "fsl-gpu-sdk" | ||
| 144 | |||
| 145 | COMPATIBLE_MACHINE = "(imxgpu)" | ||
diff --git a/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb b/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb new file mode 100644 index 000000000..a5637869a --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/libxdg-shell.bb | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | SUMMARY = "Provides XDG shell header and glue code library" | ||
| 2 | LICENSE = "BSD-3-Clause" | ||
| 3 | LIC_FILES_CHKSUM = "file://${UNPACKDIR}/${BP}/License.md;md5=9d58a2573275ce8c35d79576835dbeb8" | ||
| 4 | |||
| 5 | DEPENDS = "wayland-native wayland wayland-protocols" | ||
| 6 | |||
| 7 | require imx-gpu-sdk-src.inc | ||
| 8 | |||
| 9 | SRC_URI += "file://0001-xdg-shell-Add-CMake-minimum.patch" | ||
| 10 | |||
| 11 | S = "${UNPACKDIR}/${BP}/ThirdParty/Recipe/xdg-shell" | ||
| 12 | |||
| 13 | inherit cmake pkgconfig | ||
| 14 | |||
| 15 | EXTRA_OECMAKE = " \ | ||
| 16 | -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner \ | ||
| 17 | -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols \ | ||
| 18 | " | ||
| 19 | |||
| 20 | ALLOW_EMPTY:${PN} = "1" | ||
| 21 | RDEPENDS:${PN}-dev = "${PN}-staticdev" | ||
diff --git a/recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch b/recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch new file mode 100644 index 000000000..9ece7d8f7 --- /dev/null +++ b/recipes-graphics/imx-gpu-sdk/libxdg-shell/0001-xdg-shell-Add-CMake-minimum.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From 6e38ee09378bfa7edc97528967f0dd0bd810f2c6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 3 | Date: Thu, 9 Oct 2025 08:29:44 -0500 | ||
| 4 | Subject: [PATCH] xdg-shell: Add CMake minimum | ||
| 5 | |||
| 6 | The build is broken: | ||
| 7 | ``` | ||
| 8 | | CMake Error in CMakeLists.txt: | ||
| 9 | | No cmake_minimum_required command is present. A line of code such as | ||
| 10 | | | ||
| 11 | | cmake_minimum_required(VERSION 4.1) | ||
| 12 | | | ||
| 13 | | should be added at the top of the file. The version specified may be lower | ||
| 14 | | if you wish to support older CMake versions for this project. For more | ||
| 15 | | information run "cmake --help-policy CMP0000". | ||
| 16 | ``` | ||
| 17 | |||
| 18 | Upstream-Status: Pending | ||
| 19 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 20 | --- | ||
| 21 | CMakeLists.txt | 2 ++ | ||
| 22 | 1 file changed, 2 insertions(+) | ||
| 23 | |||
| 24 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 25 | index 8d39c6c5..5cb52e32 100644 | ||
| 26 | --- a/CMakeLists.txt | ||
| 27 | +++ b/CMakeLists.txt | ||
| 28 | @@ -1,5 +1,7 @@ | ||
| 29 | # Generate the client header and glue library from xdg-shell.xml | ||
| 30 | |||
| 31 | +cmake_minimum_required(VERSION 3.5) | ||
| 32 | + | ||
| 33 | include(FindPkgConfig) | ||
| 34 | |||
| 35 | if (NOT DEFINED WAYLAND_PROTOCOLS_DIR) | ||
| 36 | -- | ||
| 37 | 2.34.1 | ||
| 38 | |||
diff --git a/recipes-graphics/rapidopencl/rapidopencl_1.1.0.1.bb b/recipes-graphics/rapidopencl/rapidopencl_1.1.0.1.bb new file mode 100644 index 000000000..d4200d394 --- /dev/null +++ b/recipes-graphics/rapidopencl/rapidopencl_1.1.0.1.bb | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | SUMMARY = "Experimental low level header only C++11 RAII wrapper classes for the OpenCL API" | ||
| 2 | LICENSE = "BSD-3-Clause" | ||
| 3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b98f636daed34d12d11e25f3185c0204" | ||
| 4 | |||
| 5 | SRC_URI = "git://github.com/Unarmed1000/RapidOpenCL;protocol=https;branch=master \ | ||
| 6 | " | ||
| 7 | SRCREV = "21254804a56ae96e8385c2652733c338d62da04f" | ||
| 8 | |||
| 9 | # RapidOpenCL is a header-only C++11 RAII wrapper class, so the main package will be empty. | ||
| 10 | |||
| 11 | do_install () { | ||
| 12 | install -d ${D}${includedir} | ||
| 13 | cp -r ${S}/include/* ${D}${includedir} | ||
| 14 | } | ||
| 15 | |||
| 16 | ALLOW_EMPTY:${PN} = "1" | ||
diff --git a/recipes-graphics/rapidopenvx/rapidopenvx_1.1.0.bb b/recipes-graphics/rapidopenvx/rapidopenvx_1.1.0.bb new file mode 100644 index 000000000..049fca0fd --- /dev/null +++ b/recipes-graphics/rapidopenvx/rapidopenvx_1.1.0.bb | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | SUMMARY = "Low level header only C++11 RAII wrapper classes for the OpenVX API" | ||
| 2 | LICENSE = "BSD-3-Clause" | ||
| 3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b98f636daed34d12d11e25f3185c0204" | ||
| 4 | |||
| 5 | SRC_URI = "git://github.com/Unarmed1000/RapidOpenVX;protocol=https;branch=master \ | ||
| 6 | " | ||
| 7 | SRCREV = "909c7abbff0ee35610f07f6fadeaf3a2eadce36e" | ||
| 8 | |||
| 9 | do_install () { | ||
| 10 | install -d ${D}${includedir} | ||
| 11 | cp -r ${S}/include/* ${D}${includedir} | ||
| 12 | } | ||
| 13 | |||
| 14 | ALLOW_EMPTY:${PN} = "1" | ||
diff --git a/recipes-graphics/rapidvulkan/rapidvulkan_1.2.162.0.bb b/recipes-graphics/rapidvulkan/rapidvulkan_1.2.162.0.bb new file mode 100644 index 000000000..86ec697d2 --- /dev/null +++ b/recipes-graphics/rapidvulkan/rapidvulkan_1.2.162.0.bb | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | SUMMARY = "Low level header only C++11 RAII wrapper classes for the Vulkan API" | ||
| 2 | LICENSE = "BSD-3-Clause" | ||
| 3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b98f636daed34d12d11e25f3185c0204" | ||
| 4 | |||
| 5 | DEPENDS = "vulkan-loader" | ||
| 6 | |||
| 7 | SRC_URI = "git://github.com/Unarmed1000/RapidVulkan;protocol=https;branch=master" | ||
| 8 | SRCREV = "e39a407c5ae880792d8843ada65a19dd26b3dca7" | ||
| 9 | |||
| 10 | |||
| 11 | inherit cmake | ||
| 12 | |||
| 13 | ALLOW_EMPTY:${PN} = "1" | ||
diff --git a/recipes-graphics/vulkan/assimp/0001-X3D-Fix-invalid-vector-back-usage-6283.patch b/recipes-graphics/vulkan/assimp/0001-X3D-Fix-invalid-vector-back-usage-6283.patch new file mode 100644 index 000000000..1b2bb5b1a --- /dev/null +++ b/recipes-graphics/vulkan/assimp/0001-X3D-Fix-invalid-vector-back-usage-6283.patch | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | From 59bc03d931270b6354690512d0c881eec8b97678 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Kim Kulling <kimkulling@users.noreply.github.com> | ||
| 3 | Date: Fri, 25 Jul 2025 15:01:16 +0200 | ||
| 4 | Subject: [PATCH] X3D: Fix invalid vector::back usage (#6283) | ||
| 5 | |||
| 6 | * X3D: Fix invalid vector::back usage | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/assimp/assimp/commit/59bc03d931270b6354690512d0c881eec8b97678] | ||
| 9 | --- | ||
| 10 | code/AssetLib/X3D/X3DGeoHelper.cpp | 14 ++++++++++---- | ||
| 11 | 1 file changed, 10 insertions(+), 4 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/code/AssetLib/X3D/X3DGeoHelper.cpp b/code/AssetLib/X3D/X3DGeoHelper.cpp | ||
| 14 | index 1c962a460..b90956d2c 100644 | ||
| 15 | --- a/code/AssetLib/X3D/X3DGeoHelper.cpp | ||
| 16 | +++ b/code/AssetLib/X3D/X3DGeoHelper.cpp | ||
| 17 | @@ -128,13 +128,17 @@ void X3DGeoHelper::rect_parallel_epiped(const aiVector3D &pSize, std::list<aiVec | ||
| 18 | |||
| 19 | #undef MESH_RectParallelepiped_CREATE_VERT | ||
| 20 | |||
| 21 | +static constexpr int InvalidIndex = -1; | ||
| 22 | + | ||
| 23 | void X3DGeoHelper::coordIdx_str2faces_arr(const std::vector<int32_t> &pCoordIdx, std::vector<aiFace> &pFaces, unsigned int &pPrimitiveTypes) { | ||
| 24 | std::vector<int32_t> f_data(pCoordIdx); | ||
| 25 | std::vector<unsigned int> inds; | ||
| 26 | unsigned int prim_type = 0; | ||
| 27 | |||
| 28 | - if (f_data.back() != (-1)) { | ||
| 29 | - f_data.push_back(-1); | ||
| 30 | + if (!f_data.empty()) { | ||
| 31 | + if (f_data.back() != InvalidIndex) { | ||
| 32 | + f_data.push_back(InvalidIndex); | ||
| 33 | + } | ||
| 34 | } | ||
| 35 | |||
| 36 | // reserve average size. | ||
| 37 | @@ -191,8 +195,10 @@ mg_m_err: | ||
| 38 | void X3DGeoHelper::coordIdx_str2lines_arr(const std::vector<int32_t> &pCoordIdx, std::vector<aiFace> &pFaces) { | ||
| 39 | std::vector<int32_t> f_data(pCoordIdx); | ||
| 40 | |||
| 41 | - if (f_data.back() != (-1)) { | ||
| 42 | - f_data.push_back(-1); | ||
| 43 | + if (!f_data.empty()) { | ||
| 44 | + if (f_data.back() != InvalidIndex) { | ||
| 45 | + f_data.push_back(InvalidIndex); | ||
| 46 | + } | ||
| 47 | } | ||
| 48 | |||
| 49 | // reserve average size. | ||
| 50 | -- | ||
| 51 | 2.34.1 | ||
| 52 | |||
diff --git a/recipes-graphics/vulkan/assimp_5.4.3.bb b/recipes-graphics/vulkan/assimp_5.4.3.bb new file mode 100644 index 000000000..ff4fb7719 --- /dev/null +++ b/recipes-graphics/vulkan/assimp_5.4.3.bb | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | DESCRIPTION = "Open Asset Import Library is a portable Open Source library to import \ | ||
| 2 | various well-known 3D model formats in a uniform manner." | ||
| 3 | HOMEPAGE = "http://www.assimp.org/" | ||
| 4 | SECTION = "devel" | ||
| 5 | |||
| 6 | LICENSE = "BSD-3-Clause" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d9d5275cab4fb13ae624d42ce64865de" | ||
| 8 | |||
| 9 | DEPENDS = "zlib" | ||
| 10 | |||
| 11 | SRC_URI = "git://github.com/assimp/assimp.git;protocol=https;branch=master \ | ||
| 12 | file://0001-X3D-Fix-invalid-vector-back-usage-6283.patch" | ||
| 13 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>(\d+(\.\d+)+))" | ||
| 14 | |||
| 15 | SRCREV = "c35200e38ea8f058812b83de2ef32c6093b0ece2" | ||
| 16 | |||
| 17 | inherit cmake | ||
| 18 | |||
| 19 | do_unpack:append() { | ||
| 20 | bb.build.exec_func('remove_non_compliant_source', d) | ||
| 21 | } | ||
| 22 | |||
| 23 | remove_non_compliant_source() { | ||
| 24 | # Remove non-compliant files manually. A patch file cannot be used | ||
| 25 | # since many of the files are binary. | ||
| 26 | rm -rf ${S}/test/models-nonbsd ${S}/scripts/StepImporter/schema_ifc2x3.exp | ||
| 27 | } | ||
| 28 | |||
| 29 | EXTRA_OECMAKE = "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DASSIMP_LIB_INSTALL_DIR=${baselib}" | ||
| 30 | |||
| 31 | BBCLASSEXTEND = "native nativesdk" | ||
| 32 | |||
| 33 | # Work around do_package_qa error | ||
| 34 | INSANE_SKIP:${PN}-dev += "buildpaths" | ||
