Files
video/libs/mesa/patches/200-panfrost-precomp.patch
Daniel Golle 47c626a74f mesa: update to 25.1.5
Support for off-screen rendering ("libOSMesa") has been dropped upstream.

In order to still be able to cross-compile the panfrost driver also on
non-Linux buildhosts, or Linux hosts without libdrm, a patch has been
applied.

This patch has also been submitted upstream via
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36170

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-07-17 23:53:34 +01:00

99 lines
3.1 KiB
Diff

--- 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