Commit graph

1161 commits

Author SHA1 Message Date
Krzysztof Sobiecki
615e2d15d1 os: Add support for GNU/HURD compilation and use of dri swrast/llvmpipe.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39277>
2026-02-17 08:24:02 +00:00
Krzysztof Sobiecki
400bec37ed gallium/dril: Don't use gbm if there is no gbm configured
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39277>
2026-02-17 08:24:02 +00:00
Jesse Natalie
f0066a3150 meson: Include DirectX-Headers dependency for all VK Windows builds
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14839
Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39860>
2026-02-13 23:27:52 +00:00
Dmitry Osipenko
b06d759a93 intel: Add virtio-gpu native context
Add virtio-intel native DRM context base preparatory code. Virtio-intel
works by passing ioctl's from guest to host for execution, utilizing
available VirtIO-GPU infrastructure.

This patch adds initial experimental native context support using i915
KMD UAPI.

Compile Mesa with -Dintel-virtio-experimental=true to enable virtio-intel
native context support.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29870>
2026-02-06 00:15:37 +00:00
Natalie Vock
cb571550cc mesa: Prevent building with LTO
LTO is not supported with Mesa. It has caused random impossible-to-debug
bugs for a long time, and LTO bug reports are generally considered a
"WONTFIX please disable LTO instead". Let's make this clear to users
and packagers so they don't run into more weird issues that result in
inactionable reports.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39671>
2026-02-04 11:38:14 +00:00
Natalie Vock
e48f46e342 meson: Identify LTO builds in the package version
Whether a build is LTO or not is relevant for debugging. Include the
info in the package version.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39671>
2026-02-04 11:38:14 +00:00
Eric Engestrom
342a5ba44e Revert "meson: static link spirv-tools for darwin"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit f21d0f2cbe.

This causes issues with other platforms trying to do static builds.

A better option is for everyone to use `meson setup --prefer-static`.

Fixes: f21d0f2cbe ("meson: static link spirv-tools for darwin")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14751
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39613>
2026-01-30 11:25:38 +00:00
Thong Thai
f4959c16c8 meson: add mpeg12dec as a video-codec
Add mpeg12dec as a selectable video-codec and add a corresponding check
to vl_codec_supported.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39354>
2026-01-20 22:42:08 +00:00
Thong Thai
f9c1ba8c17 meson: add jpeg as a video-codec
Add jpeg as a selectable video-codec and add a corresponding check to
vl_codec_supported.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39354>
2026-01-20 22:42:08 +00:00
Gurchetan Singh
adec216eb0 meson,gfxstream: add Android support via meson2hermetic
Previously, there were no meson.build rules for the Android
portion of gfxstream_vk, since nobody builds gfxstream_vk + Android
via the Android NDK.

Using Soong (and not the Android NDK) is an absolute requirement,
since Android Virtual Devices (AVDs) were amongst to fully
transition to Soong over Android makefiles, leading to
breath-taking and exhilarating build speeds.

The meson build rules that do exist works are designed for
gfxstream_vk + Linux.  That leads to higher maintainence
costs: maintaining hand-written Android.bp files for Android,
and meson.build for Linux.

Enter meson2hermetic.  With this tool, meson.build becomes the
source of truth, and Android.bp are generating automatically,
reducing maintainence costs.

But for this to work, the portion of gfxstream_vk that didn't
have meson build rules needs them.  This patch does this
and there are two things to note:

1) gfxstream_vk + Android needs dependencies that don't have
any pkg-config files, and exist only with the AOSP tree.
These include things like:

   - libqemupipe.ranchu
   - libOpenglCodecCommon
   - libgralloc_cb.ranchu
   - renderControlEncoder

Most of these dependencies support the Goldfish AVD, and will
be deleted over time as the that emulator transitions to
virtio-gpu.  There are more generic Android deps too, like
"android_base".

Generic Android dependencies are given the prefix "android-",
while Goldfish (a.k.a Android Emulator) is given the prefix
"android-aemu-".

The ability to use dependencies that don't have a direct
Linux-distro style analogue is the one of motivators
meson2hermetic.

2) There's a special "gfxstream_emulated_android" case.  This
is for the GfxstreamEnd2EndTests target, which uses the code
defined here:

- src/gfxstream/guest/android/ANativeWindowEmulated.cpp
- src/gfxstream/guest/android/GrallocEmulated.cpp

This is used by Gfxstream Github for CI/CD.

Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:58 +00:00
Gurchetan Singh
6e9b1ed53a meson: add dependency on android-hwvulkan-headers
When building without the android-stub and with meson2hermetic,
we need to find vulkan headers somewhere.

Without this, the following error is observed:

vulkan/runtime/vk_android.c:46:10: fatal error: 'hardware/hwvulkan.h' file not found
   46 | #include <hardware/hwvulkan.h>
      |          ^~~~~~~~~~~~~~~~~~~~~

This provided via the hwvulkan_headers target in:

    ${AOSP}/frameworks/native/vulkan

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:58 +00:00
Gurchetan Singh
4bb3b80b8f meson: avoid calling nm.full_path() when tool is not found
If tool isn't found, we shouldn't call full_path() on it.
This is the case for Android + meson2hermetic.

Fixes: 2f652e0b36 ("meson: move the generic symbols check arguments to a common variable")
Cc: mesa-stable

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:58 +00:00
Gurchetan Singh
4baae4c4d4 meson: check for <poll.h>
Otherwise, the following warning is observed with musl
headers, which translates to an error on Android.

external/musl/include/sys/poll.h:1:2: error:
  redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror,-W#warnings]
  warning redirecting incorrect #include <sys/poll.h> to <poll.h>

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39279>
2026-01-20 17:17:57 +00:00
Paulo Zanoni
b72d347d1c meson: crocus and intel_hasvk now require clc
We're making blorp use OpenCL shaders, and both crocus and hasvk
require blorp, so now they require CL.

Without this patch, when we build Vulkan with intel_hasvk or crocus
but not the other things that require CL, we get:

    src/intel/blorp/meson.build:12:4: ERROR: Unknown variable "prog_mesa_clc".

Thanks to the report from Dancing Mirrors.

Fixes: b52b1a08bf ("intel/blorp: add blorp_shaders.cl")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14660
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39333>
2026-01-16 01:29:26 +00:00
Eric Engestrom
93390d4b73 vk/runtime,zink: only integrate renderdoc on supported platforms
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It is not actually available to all the platforms mesa can be compiled
to, so let's keep an opt-in list of supported platforms instead, and
compile it out on all other platforms.

Fixes: 48a0478126 ("zink: add renderdoc handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39176>
2026-01-07 09:08:46 +00:00
Michael Tretter
ebf1454410 r600: remove LLVM dependency
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
r600 doesn't use LLVM anymore. Remove the remaining print of the version
number and the dependencies in the build system.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39071>
2025-12-30 00:27:53 +00:00
Eric Engestrom
e7142c74e2 meson/rust: allow explicit if x.is_none { return None } instead of x?
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
31bd297fc2 meson/rust: allow "needless lifetimes"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
af781dc7c8 meson/rust: allow else { if {} }
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
47ebdbab81 meson: add rust_global_args for flags for all the rust compilations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
675fe92e78 ci: read the MSRV from clippy.toml to avoid having too many copies to keep in sync
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:19 +01:00
Eric Engestrom
9a681f20ef rust: configure clippy to only report issues relevant to our MSRV
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
2025-12-20 00:13:18 +01:00
Yonggang Luo
9649eee307 meson: Use /Zc:enumTypes enables C++ conforming enum underlying type and enumerator type deduction
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The detail is at https://learn.microsoft.com/en-us/cpp/build/reference/zc-enumtypes?view=msvc-170

For example:

enum Enum {
    A = 'A',
    B = sizeof(A)
};

static_assert(B == 1); // previously failed, now succeeds under /Zc:enumTypes

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38639>
2025-12-08 22:47:13 +00:00
Thong Thai
4f4745ebf3 frontends/va: get libva api version from va_version.h
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38773>
2025-12-03 16:01:38 +00:00
Gurchetan Singh
6c1d993640 meson: add -Wgnu-pointer-arith to _trial_msvc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In theory, this will prevent the warning in the future
in common code (which uses c_msvc_compat_args).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38752>
2025-12-02 00:12:44 +00:00
Thong Thai
b4e7c13ef4 meson: add libva wrap and fallback option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Allow for Mesa to be built with VAAPI support, without having to install
libva headers first.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38271>
2025-11-25 13:37:49 +00:00
Simon McVittie
b860ae309a vulkan: Optionally share one JSON manifest per driver between architectures
If the library_path is just a basename like `libvulkan_lvp.so`, then we
can share the same JSON manifest like `lvp_icd.json` between all of the
architectures, like we already do for Vulkan layers. The library will
be looked up in the dynamic linker's default search path in this case,
and in practice will be found in `${libdir}`. This is how the Mesa's
EGL driver and Vulkan layers work, how Mesa is packaged in Debian 13,
and also how the Nvidia proprietary driver works; it makes installation
simpler for distros, especially on multiarch systems like Debian and
the freedesktop.org SDK.

However, if we want a separate manifest per architecture in order to
be able to write the full path into it, we still need per-architecture
filename disambiguation like `lvp_icd.x86_64.json`.

We presumably still want a separate per architecture on Windows, because
the concept of a single monolithic `${libdir}` is less common there, and
it can also be helpful during development when setting `$VK_DRIVER_FILES`
to force the use of a specific driver installed in a non-default location.

Use the following parameter to passed to vk_icd_gen:
'--icd-lib-path', vulkan_icd_lib_path,
'--icd-filename', icd_file_name,
output : 'virtio_icd.' + vulkan_manifest_suffix,

and the output is passed by '--out', '@OUTPUT@',
so we can detect vulkan_manifest_per_architecture from the --out parameter in script.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13745
Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37314>
2025-11-24 19:05:57 +00:00
Eric Engestrom
37c7d19e46 meson: auto-disable draw-use-llvm when llvm=disabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The option's description is:
> Whether to use LLVM for the Gallium draw module, if LLVM is included.

Let's disable it right away if LLVM is disabled, to avoid some
configurations from failing.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38558>
2025-11-23 10:08:34 +01:00
Eric Engestrom
69bb927ebf meson: auto-disable amd-use-llvm when llvm=disabled
The option's description is:
> Whether to use LLVM for the AMD drivers, if LLVM is included.

Let's disable it right away if LLVM is disabled, to avoid configurations
like the one in the issue below from failing.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14306
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38558>
2025-11-23 10:08:14 +01:00
Matt Turner
4235c39a9a meson: Let -Ddraw-use-llvm=false work for R300 on non-x86
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Prior to commit b8b38d38b1 ("meson: reinstate LLVM requirement for r300
and enforce it for i915 too") it was possible to build and use r300 for
architectures that do not have LLVM (e.g., alpha).

The only SWTCL chips are integrated graphics in x86 systems, and are not
available in discrete cards.

Fixes: b8b38d38b1 ("meson: reinstate LLVM requirement for r300 and enforce it for i915 too")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38580>
2025-11-22 19:06:39 +00:00
Dylan Baker
1737638c98 meson: make dep_lua a disabler
There are cases where the freedreno `crashdec` program will not be
built, but will still be used. By making dep_lua a disabler, we move
closer to being able to have those tests automatically disabled when
crashdec isn't built.

Acked-by: Rob Clark <rob.clark@oss.qualcomm.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38579>
2025-11-21 21:48:57 +00:00
Matt Turner
ad14942300 meson: Fix sysprof-capture-4 dependency
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The versioning scheme changed in v45.0 (the previous version was
3.48.0). As such, this version check would wrongly accept e.g. 48.0.

Fixes: e9341568fa ("meson: require sysprof-capture-4 >= 4.49.0")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38557>
2025-11-20 20:53:36 +00:00
Samuel Pitoiset
a729b0ebaa meson: require drm-shim for ACO tests
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38536>
2025-11-20 09:53:29 +00:00
Janne Grunau
1f144081ec meson: Add asahi to aarch64's auto-generated drivers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Since the Apple silicon M1 and M2 series of SoCs support only aarch64
split the lists for 'arm' and 'aarch64'.

Signed-off-by: Janne Grunau <j@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38341>
2025-11-19 11:16:53 +00:00
Samuel Pitoiset
b2a13ce92c radv/tests: require drm-shim and use it instead of RADV_FORCE_FAMILY
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38507>
2025-11-19 07:11:05 +00:00
Christian Gmeiner
e9341568fa meson: require sysprof-capture-4 >= 4.49.0
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When Mesa is compiled with sysprof support, applications can crash with a
segfault during shutdown. This happens because sysprof_collector_mark()
registers thread-local storage destructors that get called after the library
containing the destructor code has been unloaded.

The problem was fixed in sysprof https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/152

CC: mesa-stable
Closes: mesa/mesa#13571
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38347>
2025-11-12 12:00:46 +00:00
Andy Hsu
be9e0f2f6a meson: Support intel tools on Android.
Signed-off-by: Andy Hsu <hwandy@google.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38131>
2025-11-04 06:18:19 +00:00
Aitor Camacho
7c268a1e91 kk: Add KosmicKrisp
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37522>
2025-10-20 17:46:38 +00:00
Mary Guillemard
b2accf86d1 poly: Migrate AGX's GS/TESS emulation to common code
This moves most of the code to a new home: src/poly.
Most precomp kernels logic that could be moved are provided by poly now.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37914>
2025-10-16 19:25:35 +00:00
Tomeu Vizoso
2581c3ab60 ethos: Initial commit of a driver for the Arm Ethos-U65 NPU.
Supports all models in the test suite. No optimizations implemented yet.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36699>
2025-10-15 20:10:15 +00:00
Aitor Camacho
a1c8b21774 wsi/metal: Disable reference counting
Reviewed-By: Aleksi Sapon <aleksi.sapon@autodesk.com>
Acked-By: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37493>
2025-10-13 20:17:16 +00:00
Ashish Chauhan
6e189ba6c1 pvr: Drop '-experimental' suffix from the 'imagination' build option
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The imagination-experimental flag has been replaced with the imagination flag,
as the driver is now Vulkan conformant.

Signed-off-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37761>
2025-10-10 15:29:04 +00:00
Aitor Camacho
f21d0f2cbe meson: static link spirv-tools for darwin
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37495>
2025-10-06 15:19:55 +00:00
Mauro Rossi
dd2476a257 amd: require LLVM when amd-use-llvm is enabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Commit 2aaa6ebb "build/amd: add amd-use-llvm build option"
allows to build radeonsi and radv without LLVM dependency
so LLVM constraint is applicable when amd-use-llvm=true

Fixes: 82047fa8 ("amd: drop support for LLVM 15, 16, 17")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37695>
2025-10-04 11:57:44 +02:00
Sil Vilerino
0556fa09f0 ci: Bump DirectX-Headers and Agility SDK dependencies to 1.618.1
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37581>
2025-10-01 14:46:15 -04:00
Fafa Kitten
42a78a1aae meson: detect memfd_create() and getrandom() from headers, not system libraries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
When compiling Mesa on Android targeting Android, under some conditions `memfd_create()` and `getrandom()` are detected as available when they are not, so they should not be assumed to be available unless they are detected by Meson as available in the appropriate header passed in the `prefix` argument to Meson's `has_function()` method.

`memfd_create()` is not available unless the target Android API level is 30 (Android 11) or higher and the define `_GNU_SOURCE` (which in turn sets the define `__USE_GNU`) is set, and Mesa does set `_GNU_SOURCE`, so by setting `args: pre_args` in the appropriate call to `has_function()` (which causes `-D_GNU_SOURCE` to be added to the arguments used by Meson to check the header only if it was detected as necessary for `pre_args` in the earlier condition), `memfd_create()` will be correctly detected as available when targeting (only) Android 11 or newer (and other operating systems that support `memfd_create()`) after this PR,

and `getrandom()` is not available unless the target Android API level is 28 (Android 9) or higher, so `getrandom()` will be detected as available when targeting (only) Android 9 or newer (and other operating systems that support `getrandom()`) after this PR.

Related information:

https://android.googlesource.com/platform/bionic/+/refs/heads/android15-release/libc/include/sys/mman.h#186

https://android.googlesource.com/platform/bionic/+/refs/heads/android15-release/libc/include/sys/random.h#55

https://android.googlesource.com/platform/bionic/+/refs/heads/android15-release/libc/include/sys/cdefs.h#182

927f65caf3/meson.build (L1074)

cab3b67cfe/docs/markdown/Compiler-properties.md (does-a-function-exist)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13566
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37630>
2025-09-30 21:21:53 -05:00
Alyssa Ross
318b020831 meson.build: set with_clc for asahi tools
Even if both Asahi drivers are disabled, clc is still needed to build
the tools.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37636>
2025-09-30 17:37:32 +00:00
Alyssa Ross
14759757dd meson.build: remove dead code
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is already inside an `if with_clc`, so there was no case where
_llvmspirvlib_min_version was set to >= 8.0.1.3.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37635>
2025-09-30 17:02:31 +00:00
Mel Henning
e7a62d5eff util/macros: Add ATTRIBUTE_COLD
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37475>
2025-09-26 19:40:45 +00:00
Simon McVittie
9d36bf891b vulkan: Compute path to write into JSON manifests once, use it everywhere
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reduces duplication: we only need to distinguish between Windows
and Unix in one place.

The previous code was inconsistent about using either the `platforms`
option, or the `host_machine`. Following the logic described in
commit 94379377 "lavapipe: build "Windows" check should use the host machine, not the `platforms` option.",
I've assumed that checking the host machine is the more-correct version
and used that.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37576>
2025-09-26 10:47:31 +00:00