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