diff options
| author | Tom Hochstein <tom.hochstein@nxp.com> | 2025-08-15 14:48:31 -0500 |
|---|---|---|
| committer | Tom Hochstein <tom.hochstein@nxp.com> | 2025-08-26 10:10:21 -0500 |
| commit | 5717bf74121ca3f0c6d3c7c8194e85e0626f0760 (patch) | |
| tree | 0e521781b7619c01e13635947d419b7dd51a7fe6 | |
| parent | e90033778bce73089ca5e7d12960eb8127e8b22f (diff) | |
| download | meta-freescale-5717bf74121ca3f0c6d3c7c8194e85e0626f0760.tar.gz | |
glslang: Align with Vulkan downgrade 1.3.275.0.imx
The current glslang fails to compile.
```
| /.../SPIRV/SpvTools.cpp: In function 'spv_target_env glslang::MapToSpirvToolsEnv(const SpvVersion&, spv::SpvBuildLogger*)':
| /.../SPIRV/SpvTools.cpp:75:32: error: 'SPV_ENV_VULKAN_1_4' is not a member of 'spv_target_env'
| 75 | return spv_target_env::SPV_ENV_VULKAN_1_4;
| | ^~~~~~~~~~~~~~~~~~
| /.../SPIRV/SpvTools.cpp: In function 'void glslang::SpirvToolsValidate(const TIntermediate&, std::vector<unsigned int>&, spv::SpvBuildLogger*, bool)':
| /.../SPIRV/SpvTools.cpp:168:5: error: 'spvValidatorOptionsSetAllowOffsetTextureOperand' was not declared in this scope
| 168 | spvValidatorOptionsSetAllowOffsetTextureOperand(options, intermediate.usingTextureOffsetNonConst());
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Downgrade to 1.3.275.0 to align with the existing Vulkan downgrade.
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
4 files changed, 116 insertions, 0 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 6d1671a77..8605d7c03 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
| @@ -589,6 +589,7 @@ PREFERRED_VERSION_xwayland:imx-nxp-bsp ??= "24.1.6.imx" | |||
| 589 | # Use i.MX libdrm Version | 589 | # Use i.MX libdrm Version |
| 590 | PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.123.imx" | 590 | PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.123.imx" |
| 591 | 591 | ||
| 592 | PREFERRED_VERSION_glslang:imxvulkan ??= "1.3.275.0.imx" | ||
| 592 | PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.275.0.imx" | 593 | PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.275.0.imx" |
| 593 | PREFERRED_VERSION_spirv-tools:imxvulkan ??= "1.3.275.0.imx" | 594 | PREFERRED_VERSION_spirv-tools:imxvulkan ??= "1.3.275.0.imx" |
| 594 | PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.3.275.0.imx" | 595 | PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.3.275.0.imx" |
diff --git a/recipes-downgrade/glslang/glslang/0001-generate-glslang-pkg-config.patch b/recipes-downgrade/glslang/glslang/0001-generate-glslang-pkg-config.patch new file mode 100644 index 000000000..337a999bf --- /dev/null +++ b/recipes-downgrade/glslang/glslang/0001-generate-glslang-pkg-config.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 4cede5edcff96134baf35953d58595c4aa5f1fc5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 3 | Date: Sun, 7 Feb 2021 01:30:39 +0000 | ||
| 4 | Subject: [PATCH] generate glslang pkg-config | ||
| 5 | |||
| 6 | Based on https://src.fedoraproject.org/rpms/glslang/blob/main/f/0001-pkg-config-compatibility.patch | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [independently developed patch submitted at https://github.com/KhronosGroup/glslang/pull/3371] | ||
| 9 | |||
| 10 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 11 | --- | ||
| 12 | glslang/CMakeLists.txt | 2 ++ | ||
| 13 | glslang/glslang.pc.cmake.in | 11 +++++++++++ | ||
| 14 | 2 files changed, 13 insertions(+) | ||
| 15 | create mode 100644 glslang/glslang.pc.cmake.in | ||
| 16 | |||
| 17 | diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt | ||
| 18 | index 37eecaad..6974935c 100644 | ||
| 19 | --- a/glslang/CMakeLists.txt | ||
| 20 | +++ b/glslang/CMakeLists.txt | ||
| 21 | @@ -251,6 +251,8 @@ if(PROJECT_IS_TOP_LEVEL) | ||
| 22 | ") | ||
| 23 | install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) | ||
| 24 | endif() | ||
| 25 | + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/glslang.pc.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc @ONLY) | ||
| 26 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/glslang.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) | ||
| 27 | |||
| 28 | set(PUBLIC_HEADERS | ||
| 29 | Public/ResourceLimits.h | ||
| 30 | diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in | ||
| 31 | new file mode 100644 | ||
| 32 | index 00000000..43104e68 | ||
| 33 | --- /dev/null | ||
| 34 | +++ b/glslang/glslang.pc.cmake.in | ||
| 35 | @@ -0,0 +1,11 @@ | ||
| 36 | +prefix=@CMAKE_INSTALL_PREFIX@ | ||
| 37 | +exec_prefix=@CMAKE_INSTALL_PREFIX@ | ||
| 38 | +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
| 39 | +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
| 40 | + | ||
| 41 | +Name: @PROJECT_NAME@ | ||
| 42 | +Description: OpenGL and OpenGL ES shader front end and validator | ||
| 43 | +Requires: | ||
| 44 | +Version: @GLSLANG_VERSION@ | ||
| 45 | +Libs: -L${libdir} -lglslang -lHLSL -lSPVRemapper | ||
| 46 | +Cflags: -I${includedir} | ||
diff --git a/recipes-downgrade/glslang/glslang/0002-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch b/recipes-downgrade/glslang/glslang/0002-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch new file mode 100644 index 000000000..9f9270e6e --- /dev/null +++ b/recipes-downgrade/glslang/glslang/0002-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From e40c14a3e007fac0e4f2e4164fdf14d1712355bd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sergei Trofimovich <slyich@gmail.com> | ||
| 3 | Date: Fri, 2 Aug 2024 22:44:21 +0100 | ||
| 4 | Subject: [PATCH] SPIRV/SpvBuilder.h: add missing <cstdint> include | ||
| 5 | |||
| 6 | Without the change `glslang` build fails on upcoming `gcc-15` as: | ||
| 7 | |||
| 8 | In file included from /build/source/SPIRV/GlslangToSpv.cpp:45: | ||
| 9 | SPIRV/SpvBuilder.h:248:30: error: 'uint32_t' has not been declared | ||
| 10 | 248 | Id makeDebugLexicalBlock(uint32_t line); | ||
| 11 | | ^~~~~~~~ | ||
| 12 | --- | ||
| 13 | SPIRV/SpvBuilder.h | 1 + | ||
| 14 | 1 file changed, 1 insertion(+) | ||
| 15 | |||
| 16 | Upstream-Status: Backport [https://github.com/KhronosGroup/glslang/commit/e40c14a3e007fac0e4f2e4164fdf14d1712355bd] | ||
| 17 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 18 | |||
| 19 | diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h | ||
| 20 | index f86dd81b3..d688436a6 100644 | ||
| 21 | --- a/SPIRV/SpvBuilder.h | ||
| 22 | +++ b/SPIRV/SpvBuilder.h | ||
| 23 | @@ -56,6 +56,7 @@ namespace spv { | ||
| 24 | } | ||
| 25 | |||
| 26 | #include <algorithm> | ||
| 27 | +#include <cstdint> | ||
| 28 | #include <map> | ||
| 29 | #include <memory> | ||
| 30 | #include <set> | ||
| 31 | -- | ||
| 32 | 2.34.1 | ||
| 33 | |||
diff --git a/recipes-downgrade/glslang/glslang_1.3.275.0.imx.bb b/recipes-downgrade/glslang/glslang_1.3.275.0.imx.bb new file mode 100644 index 000000000..7b3c2f606 --- /dev/null +++ b/recipes-downgrade/glslang/glslang_1.3.275.0.imx.bb | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | SUMMARY = "OpenGL / OpenGL ES Reference Compiler" | ||
| 2 | DESCRIPTION = "Glslang is the official reference compiler front end for the \ | ||
| 3 | OpenGL ES and OpenGL shading languages. It implements a strict interpretation \ | ||
| 4 | of the specifications for these languages. It is open and free for anyone to use, \ | ||
| 5 | either from a command line or programmatically." | ||
| 6 | SECTION = "graphics" | ||
| 7 | HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler" | ||
| 8 | LICENSE = "BSD-3-Clause & BSD-2-Clause & MIT & Apache-2.0 & GPL-3-with-bison-exception" | ||
| 9 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2a2b5acd7bc4844964cfda45fe807dc3" | ||
| 10 | |||
| 11 | SRCREV = "a91631b260cba3f22858d6c6827511e636c2458a" | ||
| 12 | SRC_URI = "git://github.com/KhronosGroup/glslang.git;protocol=https;branch=main \ | ||
| 13 | file://0001-generate-glslang-pkg-config.patch \ | ||
| 14 | file://0002-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch" | ||
| 15 | PE = "1" | ||
| 16 | # These recipes need to be updated in lockstep with each other: | ||
| 17 | # glslang, vulkan-headers, vulkan-loader, vulkan-tools, spirv-headers, spirv-tools | ||
| 18 | # vulkan-validation-layers, vulkan-utility-libraries. | ||
| 19 | # The tags versions should always be sdk-x.y.z, as this is what | ||
| 20 | # upstream considers a release. | ||
| 21 | UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)" | ||
| 22 | |||
| 23 | inherit cmake python3native | ||
| 24 | |||
| 25 | DEPENDS = "spirv-tools" | ||
| 26 | |||
| 27 | EXTRA_OECMAKE = " \ | ||
| 28 | -DCMAKE_BUILD_TYPE=Release \ | ||
| 29 | -DBUILD_SHARED_LIBS=ON \ | ||
| 30 | -DENABLE_PCH=OFF \ | ||
| 31 | -DENABLE_CTEST=OFF \ | ||
| 32 | -DBUILD_EXTERNAL=OFF \ | ||
| 33 | -DALLOW_EXTERNAL_SPIRV_TOOLS=ON \ | ||
| 34 | " | ||
| 35 | |||
| 36 | BBCLASSEXTEND = "native nativesdk" | ||
