[Buildroot] [PATCH v2] package/mesa3d: make LLVM optional for radeonsi

Romain Naour romain.naour at smile.fr
Fri May 15 11:21:03 UTC 2026


Hello Joseph,

Le 14/05/2026 à 23:24, Joseph Kogut a écrit :
> Since mesa3d v26.0 [0], the ACO compiler has been the default over LLVM.
> This shader compiler backend has been used for even longer by the RADV
> vulkan driver.
> 
> Let's make LLVM optional.
> 
> Users who wish to continue using LLVM must enable support in Mesa, and
> override the default ACO compiler at runtime using an env var. [1]
> 
> Users who only want to use the default compiler backend may disable LLVM
> support, and save a lot of time during the build.
> 
> [0] https://gitlab.freedesktop.org/mesa/mesa/-/commit/e26c28f311cc5416f6c7f5b09a53ca2b14dfb955
> [1] https://docs.mesa3d.org/envvars.html#envvar-AMD_DEBUG
> 
> Signed-off-by: Joseph Kogut <joseph at anodize.com>
> Reviewed-by: Romain Naour <romain.naour at smile.fr>

Applied to next, thanks.

Best regards,
Romain

> ---
> Changes in v2:
> - Update mesa commit URL from cgit to gitlab
> - Document forcing LLVM compiler at runtime
> - Link to v1: https://patch.msgid.link/20260512-radeonsi-aco-compiler-v1-1-6557627f3d55@anodize.com
> 
> To: buildroot at buildroot.org
> Cc: Bernd Kuhls <bernd at kuhls.net>
> Cc: Romain Naour <romain.naour at gmail.com>
> ---
>  package/mesa3d/Config.in | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index 66ebe04394..8cdb548fb6 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -252,17 +252,24 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
>  	bool "Gallium Radeon SI driver"
>  	depends on BR2_USE_MMU # libdrm
>  	depends on BR2_i386 || BR2_x86_64
> -	depends on BR2_PACKAGE_MESA3D_LLVM
>  	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
>  	select BR2_PACKAGE_LIBDRM_AMDGPU
>  	select BR2_PACKAGE_LIBDRM_RADEON
> -	select BR2_PACKAGE_LLVM_AMDGPU
> +	select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
>  	select BR2_PACKAGE_ELFUTILS
>  	select BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
>  	select BR2_PACKAGE_MESA3D_RUSTICL_SUPPORTED_DRIVER
>  	help
>  	  Driver for ATI/AMD Radeon HD7000/HD8000/Rx200 GPUs.
>  
> +	  Since Mesa 26.0.0, the default shader compiler is ACO,
> +	  even when LLVM support is enabled at build time.
> +
> +	  Use the env var AMD_DEBUG=usellvm to override the
> +	  default and use LLVM at runtime.
> +
> +	  https://docs.mesa3d.org/envvars.html#envvar-AMD_DEBUG
> +
>  config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
>  	bool "Gallium vmware svga driver"
>  	depends on BR2_i386 || BR2_x86_64
> 
> ---
> base-commit: 9684cb9b4406e01683a9b5136100d81040d56aa0
> change-id: 20260512-radeonsi-aco-compiler-ae4e697d4848
> 
> Best regards,
> --  
> Joseph Kogut <joseph at anodize.com>
> 



More information about the buildroot mailing list