Skip to contentSkip to conversation

package/libdrm: add host variant

PATCH In review Bernd Kuhls 3 participants 10 messages Aug 22, 2024 – Sep 22, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 package/libdrm: add host variant

Needed for mesa3d bump to 24.1.0.

---
 package/libdrm/libdrm.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
package/libdrm/libdrm.mk +21 -0
index ea956de15b..1cf754227e 100644
@@ -116,4 +116,25 @@ else
 LIBDRM_CONF_OPTS += -Dtests=false
 endif
 
+HOST_LIBDRM_CONF_OPTS = \
+	-Damdgpu=disabled \
+	-Dcairo-tests=disabled \
+	-Detnaviv=disabled \
+	-Dexynos=disabled \
+	-Dfreedreno=disabled \
+	-Dfreedreno-kgsl=false \
+	-Dinstall-test-programs=false \
+	-Dintel=disabled \
+	-Dman-pages=disabled \
+	-Dnouveau=disabled \
+	-Domap=disabled \
+	-Dradeon=disabled \
+	-Dtegra=disabled \
+	-Dvc4=disabled \
+	-Dvmwgfx=disabled \
+	-Dtests=false \
+	-Dudev=false \
+	-Dvalgrind=disabled
+
 $(eval $(meson-package))
+$(eval $(host-meson-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/6 package/llvm-project/libclc: add host variant

Needed for mesa3d bump to 24.1.0.

---
 package/llvm-project/libclc/libclc.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/llvm-project/libclc/libclc.mk +5 -0
index 9f303d6d2f..cfa978a8ac 100644
@@ -11,6 +11,7 @@ LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT
 LIBCLC_LICENSE_FILES = LICENSE.TXT
 
 LIBCLC_DEPENDENCIES = host-clang host-llvm host-spirv-llvm-translator
+HOST_LIBCLC_DEPENDENCIES = host-clang host-llvm host-spirv-llvm-translator
 LIBCLC_INSTALL_STAGING = YES
 
 # CMAKE_*_COMPILER_FORCED=ON skips testing the tools and assumes
@@ -39,4 +40,8 @@ LIBCLC_CONF_OPTS = \
 	-DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" \
 	-DLLVM_CONFIG="$(HOST_DIR)/bin/llvm-config"
 
+HOST_LIBCLC_CONF_OPTS = \
+	-DLIBCLC_TARGETS_TO_BUILD=spirv64-mesa3d-
+
 $(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

PATCH 3/6 package/spirv-llvm-translator: add target variant to provide LLVMSPIRVLib

In reply to Bernd Kuhls

From: Romain Naour <[email protected]>

This target version is needed for Rusticl which is an LLVM based OpenCL framework[1]. Rusticl allow programs to compile OpenCL C/C++ code at runtime with Clang. Clang generates LLVM IR which is translated into SPIR-V by spirv-llvm-translator. Finally, mesa can use its internal tools to manage SPIR-V.

[1]: https://docs.mesa3d.org/rusticl.html

---
 package/Config.in                             |  1 +
 package/spirv-llvm-translator/Config.in       | 22 +++++++++++++++++++
 .../spirv-llvm-translator.mk                  | 10 +++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/spirv-llvm-translator/Config.in
package/Config.in +1 -0
index bb155b5734..930910789d 100644
@@ -337,6 +337,7 @@ comment "Graphic applications"
 	source "package/pngquant/Config.in"
 	source "package/qt5cinex/Config.in"
 	source "package/rrdtool/Config.in"
+	source "package/spirv-llvm-translator/Config.in"
 	source "package/spirv-tools/Config.in"
 	source "package/stellarium/Config.in"
 	source "package/sway/Config.in"
package/spirv-llvm-translator/Config.in new file +22 -0
new file mode 100644
index 0000000000..73ca787d8a
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_SPIRV_LLVM_TRANSLATOR
+	bool "spirv-translator"
+	depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_HOST_GCC_AT_LEAST_7 # host-llvm
+	select BR2_PACKAGE_LLVM
+	select BR2_PACKAGE_SPIRV_HEADERS
+	select BR2_PACKAGE_ZLIB
+	help
+	  LLVM/SPIR-V Bi-Directional Translator is a library and tool
+	  for translation between LLVM IR and SPIR-V.
+
+	  https://github.com/khronosGroup/SPIRV-LLVM-Translator
+
+comment "spirv-translator needs a toolchain w/ threads, C++, gcc >= 7, dynamic library, host gcc >= 7"
+	depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 \
+		|| BR2_STATIC_LIBS || !BR2_HOST_GCC_AT_LEAST_7
package/spirv-llvm-translator/spirv-llvm-translator.mk +10 -0
index 523890a986..ffc8a63b89 100644
@@ -19,4 +19,14 @@ HOST_SPIRV_LLVM_TRANSLATOR_CONF_OPTS = \
 	-DLLVM_EXTERNAL_PROJECTS="SPIRV-Headers" \
 	-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$(HOST_DIR)/include
 
+SPIRV_LLVM_TRANSLATOR_INSTALL_STAGING = YES
+SPIRV_LLVM_TRANSLATOR_DEPENDENCIES = host-clang host-llvm llvm spirv-headers
+SPIRV_LLVM_TRANSLATOR_CONF_OPTS = \
+	-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=$(STAGING_DIR)/usr \
+	-DLLVM_BUILD_TOOLS=ON \
+	-DLLVM_DIR=$(STAGING_DIR)/lib/cmake/llvm \
+	-DLLVM_SPIRV_BUILD_EXTERNAL=YES \
+	-DLLVM_SPIRV_INCLUDE_TESTS=OFF
+
+$(eval $(cmake-package))
 $(eval $(host-cmake-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 4/6 package/spirv-tools: add host variant

In reply to Bernd Kuhls

Needed for mesa3d bump to 24.1.0.

---
 package/spirv-tools/spirv-tools.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/spirv-tools/spirv-tools.mk +8 -0
index e863911b03..51b1c9f22a 100644
@@ -10,6 +10,7 @@ SPIRV_TOOLS_SITE = $(call github,KhronosGroup,SPIRV-Tools,sdk-$(SPIRV_TOOLS_VERS
 SPIRV_TOOLS_LICENSE = Apache-2.0
 SPIRV_TOOLS_LICENSE_FILES = LICENSE
 SPIRV_TOOLS_DEPENDENCIES = spirv-headers
+HOST_SPIRV_TOOLS_DEPENDENCIES = host-spirv-headers
 SPIRV_TOOLS_INSTALL_STAGING = YES
 
 SPIRV_TOOLS_CONF_OPTS = \
@@ -18,4 +19,11 @@ SPIRV_TOOLS_CONF_OPTS = \
 	-DSPIRV_SKIP_TESTS=ON \
 	-DSPIRV_WERROR=OFF
 
+HOST_SPIRV_TOOLS_CONF_OPTS = \
+	-DSPIRV-Headers_SOURCE_DIR=$(HOST_DIR) \
+	-DSPIRV_TOOLS_BUILD_STATIC=OFF \
+	-DSPIRV_SKIP_TESTS=ON \
+	-DSPIRV_WERROR=OFF
+
 $(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

PATCH 5/6 package/{mesa3d, mesa3d-headers}: bump version to 24.2.0

In reply to Bernd Kuhls

Release notes:
https://lists.freedesktop.org/archives/mesa-announce/2024-May/000762.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000763.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000765.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000766.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000767.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000771.html
https://lists.freedesktop.org/archives/mesa-announce/2024-August/000773.html
------------------------------------------------------------------------
Changes needed for the bump to 24.1.x:

Added dependency to llvm & Co. for iris driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=a512c2a8b572c5da360873320dbbd343c6223cd6

Added host version of mesa tool intel_clc needed for target build of the iris driver.

Added dependency to host-python-pycparser for etnaviv driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/etnaviv/hwdb/meson.build?h=24.1&id=2192e620bb0c68b75ff45165d0b117c7ecb77268

Added dependency to host-python-ply for intel vulkan driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/intel/vulkan/grl/meson.build?h=24.1&id=dc1aedef2bd054884685ad971a3ef5be07ecd101

Although this dependency exists since mesa3d 22.3 it is only needed when intel-clc is enabled, this dependency is added with this patch so no need to backport this dependency to older buildroot trees.

Update configure parameter of glvnd option due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=4f25b84b2460524d375424a81b42faa4d99c8e60
------------------------------------------------------------------------
Changes needed for the bump to 24.2.x:

Added dependency to host-python-pyyaml to host build, needed due to upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/a3813327575e8875c8c3ed24b5f45a0b7ba64446

---
 package/mesa3d-headers/mesa3d-headers.mk |  2 +-
 package/mesa3d/Config.in                 | 11 ++++-
 package/mesa3d/mesa3d.hash               |  6 +--
 package/mesa3d/mesa3d.mk                 | 51 +++++++++++++++++++-----
 4 files changed, 56 insertions(+), 14 deletions(-)
package/mesa3d-headers/mesa3d-headers.mk +1 -1
index 33c60b285f..98afb77a9c 100644
@@ -12,7 +12,7 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 24.0.9
+MESA3D_HEADERS_VERSION = 24.2.0
 MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
 MESA3D_HEADERS_SITE = https://archive.mesa3d.org
 MESA3D_HEADERS_DL_SUBDIR = mesa3d
package/mesa3d/Config.in +10 -1
index 7761b0a650..3586451bc6 100644
@@ -50,7 +50,8 @@ config BR2_PACKAGE_MESA3D_OPENCL
 	bool "OpenCL support"
 	depends on BR2_PACKAGE_MESA3D_LLVM
 	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
-		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI || \
+		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
 	select BR2_PACKAGE_LLVM_RTTI
 	select BR2_PACKAGE_CLANG
 	select BR2_PACKAGE_LIBCLC
@@ -129,10 +130,18 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
 	bool "Gallium iris driver"
 	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_PACKAGE_MESA3D_LLVM
 	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_MESA3D_OPENCL
+	select BR2_PACKAGE_SPIRV_LLVM_TRANSLATOR
+	select BR2_PACKAGE_SPIRV_TOOLS
 	help
 	  Mesa driver for iris-based Intel GPUs.
 
+comment "iris driver needs llvm"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_PACKAGE_MESA3D_LLVM
+
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA
 	bool "Gallium lima driver"
 	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
package/mesa3d/mesa3d.hash +3 -3
index d506d398b8..e98dff4f86 100644
@@ -1,5 +1,5 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2024-June/000764.html
-sha256  51aa686ca4060e38711a9e8f60c8f1efaa516baf411946ed7f2c265cd582ca4c  mesa-24.0.9.tar.xz
-sha512  de2ee6c9df1fc106ee10befe0a76be1e9cfe83d65dbdb83bad6d8d7cfaa085232fb115293a1a790b37b50b1fe14bd58aafbcfe5a15e953b5901a7105d57569a5  mesa-24.0.9.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2024-August/000774.html
+sha256  c02bb72cea290f78b11895a0c95c7c92394f180d7ff66d4a762ec6950a58addf  mesa-24.2.0.tar.xz
+sha512  a585c788801b5a341d356e44d958b148e6e14f6b3d7224e99a92faa2f004bf0cfc90103c5fdc651afb22f805c6f9dc594f9f3f5ecebcea36f6305b3a6ccb9294  mesa-24.2.0.tar.xz
 # License
 sha256  a00275a53178e2645fb65be99a785c110513446a5071ff2c698ed260ad917d75  docs/license.rst
package/mesa3d/mesa3d.mk +42 -9

87 lines not on this page · raw message

Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

Re: [Buildroot] [PATCH/next 5/6] package/{mesa3d, mesa3d-headers}: bump version to 24.2.0

Hello Bernd,

I get a build error on Ubuntu 22.04:

output/build/mesa3d-24.2.0/meson.build:171: WARNING: gallium-drivers=swrast is a deprecated alias for gallium-drivers=softpipe,llvmpipe and will be removed in version 25.0 output/build/mesa3d-24.2.0/meson.build:502: WARNING: cannot auto-detect -mtls-dialect when cross-compiling, using compiler default
Dependency libglvnd skipped: feature glvnd disabled
Dependency vdpau skipped: feature gallium-vdpau disabled
Program glslangValidator found: NO
Dependency libva skipped: feature gallium-va disabled
Program python3 found: YES (/srv/WorkSpace/opensource/buildroot/output/host/bin/python3)

output/build/mesa3d-24.2.0/meson.build:967:2: ERROR: Problem encountered: Python (3.x) yaml module (PyYAML) required to build mesa.

A full log can be found at /srv/WorkSpace/opensource/buildroot/output/build/mesa3d-24.2.0/build/meson-logs/meson-log.txt

It seems that buildroot use pythong 3.12:

output/host/bin/python3 -c 'import yaml'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'yaml'

But if i run this check with python 3.10 on my Ubuntu 22.04, there is no erro:
python3 -c 'import yaml'

I try to install PyYAML to 6.0.1, it stil run with error: pip3 install PyYAML==6.0.1

Have you ever encountered a similar problem?

Quoted 199 lines · Bernd Kuhls

Release notes:
https://lists.freedesktop.org/archives/mesa-announce/2024-May/000762.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000763.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000765.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000766.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000767.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000771.html
https://lists.freedesktop.org/archives/mesa-announce/2024-August/000773.html
------------------------------------------------------------------------
Changes needed for the bump to 24.1.x:

Added dependency to llvm & Co. for iris driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=a512c2a8b572c5da360873320dbbd343c6223cd6

Added host version of mesa tool intel_clc needed for target build of the iris driver.

Added dependency to host-python-pycparser for etnaviv driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/etnaviv/hwdb/meson.build?h=24.1&id=2192e620bb0c68b75ff45165d0b117c7ecb77268

Added dependency to host-python-ply for intel vulkan driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/intel/vulkan/grl/meson.build?h=24.1&id=dc1aedef2bd054884685ad971a3ef5be07ecd101

Although this dependency exists since mesa3d 22.3 it is only needed when intel-clc is enabled, this dependency is added with this patch so no need to backport this dependency to older buildroot trees.

Update configure parameter of glvnd option due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=4f25b84b2460524d375424a81b42faa4d99c8e60
------------------------------------------------------------------------
Changes needed for the bump to 24.2.x:

Added dependency to host-python-pyyaml to host build, needed due to upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/a3813327575e8875c8c3ed24b5f45a0b7ba64446

---

package/mesa3d-headers/mesa3d-headers.mk |  2 +-
package/mesa3d/Config.in                 | 11 ++++-
package/mesa3d/mesa3d.hash               |  6 +--
package/mesa3d/mesa3d.mk                 | 51 +++++++++++++++++++-----
4 files changed, 56 insertions(+), 14 deletions(-)
package/mesa3d-headers/mesa3d-headers.mk +1 -1
index 33c60b285f..98afb77a9c 100644
@@ -12,7 +12,7 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 24.0.9
+MESA3D_HEADERS_VERSION = 24.2.0

MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz MESA3D_HEADERS_SITE = https://archive.mesa3d.org
MESA3D_HEADERS_DL_SUBDIR = mesa3d

package/mesa3d/Config.in +2 -1
index 7761b0a650..3586451bc6 100644
@@ -50,7 +50,8 @@ config BR2_PACKAGE_MESA3D_OPENCL
 	bool "OpenCL support"
 	depends on BR2_PACKAGE_MESA3D_LLVM
 	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
-		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI || \
+		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
 	select BR2_PACKAGE_LLVM_RTTI
 	select BR2_PACKAGE_CLANG
 	select BR2_PACKAGE_LIBCLC
@@ -129,10 +130,18 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915

config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS

	bool "Gallium iris driver"
	depends on BR2_i386 || BR2_x86_64
package/mesa3d/Config.in +1 -0
+	depends on BR2_PACKAGE_MESA3D_LLVM

select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER

package/mesa3d/Config.in +3 -0
+	select BR2_PACKAGE_MESA3D_OPENCL
+	select BR2_PACKAGE_SPIRV_LLVM_TRANSLATOR
+	select BR2_PACKAGE_SPIRV_TOOLS

help
Mesa driver for iris-based Intel GPUs.

package/mesa3d/Config.in +4 -0
+comment "iris driver needs llvm"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_PACKAGE_MESA3D_LLVM
+

config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA

	bool "Gallium lima driver"
	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
package/mesa3d/mesa3d.hash +3 -3
index d506d398b8..e98dff4f86 100644
@@ -1,5 +1,5 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2024-June/000764.html
-sha256  51aa686ca4060e38711a9e8f60c8f1efaa516baf411946ed7f2c265cd582ca4c  mesa-24.0.9.tar.xz
-sha512  de2ee6c9df1fc106ee10befe0a76be1e9cfe83d65dbdb83bad6d8d7cfaa085232fb115293a1a790b37b50b1fe14bd58aafbcfe5a15e953b5901a7105d57569a5  mesa-24.0.9.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2024-August/000774.html
+sha256  c02bb72cea290f78b11895a0c95c7c92394f180d7ff66d4a762ec6950a58addf  mesa-24.2.0.tar.xz
+sha512  a585c788801b5a341d356e44d958b148e6e14f6b3d7224e99a92faa2f004bf0cfc90103c5fdc651afb22f805c6f9dc594f9f3f5ecebcea36f6305b3a6ccb9294  mesa-24.2.0.tar.xz
 # License

sha256 a00275a53178e2645fb65be99a785c110513446a5071ff2c698ed260ad917d75 docs/license.rst

package/mesa3d/mesa3d.mk +1 -1
index ce460c4475..f094fdd030 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 # When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 24.0.9
+MESA3D_VERSION = 24.2.0

MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
MESA3D_SITE = https://archive.mesa3d.org
MESA3D_LICENSE = MIT, SGI, Khronos

package/mesa3d/mesa3d.mk +4 -0
@@ -27,6 +27,10 @@ MESA3D_DEPENDENCIES = \
 
 MESA3D_CONF_OPTS = \
 	-Dgallium-omx=disabled \
+	-Dgallium-opencl=disabled \
+	-Dgallium-rusticl=false \
+	-Dmicrosoft-clc=disabled \
+	-Dopencl-spirv=false \
 	-Dpower8=disabled
 
 ifeq ($(BR2_PACKAGE_MESA3D_DRIVER)$(BR2_PACKAGE_XORG7),yy)
@@ -50,14 +54,9 @@ else

MESA3D_CONF_OPTS += -Dllvm=disabled
endif

package/mesa3d/mesa3d.mk +0 -2
-# Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
-# libMesaOpenCL and CL headers are installed

ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
MESA3D_PROVIDES += libopencl
MESA3D_DEPENDENCIES += clang libclc

package/mesa3d/mesa3d.mk +0 -3
-MESA3D_CONF_OPTS += -Dgallium-opencl=standalone
-else
-MESA3D_CONF_OPTS += -Dgallium-opencl=disabled

endif

ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)

package/mesa3d/mesa3d.mk +0 -0
@@ -126,6 +125,19 @@ MESA3D_CONF_OPTS += \
 	-Dgallium-extra-hud=true

endif

package/mesa3d/mesa3d.mk +13 -0
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
+MESA3D_DEPENDENCIES += host-python-pycparser
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL),y)
+MESA3D_DEPENDENCIES += host-python-ply
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS),y)
+MESA3D_CONF_OPTS += -Dintel-clc=system
+MESA3D_DEPENDENCIES += host-mesa3d spirv-llvm-translator spirv-tools
+endif
+

ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
MESA3D_CONF_OPTS += \
-Dvulkan-drivers=

package/mesa3d/mesa3d.mk +0 -0
@@ -251,12 +263,33 @@ endif
 ifeq ($(BR2_PACKAGE_LIBGLVND),y)
 ifneq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),)

MESA3D_DEPENDENCIES += libglvnd

package/mesa3d/mesa3d.mk +1 -1
-MESA3D_CONF_OPTS += -Dglvnd=true
+MESA3D_CONF_OPTS += -Dglvnd=enabled

else

package/mesa3d/mesa3d.mk +1 -1
-MESA3D_CONF_OPTS += -Dglvnd=false
+MESA3D_CONF_OPTS += -Dglvnd=disabled

endif
else

package/mesa3d/mesa3d.mk +1 -1
-MESA3D_CONF_OPTS += -Dglvnd=false
+MESA3D_CONF_OPTS += -Dglvnd=disabled

endif

package/mesa3d/mesa3d.mk +20 -0
+HOST_MESA3D_CONF_OPTS = \
+	-Dglvnd=disabled \
+	-Dgallium-drivers=iris \
+	-Dgallium-vdpau=disabled \
+	-Dplatforms= \
+	-Ddri3=disabled \
+	-Dglx=disabled \
+	-Dvulkan-drivers=""
+
+HOST_MESA3D_DEPENDENCIES = \
+	host-libclc \
+	host-libdrm \
+	host-python-mako \
+	host-python-pyyaml \
+	host-spirv-tools
+
+define HOST_MESA3D_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/build/src/intel/compiler/intel_clc $(HOST_DIR)/bin/intel_clc
+endef
+
Quoted 9 lines

$(eval $(meson-package))
+$(eval $(host-meson-package))

Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw

Re: [Buildroot] [PATCH/next 5/6] package/{mesa3d, mesa3d-headers}: bump version to 24.2.0

Hi Bernd,

Quoted 214 lines · Andy Yan

Hello Bernd,

I get a build error on Ubuntu 22.04:

output/build/mesa3d-24.2.0/meson.build:171: WARNING: gallium-drivers=swrast is a deprecated alias for gallium-drivers=softpipe,llvmpipe and will be removed in version 25.0 output/build/mesa3d-24.2.0/meson.build:502: WARNING: cannot auto-detect -mtls-dialect when cross-compiling, using compiler default
Dependency libglvnd skipped: feature glvnd disabled
Dependency vdpau skipped: feature gallium-vdpau disabled
Program glslangValidator found: NO
Dependency libva skipped: feature gallium-va disabled
Program python3 found: YES (/srv/WorkSpace/opensource/buildroot/output/host/bin/python3)

output/build/mesa3d-24.2.0/meson.build:967:2: ERROR: Problem encountered: Python (3.x) yaml module (PyYAML) required to build mesa.

A full log can be found at /srv/WorkSpace/opensource/buildroot/output/build/mesa3d-24.2.0/build/meson-logs/meson-log.txt

It seems that buildroot use pythong 3.12:

output/host/bin/python3 -c 'import yaml'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'yaml'

But if i run this check with python 3.10 on my Ubuntu 22.04, there is no erro: python3 -c 'import yaml'

I try to install PyYAML to 6.0.1, it stil run with error: pip3 install PyYAML==6.0.1

Have you ever encountered a similar problem?

Quoted 179 lines · Bernd Kuhls

Release notes:
https://lists.freedesktop.org/archives/mesa-announce/2024-May/000762.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000763.html
https://lists.freedesktop.org/archives/mesa-announce/2024-June/000765.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000766.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000767.html
https://lists.freedesktop.org/archives/mesa-announce/2024-July/000771.html
https://lists.freedesktop.org/archives/mesa-announce/2024-August/000773.html
------------------------------------------------------------------------
Changes needed for the bump to 24.1.x:

Added dependency to llvm & Co. for iris driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=a512c2a8b572c5da360873320dbbd343c6223cd6

Added host version of mesa tool intel_clc needed for target build of the iris driver.

Added dependency to host-python-pycparser for etnaviv driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/etnaviv/hwdb/meson.build?h=24.1&id=2192e620bb0c68b75ff45165d0b117c7ecb77268

Added dependency to host-python-ply for intel vulkan driver due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/src/intel/vulkan/grl/meson.build?h=24.1&id=dc1aedef2bd054884685ad971a3ef5be07ecd101

Although this dependency exists since mesa3d 22.3 it is only needed when intel-clc is enabled, this dependency is added with this patch so no need to backport this dependency to older buildroot trees.

Update configure parameter of glvnd option due to upstream commit:
https://cgit.freedesktop.org/mesa/mesa/commit/meson.build?h=24.1&id=4f25b84b2460524d375424a81b42faa4d99c8e60
------------------------------------------------------------------------
Changes needed for the bump to 24.2.x:

Added dependency to host-python-pyyaml to host build, needed due to upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/a3813327575e8875c8c3ed24b5f45a0b7ba64446

---

package/mesa3d-headers/mesa3d-headers.mk |  2 +-
package/mesa3d/Config.in                 | 11 ++++-
package/mesa3d/mesa3d.hash               |  6 +--
package/mesa3d/mesa3d.mk                 | 51 +++++++++++++++++++-----
4 files changed, 56 insertions(+), 14 deletions(-)
package/mesa3d-headers/mesa3d-headers.mk +1 -1
index 33c60b285f..98afb77a9c 100644
@@ -12,7 +12,7 @@ endif
 
 # Not possible to directly refer to mesa3d variables, because of
 # first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 24.0.9
+MESA3D_HEADERS_VERSION = 24.2.0

MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz MESA3D_HEADERS_SITE = https://archive.mesa3d.org
MESA3D_HEADERS_DL_SUBDIR = mesa3d

package/mesa3d/Config.in +2 -1
index 7761b0a650..3586451bc6 100644
@@ -50,7 +50,8 @@ config BR2_PACKAGE_MESA3D_OPENCL
 	bool "OpenCL support"
 	depends on BR2_PACKAGE_MESA3D_LLVM
 	depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 || \
-		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
+		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI || \
+		BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS
 	select BR2_PACKAGE_LLVM_RTTI
 	select BR2_PACKAGE_CLANG
 	select BR2_PACKAGE_LIBCLC
@@ -129,10 +130,18 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915

config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS

	bool "Gallium iris driver"
	depends on BR2_i386 || BR2_x86_64
package/mesa3d/Config.in +1 -0
+	depends on BR2_PACKAGE_MESA3D_LLVM

select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER

package/mesa3d/Config.in +3 -0
+	select BR2_PACKAGE_MESA3D_OPENCL
+	select BR2_PACKAGE_SPIRV_LLVM_TRANSLATOR
+	select BR2_PACKAGE_SPIRV_TOOLS

help
Mesa driver for iris-based Intel GPUs.

package/mesa3d/Config.in +4 -0
+comment "iris driver needs llvm"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_PACKAGE_MESA3D_LLVM
+

config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA

	bool "Gallium lima driver"
	depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
package/mesa3d/mesa3d.hash +3 -3
index d506d398b8..e98dff4f86 100644
@@ -1,5 +1,5 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2024-June/000764.html
-sha256  51aa686ca4060e38711a9e8f60c8f1efaa516baf411946ed7f2c265cd582ca4c  mesa-24.0.9.tar.xz
-sha512  de2ee6c9df1fc106ee10befe0a76be1e9cfe83d65dbdb83bad6d8d7cfaa085232fb115293a1a790b37b50b1fe14bd58aafbcfe5a15e953b5901a7105d57569a5  mesa-24.0.9.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2024-August/000774.html
+sha256  c02bb72cea290f78b11895a0c95c7c92394f180d7ff66d4a762ec6950a58addf  mesa-24.2.0.tar.xz
+sha512  a585c788801b5a341d356e44d958b148e6e14f6b3d7224e99a92faa2f004bf0cfc90103c5fdc651afb22f805c6f9dc594f9f3f5ecebcea36f6305b3a6ccb9294  mesa-24.2.0.tar.xz
 # License

sha256 a00275a53178e2645fb65be99a785c110513446a5071ff2c698ed260ad917d75 docs/license.rst

package/mesa3d/mesa3d.mk +1 -1
index ce460c4475..f094fdd030 100644
@@ -5,7 +5,7 @@
 ################################################################################
 
 # When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 24.0.9
+MESA3D_VERSION = 24.2.0

MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
MESA3D_SITE = https://archive.mesa3d.org
MESA3D_LICENSE = MIT, SGI, Khronos

package/mesa3d/mesa3d.mk +4 -0
@@ -27,6 +27,10 @@ MESA3D_DEPENDENCIES = \
 
 MESA3D_CONF_OPTS = \
 	-Dgallium-omx=disabled \
+	-Dgallium-opencl=disabled \
+	-Dgallium-rusticl=false \
+	-Dmicrosoft-clc=disabled \
+	-Dopencl-spirv=false \
 	-Dpower8=disabled
 
 ifeq ($(BR2_PACKAGE_MESA3D_DRIVER)$(BR2_PACKAGE_XORG7),yy)
@@ -50,14 +54,9 @@ else

MESA3D_CONF_OPTS += -Dllvm=disabled
endif

package/mesa3d/mesa3d.mk +0 -2
-# Disable opencl-icd: OpenCL lib will be named libOpenCL instead of
-# libMesaOpenCL and CL headers are installed

ifeq ($(BR2_PACKAGE_MESA3D_OPENCL),y)
MESA3D_PROVIDES += libopencl
MESA3D_DEPENDENCIES += clang libclc

package/mesa3d/mesa3d.mk +0 -3
-MESA3D_CONF_OPTS += -Dgallium-opencl=standalone
-else
-MESA3D_CONF_OPTS += -Dgallium-opencl=disabled

endif

ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS),y)

package/mesa3d/mesa3d.mk +0 -0
@@ -126,6 +125,19 @@ MESA3D_CONF_OPTS += \
 	-Dgallium-extra-hud=true

endif

package/mesa3d/mesa3d.mk +13 -0
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
+MESA3D_DEPENDENCIES += host-python-pycparser
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL),y)
+MESA3D_DEPENDENCIES += host-python-ply
+endif
+
+ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS),y)
+MESA3D_CONF_OPTS += -Dintel-clc=system
+MESA3D_DEPENDENCIES += host-mesa3d spirv-llvm-translator spirv-tools
+endif
+

ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),)
MESA3D_CONF_OPTS += \
-Dvulkan-drivers=

package/mesa3d/mesa3d.mk +0 -0
@@ -251,12 +263,33 @@ endif
 ifeq ($(BR2_PACKAGE_LIBGLVND),y)
 ifneq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),)

MESA3D_DEPENDENCIES += libglvnd

package/mesa3d/mesa3d.mk +1 -1
-MESA3D_CONF_OPTS += -Dglvnd=true
+MESA3D_CONF_OPTS += -Dglvnd=enabled

else

package/mesa3d/mesa3d.mk +1 -1
-MESA3D_CONF_OPTS += -Dglvnd=false
+MESA3D_CONF_OPTS += -Dglvnd=disabled

endif
else

package/mesa3d/mesa3d.mk +1 -1
-MESA3D_CONF_OPTS += -Dglvnd=false
+MESA3D_CONF_OPTS += -Dglvnd=disabled

endif

Quoted 14 lines
Quoted 4 lines
package/mesa3d/mesa3d.mk +4 -0
+HOST_MESA3D_CONF_OPTS = \
+	-Dglvnd=disabled \
+	-Dgallium-drivers=iris \
+	-Dgallium-vdpau=disabled \

package/mesa3d/mesa3d.mk endif · line 287

Quoted 10 lines
package/mesa3d/mesa3d.mk +10 -0
+	-Dplatforms= \
+	-Ddri3=disabled \
+	-Dglx=disabled \
+	-Dvulkan-drivers=""
+
+HOST_MESA3D_DEPENDENCIES = \
+	host-libclc \
+	host-libdrm \
+	host-python-mako \
+	host-python-pyyaml \

I found the build error was gone when I add host-python-pyyaml to MESA3D_DEPENDENCIES, Should this be added there ?

Quoted 11 lines
Quoted 11 lines
package/mesa3d/mesa3d.mk +6 -0
+	host-spirv-tools
+
+define HOST_MESA3D_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/build/src/intel/compiler/intel_clc $(HOST_DIR)/bin/intel_clc
+endef
+

$(eval $(meson-package))
+$(eval $(host-meson-package))

Signature · 1 line
2.39.2
Quoted 4 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#7 lore raw

Re: [Buildroot] [PATCH/next 5/6] package/{mesa3d, mesa3d-headers}: bump version to 24.2.0

Amndi, All,

On 2024-09-16 16:09 +0800, Andy Yan spake thusly:

Quoted 11 lines
Quoted 10 lines · Andy Yan

I get a build error on Ubuntu 22.04:

output/build/mesa3d-24.2.0/meson.build:171: WARNING: gallium-drivers=swrast is a deprecated alias for gallium-drivers=softpipe,llvmpipe and will be removed in version 25.0 output/build/mesa3d-24.2.0/meson.build:502: WARNING: cannot auto-detect -mtls-dialect when cross-compiling, using compiler default
Dependency libglvnd skipped: feature glvnd disabled
Dependency vdpau skipped: feature gallium-vdpau disabled
Program glslangValidator found: NO
Dependency libva skipped: feature gallium-va disabled
Program python3 found: YES (/srv/WorkSpace/opensource/buildroot/output/host/bin/python3)

Quoted 1 line
Quoted 1 line

output/build/mesa3d-24.2.0/meson.build:967:2: ERROR: Problem encountered: Python (3.x) yaml module (PyYAML) required to build mesa.

[--SNIP--]

Quoted 2 lines

I found the build error was gone when I add host-python-pyyaml to MESA3D_DEPENDENCIES, Should this be added there ?

It should indeed probably be added, but conditionally, i.e. only when the affected driver is enabled, somnething like:

    ifeq ($(BR2_PACKAGE_MESA3D_XXXX),y)
    MESA3D_DEPENDENCIES += host-python-pyyaml
    ...
    endif

Reuse an existing conditional block.

Regards,
Yann E. MORIN.

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): ZuiEAeBfrMsUWAjC__26229.9065290549$1726514217$gmane$org@landeda

#9 lore raw

Re: [Buildroot] [PATCH/next 5/6] package/{mesa3d, mesa3d-headers}: bump version to 24.2.0

Am Mon, 16 Sep 2024 21:16:17 +0200 schrieb Yann E. MORIN:

Quoted 7 lines

On 2024-09-16 16:09 +0800, Andy Yan spake thusly:

Quoted 3 lines

I found the build error was gone when I add host-python-pyyaml to MESA3D_DEPENDENCIES,
Should this be added there ?

It should indeed probably be added, but conditionally, i.e. only when the affected driver is enabled, somnething like:

Hi Yann, hi Andy,

the iris driver is the only one I am using at runtime and therefore the reason why I did not see this error before. Only for this driver I needed to create a host-mesa3d package, which in turn depends on host-python- pyyaml, but the dependency to host-python-pyyaml is needed for the target version of mesa3d as well regardless which drivers are enabled: https://
gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-24.2.0/meson.build? blame=1#L961

The next iteration of the patch series will include the fix.

Regards, Bernd

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#10 lore raw

PATCH 6/6 package/mesa3d: add option to enable VIRTIO vulkan driver

In reply to Bernd Kuhls

From: Alex Bennée <[email protected]>

The support for Venus in MESA has been stable since 23.2 so add an option to enable it.

---
 package/mesa3d/Config.in | 6 ++++++
 package/mesa3d/mesa3d.mk | 1 +
 2 files changed, 7 insertions(+)
package/mesa3d/Config.in +6 -0
index 3586451bc6..dfd323eb56 100644
@@ -323,6 +323,12 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST
 	help
 	  Vulkan swrast driver.
 
+config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO
+	bool "Vulkan VirtIO driver (Venus)"
+	select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
+	help
+	  Vulkan VirtIO (venus) driver.
+
 comment "Off-screen Rendering"
 
 config BR2_PACKAGE_MESA3D_OSMESA_GALLIUM
package/mesa3d/mesa3d.mk +1 -0
index f094fdd030..cc89dee295 100644
@@ -113,6 +113,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL)    += virgl
 MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM) += broadcom
 MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL)   += intel
 MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST) += swrast
+MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO) += virtio
 
 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
 MESA3D_CONF_OPTS += \
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot