Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: openembedded-core@lists.openembedded.org
Cc: "Khem Raj" <raj.khem@gmail.com>,
	"Zoltán Böszörményi" <zboszor@gmail.com>
Subject: [PATCH v4 0/9] mesa: upgrade to 25.0.2
Date: Mon, 31 Mar 2025 15:21:33 +0300	[thread overview]
Message-ID: <20250331-mesa-25-v4-0-e62fc54a6efc@oss.qualcomm.com> (raw)

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 v4:
- Fixed QA issues reported against lib32-mesa-megadriver (Richard)
- Removed release notes link from the mesa's commit message (Alexander)
- Added link to the rust.bindgen() issue to RustiCL-related
  cross-compilation patch (Alexander)
- Renamed 'spirv' PACKAGECONFIG option to 'spirv-llvm-translator' in
  order to be more precise
- Link to v3: https://lore.kernel.org/r/20250329-mesa-25-v3-0-f4d0328eb867@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          |  77 ++++++++-
 ...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 |  67 ++++++++
 ...ext-don-t-try-zink-if-not-enabled-in-mesa.patch |  42 -----
 meta/recipes-graphics/mesa/mesa.inc                | 101 ++++++-----
 13 files changed, 470 insertions(+), 254 deletions(-)
---
base-commit: dc2ef2cc1183a14cd3a05d388a1d0485a1bc8d20
change-id: 20250328-mesa-25-6b78a0ce2c90

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



             reply	other threads:[~2025-03-31 12:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 12:21 Dmitry Baryshkov [this message]
2025-03-31 12:21 ` [PATCH v4 1/9] llvm: move libLLVM.so.N.M to llvm-libllvm package Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 2/9] llvm: use OECMAKE_SOURCEPATH to specify cmake dir Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 3/9] llvm: handle libdir in llvm-config Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 4/9] llvm: also use llvm-config wrapper for nativesdk recipes Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 5/9] llvm: support building libclc Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 6/9] llvm: add SPIRV-LLVM-Translator support Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 7/9] mesa: upgrade 24.0.7 -> 25.0.2 Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 8/9] bindgen-cli: a tool to generate Rust bindings Dmitry Baryshkov
2025-03-31 12:21 ` [PATCH v4 9/9] mesa: add support for RustiCL under PACKAGECONFIG "opencl" Dmitry Baryshkov
2025-04-01  7:40 ` [OE-core] [PATCH v4 0/9] mesa: upgrade to 25.0.2 Mathieu Dubois-Briand
2025-04-01  8:06   ` Alexander Kanavin
2025-04-01  8:27   ` Mathieu Dubois-Briand
2025-04-01  8:41     ` Alexander Kanavin
2025-04-01 16:19   ` Dmitry Baryshkov
2025-04-01 16:28     ` Alexander Kanavin
2025-04-02  1:45       ` Dmitry Baryshkov
2025-04-02  6:55         ` Mathieu Dubois-Briand
2025-04-02  7:56           ` Alexander Kanavin
2025-04-02 12:50             ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250331-mesa-25-v4-0-e62fc54a6efc@oss.qualcomm.com \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    --cc=zboszor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox