Antonio Ospite
ca0f0d7b95
meson: handle dep_libdrm before the driver specific libdrm modules
...
Handle dep_libdrm before the driver specific libdrm modules, this is for
when libdrm is built as a subproject, for example libdrm_amdgpu is only
available after dep_libdrm has been added.
Acked-by: Valentine Burley <valentine.burley@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710 >
2025-08-25 15:55:54 +00:00
Yiwei Zhang
5349537cb3
meson/android: amend the condition for libbacktrace
...
libbacktrace compatibility has been dropped since Android 14, so the
current flags and deps shall be kept behind api level < 34.
Meanwhile, its successor, libunwindstack, has been available since
Android 11 (api level 31). So one can hook that up if needed.
Reviewed-by: Antonio Ospite <antonio.ospite@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36961 >
2025-08-25 10:47:19 +00:00
Mel Henning
b5973bed78
zink: Add zink_check_requirements
...
This is a new tool that checks a driver against the vulkan profile and
complains about any missing features.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36061 >
2025-08-22 16:08:11 -04:00
David Rosca
a67a66508e
subprojects: Remove libdisplay-info wrap file
...
When building as subproject, this will include libdisplay-info tests
when running `meson test` and they incorrectly detect edid-decode
binary being available causing the tests to fail. There are also
issues with 32bit build.
Updating to latest libdisplay-info doesn't seem like a good solution
as that pulls in additional build dependencies.
Since this is an optional dependency, drop the wrap file.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13657
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36897 >
2025-08-21 14:42:07 +00:00
Eric Engestrom
8ee7b41841
meson: fixup b_sanitize checks
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36905 >
2025-08-21 14:54:19 +02:00
Juan A. Suarez Romero
1c2aa6f5c3
meson: check for no_sanitize function attributes
...
Meson doesn't support for checking no_sanitize attributes, so we do it
manually through testing.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36884 >
2025-08-21 12:09:04 +00:00
Marek Olšák
ecbe35d878
egl,glx: allow OpenGL with old libx11, but disable glthread if it's unsafe
...
pass bool thread_safe to the dri frontend, and enable glthread accordingly
Reviewed-by: Eric Engestrom <eric@igalia.com >
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36378 >
2025-08-21 02:05:26 +00:00
Faith Ekstrand
3d4b29a0f6
meson: Add --wrap-unsafe-ops to bindgen
...
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849 >
2025-08-20 17:06:50 +00:00
Faith Ekstrand
4dd7ed18b9
meson: Disable unsafe_attr_outside_unsafe for now
...
The #[unsafe(no_mangle)] decoration breaks cbindgen until 0.28 where
they added support. Just disable that for now so that NIL still builds.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849 >
2025-08-20 17:06:49 +00:00
Faith Ekstrand
b15cd5dea0
meson: Disable unsafe_op_in_unsafe_fn in bindgen for now
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849 >
2025-08-20 17:06:49 +00:00
Faith Ekstrand
5db8727ed1
meson: Add a rust_2024_lint_args helper
...
Copied from rusticl. This makes it easier for other Rust components to
ask for all the 2024 warnings.
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849 >
2025-08-20 17:06:48 +00:00
Yonggang Luo
a3b4a26d58
meson: Remove unused with_asm_arch and USE_*_ASM macros
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36635 >
2025-08-20 16:21:28 +00:00
Yonggang Luo
8ca533c942
mesa: refactor the glapi/tls includes into a single, reused header
...
This is done by introduce predefined macro MESA_SYSTEM_HAS_KMS_DRM=system_has_kms_drm
And after these change, the usage of USE_*_ASM macros in mesa/glapi are avoided.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36635 >
2025-08-20 16:21:28 +00:00
Yonggang Luo
272c331913
meson: Remove redundant TODO:
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36635 >
2025-08-20 16:21:27 +00:00
Eric Engestrom
1fad1516b8
meson: add spirv-tools option to disable the optional dependency
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36689 >
2025-08-20 12:50:40 +00:00
Yiwei Zhang
69de00efe2
meson/android: drop redundant libdisplay-info dep
...
It's only used by common wsi, but not Android.
Fixes: 2c870bbe20 ("build: Add dependency on libdisplay-info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36795 >
2025-08-17 14:40:36 +00:00
Erik Faye-Lund
fe42a3d0eb
meson/util: properly detect sysconf
...
There's two functions that use sysconf(), and they don't seem to agree
on what combination of platforms supports the function. Let's perform
proper function detection instead.
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36621 >
2025-08-11 12:30:23 +00:00
bbhtt
9f33645d2c
meson: Clearly print error when distutils or packaging is missing
...
Previously, if neither packaging.version or distutils.version is present
in the environment the has_mako check would return non-zero exit code
and meson would print that mako is required which is misleading since
mako can be in the environment but not packaging or distutils. This can
happen for Python>=3.12 where distutils is no longer in the Python
stdlib but provided externally by setuptools.
Signed-off-by: bbhtt <bbhtt.zn0i8@slmail.me >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36697 >
2025-08-10 05:41:56 +00:00
Yonggang Luo
723eeac89b
util: Refactoring util_dl_get_path_from_proc out of clc/clc_helpers.cpp
...
For getting clc_helpers.cpp can be compiled with gcc/mingw
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36597 >
2025-08-07 21:15:13 +00:00
Matt Turner
a8ab696033
meson: Allow configuring with Android-internal perfetto
...
This enables ninja-to-soong to generate an Android.bp that builds Mesa
against Android's `libperfetto_client_experimental` library.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36561 >
2025-08-07 16:22:37 +00:00
Matt Turner
eb6f6c1976
meson: Allow controlling perfetto fallback
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36561 >
2025-08-07 16:22:37 +00:00
Marek Olšák
d1cd3ef6cb
meson: remove unused -DLLVM_AVAILABLE
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36545 >
2025-08-05 23:26:32 +00:00
Marek Olšák
b8b38d38b1
meson: reinstate LLVM requirement for r300 and enforce it for i915 too
...
r300 originally required LLVM because some r300 chips run vertex shaders
on the CPU. i915 always runs vertex shaders on the CPU.
The list of drivers in enable_if is sorted.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36545 >
2025-08-05 23:26:32 +00:00
Ernst Persson
7d7591b37c
meson: Raise minimum Python version to 3.9
...
Gives access to str.removeprefix and str.removesuffix among other
things.
Signed-off-by: Ernst Persson <ernstp@gmail.com >
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36398 >
2025-08-05 21:39:58 +00:00
Joshua Ashton
2c870bbe20
build: Add dependency on libdisplay-info
...
Add a dependency on https://gitlab.freedesktop.org/emersion/libdisplay-info/
to be used for parsing EDIDs for KHR_display HDR support.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35461 >
2025-08-05 08:50:05 +00:00
LingMan
6c7084357d
mesa: Bump required Rust version to 1.82
...
Firefox ESR requires Rust 1.82 since version 140. Thus, this update
is in line with our Rust update policy.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36526 >
2025-08-03 10:16:20 +00:00
Iván Briano
bf8ebb6a7d
intel: Re-disable ray tracing on 32 bits
...
We had this disabled before moving to the common framework for BVH
building and lost it along the way.
Fixes: f0e18c475b ("intel: remove GRL/intel-clc")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36522 >
2025-08-02 00:12:44 +00:00
Tomeu Vizoso
5b829658f7
rocket: Initial commit of a driver for Rockchip's NPU
...
The programming model matches very closely to that of NVIDIA's NVDLA.
Enough is implemented to run SSDLite MobileDet with roughly the same
performance as the blob (when running on a single NPU core).
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698 >
2025-07-28 08:06:38 +02:00
Daniel Schürmann
722ffe9a73
vulkan: implement VK_AMD_anti_lag as implicit vulkan layer
...
VkLayer_MESA_anti_lag is a lightweight implicit layer which provides
an open-source implementation of the VK_AMD_anti_lag vulkan extension.
The algorithm used by this layer is very simplistic and only aims to
minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2
and the begin of the execution of the submission.
In order to build VkLayer_MESA_anti_lag, pass -Dlayers=anti-lag to meson.
It is possible to either install the layer or to use
VK_ADD_IMPLICIT_LAYER_PATH=<buildpath>/share/vulkan/implicit_layer.d/
for testing purposes.
(Keep in mind that you have to adjust the library_path in the json file in that case.)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34242 >
2025-07-24 09:50:07 +00:00
Faith Ekstrand
6c61751c1b
meson: Require libX11 >= 1.8
...
Starting with version 1.8, libX11 calls XInitThreads() from the library
constructor so we can just assume we always have threaded X11.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36123 >
2025-07-16 01:32:54 +00:00
Daniel Stone
355b96413d
egl/wayland: Move bind_wayland_display to legacy build option
...
Similar to how support for X11's DRI2 protocol was deprecated in 24.2,
begin deprecating EGL_WL_bind_wayland_display (including
eglBindWaylandDisplayWL et al) by moving it behind a legacy-wayland
build option.
This extension was originally created in a pre-dmabuf world, where we
didn't have a universally-accepted way of exchanging buffers between
client and compositor, or even really the ability to describe formats
and modifiers universally.
Since then, the world has settled on dmabuf with DRM FourCC and
modifiers. We've had the zwp_linux_dmabuf_v1 protocol for 10 years now:
both clients and compositors implement this protocol to handle buffer
sharing. Compositors either use EGL_EXT_image_dma_buf_import or the
Vulkan dmabuf extensions to import these into GPU world.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36026 >
2025-07-10 14:51:20 +00:00
Emma Anholt
fefa6aa899
dri2: Finish removing the now-unused dep_xcb_dri2.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19942 >
2025-07-09 14:31:05 -07:00
Emma Anholt
b4eed47828
glx: clean up a litttle remains of DRI2 support.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19942 >
2025-07-09 14:31:05 -07:00
Daniel Stone
08c6ba223b
x11: Remove DRI2 support
...
DRI2 was hidden behind a legacy-x11 build option back in the 24.2
release. It's now been a year, so let's get on with removing it so we
can simplify our winsys interactions.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885 >
2025-07-09 17:49:58 +00:00
Mel Henning
b9a9f6cd53
meson: Allow unnecessary_transmutes for bindgen
...
Otherwise I get hundreds of "unnecessary transmute" warnings
on rustc 1.88.0
Cc: mesa-stable
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35874 >
2025-07-08 20:51:44 +00:00
Yiwei Zhang
60eebe964d
meson: drop vdrm from virgl and venus
...
Currently neither virgl nor venus uses vdrm. One big blocker is neither
of them has adopted drm_syncobj yet.
Fixes: 1a6fc7006a ("meson: split subdir for virtio/vdrm and virtio/vulkan")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35933 >
2025-07-04 09:50:04 +00:00
Eric Engestrom
4be493862d
meson: only run symbols-check if nm is available
...
And drop the redundant check from symbols-check.py, which was actually
masking all kinds of issues.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35891 >
2025-07-02 19:21:25 +00:00
Adam Jackson
6a28d6707d
meson: Require LLVM 8 or newer
...
This isn't a huge cleanup on its own, but it lets us start assuming
coroutine support, and I would like to unify graphics shader dispatch
to work the same way as compute shader dispatch.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35374 >
2025-07-02 18:49:22 +00:00
Dylan Baker
2e2826d121
meson: use .enable_if for intel tools dependency on expat
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35840 >
2025-07-01 17:40:03 +00:00
Dylan Baker
66a30385fe
meson: change RadV dependency on LLVM to an ACO tests dependency
...
RadV itself doesn't require LLVM, only the ACO tests do. So stop
requiring LLVM for ACO without its tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35840 >
2025-07-01 17:40:03 +00:00
Dylan Baker
39ccd7899c
meson: use feature options for LLVM
...
This allows us to get better error messages in cases where LLVM has been
explicitly disabled but not found, as well making use of the feature
object for the required argument to dependency. This in turn can give
better error messages when the object is used incorrectly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35840 >
2025-07-01 17:40:03 +00:00
Nicolas Dufresne
4008300672
build: Include panfrost to the tools 'all' list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35775 >
2025-06-26 21:55:17 +00:00
Nicolas Dufresne
3ce37fcbb5
build: Sort the tools 'all' list
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35775 >
2025-06-26 21:55:17 +00:00
Dylan Baker
dd45e25dc3
meson: update b_sanitize check for Meson >= 1.8
...
In Meson 1.8 the b_sanitize option was changed from an enumerated set of
known sanitizers to an array of options to test with `-fsanitize`, this
means that the thread sanitizer could be used in conjunction with one
or more other sanitizers and we need to account for this. Use
`.contains()` to check if `thread` is in the sanitizer list
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35747 >
2025-06-26 14:59:27 +00:00
Eric Engestrom
1a6fc7006a
meson: split subdir for virtio/vdrm and virtio/vulkan
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723 >
2025-06-25 22:21:48 +00:00
Eric Engestrom
a1daeb87a8
meson: fix vdrm inclusion logic
...
This is about which driver use vdrm, not which OS we're on.
Fixes the build on non-KMS/DRM system.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12899
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35723 >
2025-06-25 22:21:48 +00:00
Eric Engestrom
b4ed35994d
meson: bump required meson version to 1.4
...
See https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35652#note_2973761
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742 >
2025-06-25 21:55:16 +00:00
Eric Engestrom
474774ea58
meson: drop error for meson < 1.3 since we require 1.3+ already
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35742 >
2025-06-25 21:55:16 +00:00
Mary Guillemard
e8137404b6
meson: make clz available in OpenCL code
...
for various math helpers.
the clzll version isn't available since long long is 128-bit for CL.
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35639 >
2025-06-20 10:11:52 +00:00
Gurchetan Singh
f7a9991b89
mesa: add option to enable virtgpu_kumquat FFI for gfxstream
...
Will be used by Cuttlefish CI/CD, but also commonly used by
gfxstream developers.
meson setup gfxstream-build -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvirtgpu_kumquat=true -Dopengl=false -Drust_std=2021
In distros, virtgpu_kumquat is not expected to be packaged since
it is a CI/CD tool.
Reviewed-by: Aaron Ruby <aruby@qnx.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210 >
2025-06-17 22:28:55 +00:00