summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2025-08-15 14:48:31 -0500
committerTom Hochstein <tom.hochstein@nxp.com>2025-08-26 10:10:21 -0500
commit5717bf74121ca3f0c6d3c7c8194e85e0626f0760 (patch)
tree0e521781b7619c01e13635947d419b7dd51a7fe6
parente90033778bce73089ca5e7d12960eb8127e8b22f (diff)
downloadmeta-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>
-rw-r--r--conf/machine/include/imx-base.inc1
-rw-r--r--recipes-downgrade/glslang/glslang/0001-generate-glslang-pkg-config.patch46
-rw-r--r--recipes-downgrade/glslang/glslang/0002-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch33
-rw-r--r--recipes-downgrade/glslang/glslang_1.3.275.0.imx.bb36
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
590PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.123.imx" 590PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.123.imx"
591 591
592PREFERRED_VERSION_glslang:imxvulkan ??= "1.3.275.0.imx"
592PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.275.0.imx" 593PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.275.0.imx"
593PREFERRED_VERSION_spirv-tools:imxvulkan ??= "1.3.275.0.imx" 594PREFERRED_VERSION_spirv-tools:imxvulkan ??= "1.3.275.0.imx"
594PREFERRED_VERSION_vulkan-headers:imxvulkan ??= "1.3.275.0.imx" 595PREFERRED_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 @@
1From 4cede5edcff96134baf35953d58595c4aa5f1fc5 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 7 Feb 2021 01:30:39 +0000
4Subject: [PATCH] generate glslang pkg-config
5
6Based on https://src.fedoraproject.org/rpms/glslang/blob/main/f/0001-pkg-config-compatibility.patch
7
8Upstream-Status: Inappropriate [independently developed patch submitted at https://github.com/KhronosGroup/glslang/pull/3371]
9
10Signed-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
17diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
18index 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
30diff --git a/glslang/glslang.pc.cmake.in b/glslang/glslang.pc.cmake.in
31new file mode 100644
32index 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 @@
1From e40c14a3e007fac0e4f2e4164fdf14d1712355bd Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Fri, 2 Aug 2024 22:44:21 +0100
4Subject: [PATCH] SPIRV/SpvBuilder.h: add missing <cstdint> include
5
6Without 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
16Upstream-Status: Backport [https://github.com/KhronosGroup/glslang/commit/e40c14a3e007fac0e4f2e4164fdf14d1712355bd]
17Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
18
19diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h
20index 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--
322.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 @@
1SUMMARY = "OpenGL / OpenGL ES Reference Compiler"
2DESCRIPTION = "Glslang is the official reference compiler front end for the \
3OpenGL ES and OpenGL shading languages. It implements a strict interpretation \
4of the specifications for these languages. It is open and free for anyone to use, \
5either from a command line or programmatically."
6SECTION = "graphics"
7HOMEPAGE = "https://www.khronos.org/opengles/sdk/tools/Reference-Compiler"
8LICENSE = "BSD-3-Clause & BSD-2-Clause & MIT & Apache-2.0 & GPL-3-with-bison-exception"
9LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2a2b5acd7bc4844964cfda45fe807dc3"
10
11SRCREV = "a91631b260cba3f22858d6c6827511e636c2458a"
12SRC_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"
15PE = "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.
21UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
22
23inherit cmake python3native
24
25DEPENDS = "spirv-tools"
26
27EXTRA_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
36BBCLASSEXTEND = "native nativesdk"