mbox series

[RFC,0/4] mesa: lighten up target's libclc dependencies and fix panfrost support

Message ID 20250624-mesa-libclc-panfrost-v1-0-9ed8ca980e21@cherry.de
Headers show
Series mesa: lighten up target's libclc dependencies and fix panfrost support | expand

Message

Quentin Schulz June 24, 2025, 12:44 p.m. UTC
Panfrost support has been broken for a while already because it now
requires libclc which isn't enforced by default. This fixes this
oversight.

While re-adding support for panfrost, the build time for libclc were a
bit too much to my taste and I tried to figure out if we could lighten
up the dependencies for the target recipe and it seems to be the case.
The libclc and llvm dependencies seem to be only required for panfrost
and asahi when not using precompiled compilers. So this compiles them
for mesa-native, adds a dependency on it for target mesa and makes use
of it. Then we can simply remove the heavy dependencies from the target
mesa's libclc PACKAGECONFIG as well because it's only required when
building rusticl, managed by the opencl PACKAGECONFIG, which is where
the heavy dependencies are then moved (though I couldn't test if it
works properly because it doesn't compile, but that was the case before
the series too as far as I remember).

This comes at the cost of always compiling the precompiled compilers in
mesa-native (and asahi/panfrost drivers), but that is a one-time cost
(as it's not rebuilt depending on the target machine) I believe we can
afford.

This was only tested on an RK3588 (panfrost) board, I'm not sure I'm not
breaking anything else, hence the RFC. I have some patches ready for
meta-rockchip which I'll send in another thread.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Quentin Schulz (4):
      mesa: add asahi to TOOLS when selected in PACKAGECONFIG
      mesa: use native precompiled compilers instead of compiling them for the target recipe
      mesa: lighten up libclc dependencies for the target
      mesa: fix panfrost driver build

 meta/recipes-graphics/mesa/mesa.inc | 27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)
---
base-commit: 60e8db85886468d4455c0961d5985b65658d6b68
change-id: 20250624-mesa-libclc-panfrost-108d62e1899b

Best regards,