Commit graph

95 commits

Author SHA1 Message Date
LingMan
49446a62c0 meson: specify minimal target meson version for rust subprojects
Silences several meson warnings like:
```
../subprojects/equivalent-1.0.1/meson.build:9: WARNING: Project does not target a minimum version but uses feature introduced in '1.3.0': rust_abi arg in static_library.
```

The target of 1.7.0 was chosen since that's the minimal required meson version of the rust components in mesa anyway.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38814>
2025-12-12 17:28:49 +00:00
LingMan
f53f35cb32 meson: silence warnings in rust subprojects
Rust 1.91 as well as clippy show various benign warnings in our dependencies. Silence them since we
can't really do much about them anyway and we want to enforce clippy complience via CI in the
future.

Matches cargo behavior, which also doesn't show warnings or clippy lints outside the workspace.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38814>
2025-12-12 17:28:49 +00:00
LingMan
2044cf885b rust: build ucd-trie dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: e28ff81869 ("meson: Add pest rust dependencies")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38726>
2025-12-12 16:25:29 +00:00
LingMan
f95a5d5df8 rust: build paste dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: dde95fc039 ("meson,ci: Add the paste crate")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38726>
2025-12-12 16:25:28 +00:00
LingMan
d757018e77 rust: build equivalent dependency with the correct edition
Although a crate may happen to be compatible with multiple editions, building with the wrong
edition can - generally speaking - lead to subtle bugs.

There are no known failures in this case, but better to match the official Cargo.toml anyway.

Fixes: 9e3e12e6a9 ("meson: Add indexmap rust dependencies")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38726>
2025-12-12 16:25:28 +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
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
Gurchetan Singh
01bb498e16 util: be consistent about transitive dependencies
A transitive dependency is a dependency of a dependency.
So if, for example, mesa3d_util does explicitly use
zerocopy-derive, it should not need to a depend on it.

The package that pulls in transitive should already
include it has a dependency.  This provides clearer
methodologies in maintaining Rust code, similiar to
how Cargo.toml handles it.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
a2b42083e4 subprojects: errno: support for windows
This adds the support necessary to compile for windows.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
b6094567a7 subprojects: rustix: enable windows + macos build support
This is a matter of adding the right dependencies
and using them.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
7aec401b62 subprojects: add windows-link and windows-sys
Useful for Kumquat use cases.  Actually, useful for pretty much
anything Windows-related.  This are foundational crates supported
officially by our friends at Microsoft.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
d60c19fd10 subprojects: enable proper cross-compile on MinGW of certain crates
The virtgpu_kumquat deps -- used by gfxstream -- don't work
with cross-compile.  This is because they set "native: true" even
for host machine deps.

In addition, some proc-macro deps (which need "native: true") try
to link against host machine deps.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Gurchetan Singh
b7a5c4a951 subprojects: update rustix and libc to newer versions
Useful for future refactors.

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
2025-11-24 06:56:07 -08:00
Eric Engestrom
5db246a5ba perfetto: use the new upstream repo
The old one was abandoned without so much as a README note.

This will also allow using newer releases than 47; the current one being
53, but this MR doesn't address that, as it aims to be a simple no-op
change.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38525>
2025-11-20 07:07:42 +00:00
Faith Ekstrand
b407fef097 Update the Vulkan-profiles wrap to 1.4.330 and re-enable zink_check_requirements
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14176
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38080>
2025-10-27 10:04:48 -04: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
Antonio Ospite
9d26eb9a2f subprojects: fix ignore exception for files under packagefiles/
Fix the rule about not ignoring files under subprojects/packagefiles/
which is not covering files in subdirectories of
subprojects/packagefiles

Acked-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36710>
2025-08-25 15:55:53 +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
Faith Ekstrand
291ccffd3d subprojects: Stop calling add_languages() in paste-1-rs/meson.build
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36849>
2025-08-20 17:06:47 +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
Paolo Bonzini
8ea232a9ae meson: rename Rust subprojects to NAME-SEMVER-rs
Use the convention for Rust subprojects that was adopted by Meson 1.5.0
and newer.

Distros would prefer to avoid vendored crate sources, and instead use
local sources from e.g. /usr/share/cargo/registry.  While Meson does not
support a local registry, it can be emulated with MESON_PACKAGE_CACHE_DIR.

However, because the distro might not be using the exact version of the
package, but only one that has the same semver, packagers need to add
some hacks to rewrite the wrap files.  For example, in Fedora:

    export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"
    # So... Meson can't actually find them without tweaks
    %define inst_crate_nameversion() %(basename %{cargo_registry}/%{1}-*)
    %define rewrite_wrap_file() sed -e "/source.*/d" -e "s/%{1}-.*/%{inst_crate_nameversion %{1}}/" -i subprojects/%{1}.wrap
    %rewrite_wrap_file proc-macro2
    %rewrite_wrap_file quote
    %rewrite_wrap_file syn
    %rewrite_wrap_file unicode-ident
    %rewrite_wrap_file paste

Having a common convention for the name of Rust wraps makes it possible
to perform this transformation with a script without listing
the wraps one by one, and to share the script across multiple packages
(which will be useful when QEMU starts using Rust in a similar way to Mesa).

For an example of such a script, see
https://lore.kernel.org/r/20250722083507.678542-1-pbonzini@redhat.com/.

Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36284>
2025-07-24 17:52:34 +00:00
Gurchetan Singh
d978cbf944 mesa: subprojects: remove linux-raw-sys backend and use libc
This is because Android prefers it -- the project likes to make
changes to bionic that have a global effect, and using raw-syscalls
potentially complicates that.  This is a backport of:

https://github.com/bytecodealliance/rustix/pull/1478

In addition, nothing in Mesa3D needs the added functionality provided
by raw syscalls.

Test:

meson setup gfxstream-build -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvirtgpu_kumquat=true -Dopengl=false -Drust_std=2021

still compiles.

Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36116>
2025-07-14 10:23:47 -07:00
Vinson Lee
406066c6f6 subprojects: Update linux-raw-sys to 0.7.0
Fix build error with rustix-1.0.7.

error[E0425]: cannot find value `MAP_DROPPABLE` in module `linux_raw_sys::general`
   --> ../subprojects/rustix-1.0.7/src/backend/linux_raw/mm/types.rs:109:51
    |
109 |         const DROPPABLE = linux_raw_sys::general::MAP_DROPPABLE;
    |                                                   ^^^^^^^^^^^^^ not found in `linux_raw_sys::general`

Fixes: 8a2f43c9bd ("util: rust: update to rustix 1.0.7")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13460
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35930>
2025-07-09 06:16:43 +00:00
Gurchetan Singh
8a2f43c9bd util: rust: update to rustix 1.0.7
Latest tagged release.  Fedora uses it, and for it to
work on Android we'll need to latest release so a pure
libc backend can be used.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35768>
2025-06-26 17:11:41 +00:00
Gurchetan Singh
68c70c3eff subprojects: add zerocopy
Version 0.8.13 supported in:

     - AOSP
     - Fedora (https://src.fedoraproject.org/rpms/rust-zerocopy)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
15b100770b subprojects: add remain
Version 0.2.12 or greater supported in:

  - AOSP
  - Fedora (https://src.fedoraproject.org/rpms/rust-remain)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
85f620cabc subprojects: add thiserror
Version 2.0.11 or greater supported in:

  - Android
  - Fedora (https://src.fedoraproject.org/rpms/rust-thiserror)
  - Debian

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
92d7504de3 subprojects: add log
Version 0.4.27 available in:

- AOSP
- Fedora (https://src.fedoraproject.org/rpms/rust-log)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
043d503f9d subprojects: add rustix
Version 0.38.31 available:

   - AOSP
   - Fedora (https://bodhi.fedoraproject.org/updates/?packages=rust-rustix)
   - Debian (https://tracker.debian.org/pkg/rust-rustix)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
e04026adde subprojects: add linux-raw-sys
Version 0.4.14 or above supported in:

    - AOSP
    - Fedora
      (https://bodhi.fedoraproject.org/updates/?packages=rust-linux-raw-sys)
    - Debian

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
f02e60409b subprojects: add errno
Version 0.3.12 in:

     - Fedora
       (https://packages.fedoraproject.org/pkgs/rust-errno/rust-errno+default-devel/)
     - AOSP (0.3.8, but should still work)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
59e2d1e549 subprojects: add libc
Version 0.2.168 supported in:

     - Android
     - Fedora
       (https://bodhi.fedoraproject.org/updates/?packages=rust-libc)
     - Debian (https://tracker.debian.org/pkg/rust-libc)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
734dd83494 subprojects: add bitflags
Version 2.9.1 supported in:

    - Android
    - Fedora (https://src.fedoraproject.org/rpms/rust-bitflags)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
f20d43d654 subprojects: add cfg-if
Version 1.0.0 supported in:

    - AOSP
    - Fedora
      (https://bodhi.fedoraproject.org/updates/?packages=rust-cfg-if)
    - Debian (https://tracker.debian.org/pkg/rust-cfg-if)

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
35894b5c87 subprojects: add more syn features
This is needed by the zerocopy crate.

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
71ff4ab788 subprojects: update syn to 2.0.87
Fedora is at 2.0.90 now.

https://src.fedoraproject.org/rpms/rust-syn

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
62e36aeb95 subprojects: update quote to 1.0.35
Debian is at 1.0.37

https://tracker.debian.org/pkg/rust-quote

Acked-by: Aaron Ruby <aruby@qnx.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Gurchetan Singh
c9c3a1f869 subprojects: fix missing space between colon and license string
Essentially:

find ./ -type f -exec sed -i -e "s/license :'/license : '/g" {} \;

Suggested-by: @LingMan
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
2025-06-17 22:28:54 +00:00
Matt Turner
278d894146 meson: add wrap for libdrm
This allows building Mesa with the Android NDK, which doesn't provide
libdrm.

We will generate an `Android.bp` file using the `ninja-to-soong` tool
(https://github.com/rjodinchr/ninja-to-soong), and to do this we run
Mesa's standard meson build system to generate the ninja commands that
we then translate to soong.

That meson invocation is done using the Android NDK, which doesn't
provide libdrm, so until we find an alternative solution[*] we provide a
wrap file that builds libdrm as part of the Mesa build (but does not
install it--we still use the Android-provided libdrm at runtime)

Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35058>
2025-05-27 16:07:29 +00:00
Echo J
586ad02b9c subprojects: Don't use native option for rustc-hash dependency
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This should fix the 32-bit NVK build

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35037>
2025-05-18 13:56:34 +00:00
Echo J
4605592db2 subprojects: Don't ignore Meson wrappers in gitignore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35037>
2025-05-18 13:56:34 +00:00
Mel Henning
c1f979d84a nak: Add a dependency on rustc-hash
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34865>
2025-05-16 01:40:04 +00:00
LingMan
9ddc160012 meson: Sync subproject version numbers in packagefiles with their .wrap equivalents
These tell meson which version the `.wrap` file downloads and should therefore always stay in sync.
No dependency is actually being updated here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34368>
2025-04-04 21:22:27 +00:00
LingMan
83bf45b0ce meson: Update pest subproject family
Starting with Rust 1.83 this benign warning is show when compiling the pest dependency:

```
warning: elided lifetime has a name
   --> pest/src/iterators/pairs.rs:330:70
    |
89  | impl<'i, R: RuleType> Pairs<'i, R> {
    |      -- lifetime `'i` declared here
...
330 |     ) -> Filter<FlatPairs<'i, R>, impl FnMut(&Pair<'i, R>) -> bool + '_> {
    |                                                                      ^^ this elided lifetime gets resolved as `'i`
    |
    = note: `#[warn(elided_named_lifetimes)]` on by default
```

Meson, at least as of version 1.7.0, unfortunately does not suppress warnings originating in dependencies.
Upstream has resolved the warning in 2.8.0, so update to that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34368>
2025-04-04 21:22:27 +00:00
Benjamin Lee
094177b9b5 meson: update wayland-protocols source_hash
This was missed when updating to 1.41.

Signed-off-by: Benjamin Lee <benjamin.lee@collabora.com>
Fixes: 53b40a40f4 ("increase required wayland-protocols version to 1.41")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33752>
2025-02-26 10:53:25 +00:00
Xaver Hugl
53b40a40f4 increase required wayland-protocols version to 1.41
This version contains the color management protocol.

This commit also adjusts the build-wayland script to mention
that the DEBIAN_BASE_TAG also has to be bumped.

Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32038>
2025-02-25 21:24:11 +00:00
Derek Foreman
cdef622a0a meson: Update wayland-protocols to 1.38
Update the wrap and the dependency, as well as bumping several build tags.

I've also turned off wayland-protocols tests, as we don't want to bump the
wayland-scanner version at this time.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26150>
2024-11-07 00:03:23 +00:00
Sil Vilerino
702bd657cc ci: Bump DirectX-Headers and Agility SDK dependencies to 1.614.1
Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31092>
2024-09-12 15:01:18 +00:00
Rob Clark
1d8283be36 subprojects: perfetto uprev to v47.0
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30555>
2024-08-08 19:29:00 +00:00