include $(TOPDIR)/rules.mk
PKG_NAME:=mesa
-PKG_VERSION:=25.0.5
+PKG_VERSION:=25.1.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://archive.mesa3d.org/
-PKG_HASH:=c0d245dea0aa4b49f74b3d474b16542e4a8799791cd33d676c69f650ad4378d0
+PKG_HASH:=3c4f6b10ff6ee950d0ec6ea733cc6e6d34c569454e3d39a9b276de9115a3b363
PKG_LICENSE:=BSD-3-Clause
define Package/libmesa-tegra
$(call Package/libmesa/Default)
- DEPENDS+=+libdrm-tegra @(aarch64||arm)
+ DEPENDS+=+libdrm-tegra @(aarch64||arm) @MESA_USE_LLVM
TITLE+= (NVIDIA Tegra)
VARIANT:=tegra
endef
$(call Package/libmesa/Default)
TITLE+= (ARM Mali Midgard and later)
VARIANT:=panfrost
- DEPENDS+=@(aarch64||arm)
+ DEPENDS+=@(aarch64||arm) @MESA_USE_LLVM
endef
define Package/libmesa-panfrost/description
Mesa Clover OpenCL 1.1 library for nVidia GPUs.
endef
-define Package/libosmesa/Default
-$(call Package/mesa/Default)
- DEPENDS+=+libdrm +libstdcpp +zlib +libwayland +libzstd +wayland-protocols
- TITLE+= off-screen rendering library
-endef
-
-define Package/libosmesa/description/Default
-Mesa's off-screen interface is used for rendering into user-allocated
-memory without any sort of window system or operating system
-dependencies. That is, the GL_FRONT colorbuffer is actually a buffer in
-main memory, rather than a window on your display.
-endef
-
-define Package/libosmesa-softpipe
-$(call Package/libosmesa/Default)
- TITLE+= (Softpipe)
- VARIANT:=softpipe
- DEFAULT_VARIANT:=1
-endef
-
-define Package/libosmesa-softpipe/description
-$(call Package/libosmesa/description/Default)
-
-Softpipe - this is the reference Gallium software driver.
-endef
-
-define Package/libosmesa-llvmpipe
-$(call Package/libosmesa/Default)
- TITLE+= (LLVMpipe)
- DEPENDS+=@MESA_USE_LLVM
- VARIANT:=llvmpipe
-endef
-
-define Package/libosmesa-llvmpipe/description
-$(call Package/libosmesa/description/Default)
-
-LLVMpipe - this is the high-performance Gallium LLVM driver.
-endef
-
-
define Package/libvulkan-broadcom
$(call Package/mesa/Default)
DEPENDS+=+libdrm +libexpat +libstdcpp +libudev +libwayland +libzstd +zlib \
define Package/libvulkan-panfrost
$(call Package/mesa/Default)
DEPENDS+=+libdrm +libexpat +libstdcpp +libudev +libwayland +libzstd +zlib \
- @(arm||aarch64)
+ @(arm||aarch64) @MESA_USE_LLVM
TITLE+= ARM Mali Midgard/Bifrost/Valhall Vulkan driver
VARIANT:=vulkan
endef
-Dvalgrind=disabled \
-Dgallium-drivers= \
-Dvulkan-drivers= \
- -Dosmesa=false \
- -Dgallium-xa=disabled \
-Dtools=nir \
-Dllvm=enabled \
-Dmesa-clc=enabled \
-Dshared-llvm=disabled \
-Ddraw-use-llvm=false \
-Dintel-clc=enabled \
+ -Dintel-elk=true \
-Dstatic-libclc=all \
-Dinstall-intel-clc=true \
-Dinstall-mesa-clc=true \
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libOpenCL.so* $(1)/usr/lib
endef
-define Package/libosmesa/install
- $(INSTALL_DIR) $(1)/usr/lib
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libOSMesa.so* $(1)/usr/lib
-endef
-
define Package/libvulkan-radeon/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libvulkan_radeon.so $(1)/usr/lib
Package/libopencl-amd/install = $(Package/libopencl/install)
Package/libopencl-nouveau/install = $(Package/libopencl/install)
-Package/libosmesa-softpipe/install = $(Package/libosmesa/install)
-Package/libosmesa-llvmpipe/install = $(Package/libosmesa/install)
-
$(eval $(call BuildPackage,mesa3d))
$(eval $(call BuildPackage,libmesa-amd))
$(eval $(call BuildPackage,libmesa-intel))
$(eval $(call BuildPackage,libmesa-llvmpipe))
$(eval $(call BuildPackage,libopencl-amd))
$(eval $(call BuildPackage,libopencl-nouveau))
-$(eval $(call BuildPackage,libosmesa-softpipe))
-$(eval $(call BuildPackage,libosmesa-llvmpipe))
$(eval $(call BuildPackage,libvulkan-broadcom))
$(eval $(call BuildPackage,libvulkan-imagination))
$(eval $(call BuildPackage,libvulkan-intel))
--- a/meson.build
+++ b/meson.build
-@@ -1782,21 +1782,26 @@ _llvm = get_option('llvm')
+@@ -1771,21 +1771,26 @@ _llvm = get_option('llvm')
dep_llvm = null_dep
with_llvm = false
if _llvm.allowed()
endif
if with_llvm
pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
-@@ -1895,7 +1900,11 @@ endif
+@@ -1884,7 +1889,11 @@ endif
dep_clang = null_dep
if with_clc or with_gallium_clover
--- a/src/compiler/clc/meson.build
+++ b/src/compiler/clc/meson.build
-@@ -24,14 +24,14 @@ if not _shared_llvm
+@@ -25,14 +25,14 @@ if not _shared_llvm or \
opencl_c_base_h = custom_target(
'opencl-c-base.h',
)
--- a/src/gallium/frontends/clover/meson.build
+++ b/src/gallium/frontends/clover/meson.build
-@@ -26,6 +26,12 @@ if with_opencl_icd
+@@ -25,6 +25,12 @@ if with_opencl_icd
clover_cpp_args += '-DHAVE_CLOVER_ICD'
endif
libclllvm = static_library(
'clllvm',
files(
-@@ -44,7 +50,7 @@ libclllvm = static_library(
+@@ -43,7 +49,7 @@ libclllvm = static_library(
clover_cpp_args,
clover_opencl_cpp_args,
- '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
+ '-DFALLBACK_CLANG_RESOURCE_DIR="@0@"'.format(join_paths(
- dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang',
+ llvm_libdir, 'clang',
- dep_llvm.version(), 'include',
+ dep_llvm.version()
)),
],
--- a/src/gallium/targets/opencl/meson.build
--- /dev/null
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -87,7 +87,7 @@ endif
+ if with_imagination_vk
+ subdir('imagination')
+ endif
+-if with_gallium_panfrost or with_gallium_lima or with_panfrost_vk or with_tools.contains('panfrost')
++if with_drivers_clc or with_gallium_panfrost or with_gallium_lima or with_panfrost_vk or with_tools.contains('panfrost')
+ subdir('panfrost')
+ endif
+ if with_microsoft_clc or with_gallium_d3d12 or with_spirv_to_dxil or with_microsoft_vk
+--- a/src/panfrost/lib/meson.build
++++ b/src/panfrost/lib/meson.build
+@@ -3,7 +3,9 @@
+ # SPDX-License-Identifier: MIT
+
+ subdir('genxml')
+-subdir('kmod')
++if with_gallium_panfrost or with_panfrost_vk
++ subdir('kmod')
++endif
+
+ pixel_format_versions = ['5', '6', '7', '9', '10', '12', '13']
+ libpanfrost_pixel_format = []
+@@ -22,16 +24,14 @@ foreach ver : pixel_format_versions
+ endforeach
+
+ libpanfrost_per_arch = []
++libpanfrost_per_arch_files = [ 'pan_blend.c', 'pan_shader.c', 'pan_texture.c' ]
++if with_gallium_panfrost or with_panfrost_vk
++ libpanfrost_per_arch_files += 'pan_desc.c'
++endif
+
+ foreach ver : ['4', '5', '6', '7', '9', '10', '12', '13']
+ libpanfrost_per_arch += static_library(
+- 'pan-arch-v' + ver,
+- [
+- 'pan_blend.c',
+- 'pan_desc.c',
+- 'pan_shader.c',
+- 'pan_texture.c',
+- ],
++ 'pan-arch-v' + ver, libpanfrost_per_arch_files,
+ include_directories : [inc_include, inc_src],
+ c_args : ['-DPAN_ARCH=' + ver],
+ gnu_symbol_visibility : 'hidden',
+@@ -63,10 +63,18 @@ libpanfrost_lib_files = files(
+ 'pan_tiler.c',
+ 'pan_layout.c',
+ 'pan_scratch.c',
+- 'pan_props.c',
+ 'pan_util.c',
+ )
+
++if with_gallium_panfrost or with_panfrost_vk
++ libpanfrost_lib_files += files('pan_props.c')
++endif
++
++libpanfrost_link_with = [libpanfrost_pixel_format, libpanfrost_per_arch]
++if with_gallium_panfrost or with_panfrost_vk
++ libpanfrost_link_with += libpankmod_lib
++endif
++
+ libpanfrost_lib = static_library(
+ 'panfrost_lib',
+ [libpanfrost_lib_files, pan_packers],
+@@ -75,13 +83,18 @@ libpanfrost_lib = static_library(
+ gnu_symbol_visibility : 'hidden',
+ dependencies: [dep_libdrm, idep_nir, idep_mesautil],
+ build_by_default : false,
+- link_with: [libpanfrost_pixel_format, libpanfrost_per_arch, libpankmod_lib],
++ link_with: libpanfrost_link_with,
+ )
+
++libpanfrost_dependencies = [deps_for_libpanfrost, idep_nir]
++if with_gallium_panfrost or with_panfrost_vk
++ libpanfrost_dependencies = libpankmod_dep
++endif
++
+ libpanfrost_dep = declare_dependency(
+ link_with: [libpanfrost_lib, libpanfrost_decode, libpanfrost_midgard, libpanfrost_bifrost, libpanfrost_pixel_format, libpanfrost_per_arch],
+ include_directories: [inc_include, inc_src, inc_panfrost],
+- dependencies: [deps_for_libpanfrost, libpankmod_dep, idep_nir],
++ dependencies: libpanfrost_dependencies,
+ )
+
+ if with_tests
+--- a/src/panfrost/meson.build
++++ b/src/panfrost/meson.build
+@@ -15,7 +15,7 @@ subdir('util')
+ subdir('midgard')
+ subdir('compiler')
+
+-if with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
++if with_drivers_clc or with_gallium_panfrost or with_panfrost_vk or with_tools.contains('panfrost')
+ subdir('lib')
+ subdir('clc')
+ endif