Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v3 0/9] mesa: upgrade to 25.0.2
@ 2025-03-29 20:07 Dmitry Baryshkov
  2025-03-29 20:07 ` [PATCH v3 1/9] llvm: move libLLVM.so.N.M to llvm-libllvm package Dmitry Baryshkov
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Dmitry Baryshkov @ 2025-03-29 20:07 UTC (permalink / raw)
  To: openembedded-core; +Cc: Khem Raj, Zoltán Böszörményi

libclc is required in order to build Intel drivers in Mesa 24.1 and
later. Thus OE-Core is currently locked to the 24.0.x branch, which is
no longer maintained, having last release in June 2024.

A clean solution is to package Clang, then use it to build libclc and
SPIRV-LLVM-Translator (required for Mesa OpenCL support). However
creating proper recipes for Clang is a long process (ongoing by Khem
Raj).

This patchset attempts to solve the issue in a simpler way: by building
libclc and SPIRV-LLVM-Translator together with the LLVM. This way we
don't have to create target Clang recipes, there is no extra toolchain
to support, etc. Clang binaries are creted as a part of the build
process (in order to support building target packages), however it only
hits the LLVM sysroot-native and is only used by the LLVM target build.

Future work by Khem (once Clang is properly supported in OE-Core) should
allow us to create proper recipes for libclc and spirv-llvm-translator
and drop them from the llvm / clang recipe.

I think this approach provides a good balance between OE-Core being
stuck with the outdated Mesa release and being able to upgrade it,
bringing support for new hardware.

Last two patches of the series bring in RustiCL support, a new OpenCL
implementation within Mesa. They are optional for the sake of the
upgrade and can be dropped if there is any issue with those. RustiCL
support is mostly compile-tested at this point.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v3:
- Dropped llvm/fix-native-compilation.patch and
  llvm/0001-cmake-modules-CrossCompile-pass-SPIR-V-headers-path-.patch
  in favour of installing prepare_builtins into the sysroot, dropped
  corresponding EXTRA_OECMAKE params
- Dropepd -DCLANG_TABLEGEN from llvm's EXTRA_OECMAKE
- Enabled llvm-config wrapper for nativesdk too, fixing QA errors for
  nativesdk-mesa
- Added --libdir handling to llvm-config, dropping the need for
  mesa/0001-meson-use-target-path-for-Clang-libdir.patch
- Dropped extra LIBCEXTENSION from BINDGEN_TARGET, it is already a part
  of TARGET_OS
- Expanded commit messages to explain the patches
- Link to v2: https://lore.kernel.org/r/20250327221807.2551544-1-dmitry.baryshkov@oss.qualcomm.com

Changes in v2:
- Dropped YOCTO_ALTERNATE_LIBDIR patch
- Reworked mesa / LLVM integration to always use get_option('libdir')
- Reenabled AMD Vulkan driver (got disabled because of c&p error)
- Moved mesa-clc options to the libclc PACKAGECONFIG to fix several
  build errors
- Link to v1: https://lore.kernel.org/r/20250327135520.3920189-1-dmitry.baryshkov@oss.qualcomm.com/

---
Dmitry Baryshkov (8):
      llvm: move libLLVM.so.N.M to llvm-libllvm package
      llvm: use OECMAKE_SOURCEPATH to specify cmake dir
      llvm: handle libdir in llvm-config
      llvm: also use llvm-config wrapper for nativesdk recipes
      llvm: support building libclc
      llvm: add SPIRV-LLVM-Translator support
      mesa: upgrade 24.0.7 -> 25.0.2
      bindgen-cli: a tool to generate Rust bindings

Zoltán Böszörményi (1):
      mesa: add support for RustiCL under PACKAGECONFIG "opencl"

 meta/conf/distro/include/maintainers.inc           |   1 +
 .../bindgen-cli/bindgen-cli-crates.inc             | 186 +++++++++++++++++++++
 .../bindgen-cli/bindgen-cli_0.71.1.bb              |  19 +++
 meta/recipes-devtools/llvm/llvm/llvm-config        |   3 +
 .../llvm/llvm/spirv-internal-build.patch           |  30 ++++
 meta/recipes-devtools/llvm/llvm_20.1.0.bb          |  76 ++++++++-
 ...evert-meson-do-not-pull-in-clc-for-clover.patch |  53 ------
 ...d-Include-missing-llvm-IR-header-Module.h.patch |  41 -----
 .../files/0001-drisw-fix-build-without-dri3.patch  |  58 -------
 ...eno-don-t-encode-build-path-into-binaries.patch |  46 ++++-
 ...vide-cross-compilation-arguments-to-LLVM-.patch |  66 ++++++++
 ...ext-don-t-try-zink-if-not-enabled-in-mesa.patch |  42 -----
 meta/recipes-graphics/mesa/mesa.inc                | 101 ++++++-----
 13 files changed, 468 insertions(+), 254 deletions(-)
---
base-commit: 8d4987cf652c9844d93000fb012dc09eebcf9fcc
change-id: 20250328-mesa-25-6b78a0ce2c90

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-03-31 11:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 20:07 [PATCH v3 0/9] mesa: upgrade to 25.0.2 Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 1/9] llvm: move libLLVM.so.N.M to llvm-libllvm package Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 2/9] llvm: use OECMAKE_SOURCEPATH to specify cmake dir Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 3/9] llvm: handle libdir in llvm-config Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 4/9] llvm: also use llvm-config wrapper for nativesdk recipes Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 5/9] llvm: support building libclc Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 6/9] llvm: add SPIRV-LLVM-Translator support Dmitry Baryshkov
2025-03-29 20:43   ` Patchtest results for " patchtest
2025-03-29 21:02     ` Dmitry Baryshkov
2025-03-31 10:13   ` [OE-core] " Alexander Kanavin
2025-03-31 11:46     ` Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 7/9] mesa: upgrade 24.0.7 -> 25.0.2 Dmitry Baryshkov
2025-03-31 10:17   ` [OE-core] " Alexander Kanavin
2025-03-29 20:07 ` [PATCH v3 8/9] bindgen-cli: a tool to generate Rust bindings Dmitry Baryshkov
2025-03-29 20:07 ` [PATCH v3 9/9] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
2025-03-31 10:22   ` [OE-core] " Alexander Kanavin
2025-03-30 22:40 ` [OE-core] [PATCH v3 0/9] mesa: upgrade to 25.0.2 Richard Purdie
2025-03-31 10:15   ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox