diff mbox series

[RFC,v2,4/6] mesa: add asahi to TOOLS when selected in PACKAGECONFIG

Message ID 20250721-mesa-libclc-panfrost-v2-4-f713d0858949@cherry.de
State Under Review
Headers show
Series mesa: lighten up target's libclc dependencies and fix panfrost support | expand

Commit Message

Quentin Schulz July 21, 2025, 10:33 a.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

Similarly to panfrost and other PACKAGECONFIG, mesa has tools for asahi.
So let's build the tools whenever asked.

This will be useful for building asahi_clc precomp-compiler in native
mesa for example.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 1 +
 1 file changed, 1 insertion(+)

Comments

Dmitry Baryshkov July 22, 2025, 6:57 a.m. UTC | #1
On Mon, Jul 21, 2025 at 12:33:41PM +0200, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
> 
> Similarly to panfrost and other PACKAGECONFIG, mesa has tools for asahi.
> So let's build the tools whenever asked.
> 
> This will be useful for building asahi_clc precomp-compiler in native
> mesa for example.

How? I think asahi_clc isn't controlled by -Dtools=asahi.

> 
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
>  meta/recipes-graphics/mesa/mesa.inc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index 55793baa8de5a190ae5eadb44662c1d11487c026..5295b70fc9b4bb9570d86333f9229aef9114d93d 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -99,6 +99,7 @@ PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')},
>  # mesa development and testing tools support, per driver
>  TOOLS = ""
>  TOOLS_DEPS = ""
> +TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi', ',asahi', '', d)}"
>  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
>  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
>  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
> 
> -- 
> 2.50.1
> 
>
Quentin Schulz July 22, 2025, 9:03 a.m. UTC | #2
Hi Dmitry,

On 7/22/25 8:57 AM, Dmitry Baryshkov wrote:
> On Mon, Jul 21, 2025 at 12:33:41PM +0200, Quentin Schulz wrote:
>> From: Quentin Schulz <quentin.schulz@cherry.de>
>>
>> Similarly to panfrost and other PACKAGECONFIG, mesa has tools for asahi.
>> So let's build the tools whenever asked.
>>
>> This will be useful for building asahi_clc precomp-compiler in native
>> mesa for example.
> 
> How? I think asahi_clc isn't controlled by -Dtools=asahi.
> 

asahi_clc is only built if:
- you enable the asahi gallium driver, or
- you enable the asahi vulkan driver, or
- you build the asahi tools,

c.f. 
https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.1.5/src/asahi/meson.build?ref_type=tags#L12-L17

Cheers,
Quentin
Dmitry Baryshkov July 22, 2025, 10:46 a.m. UTC | #3
On Tue, 22 Jul 2025 at 12:03, Quentin Schulz <quentin.schulz@cherry.de> wrote:
>
> Hi Dmitry,
>
> On 7/22/25 8:57 AM, Dmitry Baryshkov wrote:
> > On Mon, Jul 21, 2025 at 12:33:41PM +0200, Quentin Schulz wrote:
> >> From: Quentin Schulz <quentin.schulz@cherry.de>
> >>
> >> Similarly to panfrost and other PACKAGECONFIG, mesa has tools for asahi.
> >> So let's build the tools whenever asked.
> >>
> >> This will be useful for building asahi_clc precomp-compiler in native
> >> mesa for example.
> >
> > How? I think asahi_clc isn't controlled by -Dtools=asahi.
> >
>
> asahi_clc is only built if:
> - you enable the asahi gallium driver, or
> - you enable the asahi vulkan driver, or
> - you build the asahi tools,
>
> c.f.
> https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.1.5/src/asahi/meson.build?ref_type=tags#L12-L17

Missed it. Yes, it's correct then.
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 55793baa8de5a190ae5eadb44662c1d11487c026..5295b70fc9b4bb9570d86333f9229aef9114d93d 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -99,6 +99,7 @@  PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')},
 # mesa development and testing tools support, per driver
 TOOLS = ""
 TOOLS_DEPS = ""
+TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'asahi', ',asahi', '', d)}"
 TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
 TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
 TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"