Commit Graph

797 Commits

Author SHA1 Message Date
Eric Engestrom
fa1cf83217 meson: allow checking for null pointers even if they're supposed to be non-null
../src/c11/impl/time.c: In function 'timespec_get':
    ../src/c11/impl/time.c:71:8: error: 'nonnull' argument 'ts' compared to NULL [-Werror=nonnull-compare]
       71 |     if (!ts)
          |        ^
    cc1: all warnings being treated as errors

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21558>
2023-02-28 11:46:20 +00:00
Yonggang Luo
ddf708a1ff meson: Split sse2_arg and sse2_args out of c_cpp_args
This is used to replace c_sse2_arg and c_sse2_args in latter commits

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21375>
2023-02-27 13:50:11 +00:00
Yonggang Luo
446630ab42 meson: When sse2 enabled, both c and cpp using sse2 options
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21375>
2023-02-27 13:50:11 +00:00
David Heidelberg
be2961de09 meson: print c_cpp_args
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21539>
2023-02-26 16:55:30 +01:00
Rob Clark
6a28986eb4 tu+meson: Re-work KMD selection
Now that turnip can support multiple kernel-mode drivers in a single
build, re-work the meson option to have a single list of KMDs, rather
than special options to enable kgsl for turnip or virtio for gallium.

It is temporarily a bit awkward as gallium does not yet support kgsl
and turnip does not yet support virtio.  But both of those are planned
or in-progress, so long term a single list is the most sensible option.

TODO freedreno/drm support to build with only virtio support.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21394>
2023-02-25 17:02:34 +00:00
Pavel Ondračka
a06ab9849d r300: drop VDPAU support
There is no UVD and the mpeg2 shader-based decoding is broken and doesn't
lead to CPU savings anyway. VDPAU output works, but there is no real
benefit so just disable VDPAU altogether so we can clean the backend a
bit and also open a way to potentially drop the mpeg2 deconding altogether
from the fronted.

Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20524>
2023-02-24 06:04:32 +00:00
Mark Collins
e4ebb541c5 meson: update flex/bison requirement to cover all usages
Meson silently drops outputs such as libvulkan-freedreno when
dependencies on flex/bison can't be satisfied rather than providing
an error which this commit fixes.

Signed-off-by: Mark Collins <mark@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21488>
2023-02-23 19:00:19 +00:00
Eric Engestrom
f059213f5d meson: reuse vulkan_wsi_list for defining vk_wsi_args
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497>
2023-02-23 09:42:46 +00:00
Sui Jingfeng
1ba3e83958 meson: add basic support for loongarch
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21182>
2023-02-22 09:09:43 +00:00
Eric Engestrom
adbe8b6c17 mesa: optimize out _mesa_is_desktop_gl*() and _mesa_is_gles*() calls when not built
This will in turn optimize out anything that's gated on those.

Suggested-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343>
2023-02-17 23:53:30 +00:00
Eric Engestrom
8a4c18afff meson: allow building GLES without GL
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343>
2023-02-17 23:53:30 +00:00
Eric Engestrom
8955340839 meson: make GLX require OpenGL
This isn't strictly true, but making that work isn't worth the effort;
see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343#note_1774683

Suggested-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21343>
2023-02-17 23:53:30 +00:00
Erik Faye-Lund
24a32b2cab Revert "meson: Fix Asahi build on macOS"
This reverts commit 4ca4a05627.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185>
2023-02-15 18:35:14 +00:00
Erik Faye-Lund
29ffc79410 meson: don't pass vk wsi args where they don't belong
Only code that cares about Vulkan WSI should get the corresponding
arguments passed. Otherwise, the Vulkan headers might end up including
other headers that we don't have the correct dependencies passed for.
So let's give those a dedicated variable, and only pass that where it's
actually needed.

Fixes: b39958a3a1 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8193
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185>
2023-02-15 18:35:14 +00:00
Yonggang Luo
9e934ee068 meson: Combine duplicated c_args and cpp_args
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19185>
2023-02-15 03:42:02 +00:00
Yonggang Luo
2626946490 meson: Split c_cpp_args from pre_args
pre_args should not include compiler options

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19185>
2023-02-15 03:42:02 +00:00
Erik Faye-Lund
139dd4e772 meson: remove unused USE_FOO_ASM defines
The usage of these defines was removed, so let's remove the definitions
as well.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21212>
2023-02-14 17:22:14 +00:00
Eric Engestrom
a72035f9c5 util: avoid calling kcmp on Android
On some combinations of Android version and kernel version, calling kcmp
results in seccomp killing the process.

As there doesn't seem to be a way to query for that in advance, skip
this check altogether on Android.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20180>
2023-02-12 17:11:16 +00:00
pal1000
4347072443 meson: Ignore unused variables when assertions are disabled
Fixes: 46b099e3
("meson: Ignore unused variables in release builds")

46b099e3 has some issues:
- it doesn't enable unused variables warning on release builds
with assertions enabled;
- it doesn't disable unused variables warning on debug builds
with assertions disabled;
- it doesn't disable unused variables warning when building
with MSVC and assertions are disabled regardless of buildtype,
see #8147. 3/4 regressions reported there have this limitation
alone as root cause.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21154>
2023-02-07 08:44:14 +00:00
Asahi Lina
4ca4a05627 meson: Fix Asahi build on macOS
!19950 introduced a dependency between NIR and Vulkan headers, and the
Vulkan headers try to include X11 headers we cannot find on macOS.

Disable this (we have no plans for Vulkan on the macOS testing platform
anyway).

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21059>
2023-02-05 09:15:48 +00:00
Dylan Baker
fd9b50aa1c meson: combine checks for linker --gc-sections support
We first do an incomplete check for whether the linker supports
--gc-sections, then potentially add C and C++ arguments assuming that it
works, then later do a complete check to see if it actually works and
use --gc-sections. This means we can end up putting functions and data
in separate sections when we can't gc them.

Combine the checks, do less work, and be more accurate.

fixes: f51ce21e4e
       ("meson: Drop adding -Wl,--gc-sections to project c/cpp arguments.")

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21083>
2023-02-03 17:48:58 +00:00
Eric Engestrom
6291d4d339 meson: turn android-libbacktrace into a feature option
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20915>
2023-02-01 06:33:52 +00:00
Karol Herbst
4b841cfec8 rusticl: fix build error with valgrind being enabled
This bumps the meson requierement to 1.0 because it requires
https://github.com/mesonbuild/meson/pull/11024

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7688
Fixes: 20c90fed5a ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19778>
2023-01-30 03:41:39 +01:00
Erik Faye-Lund
59625a68ff meson: remove deprecated dri-drivers option
This was deprecated in cdde031ac2 ("classic/i965: Remove driver"),
which is almost two years ago, and many major releases ago. Nobody
should be using this any more. Let's remove it.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20905>
2023-01-27 10:29:26 +00:00
Erik Faye-Lund
47d19196c1 meson: remove deprecated osmesa-bits option
We've released several new major versions since this was deprecated in
202cab3d30 ("meson: deprecate specifying osmesa-bits"), so it's
probably about time to remove it.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20905>
2023-01-27 10:29:26 +00:00
Erik Faye-Lund
713371c723 meson: remove dupliace add_devenv call
Looks like a bad merge-conflict resolution.

Fixes: 7bed7d9475 ("meson: use sections in summary()")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Thomas Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20908>
2023-01-27 09:34:00 +00:00
Tomeu Vizoso
b1bd6aa21a android: Make libbacktrace optional again
For the same reason why we used to have USE_LIBBACKTRACE with the old
Android makefiles, allow to build Mesa without linking to it.

In recent VNDK versions, libbacktrace isn't available.

When building without linking libbacktrace, for some reason some symbols
related to C++ exception handling are exposed. Allow them in the symbols
check script.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Helen Koike
0e286d0dbc android: allow system = 'android' on cross file
Allow building with system = 'android' on the cross file.
This avoids creating symlinks for the libs.

Suggested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Sergi Blanch Torné <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20019>
2023-01-25 08:58:25 -03:00
Juston Li
1709590439 util/fossilize_db: fix macOS inotify build error
require <sys/inotify.h> for fossilize_db

Fixes: 3b69b67545 ("util/fossilize_db: add runtime RO foz db loading via FOZ_DBS_DYNAMIC_LIST")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20755>
2023-01-23 18:31:48 +00:00
Thomas H.P. Andersen
7bed7d9475 meson: use sections in summary()
Makes the list easier to read

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
2023-01-20 04:22:40 +00:00
Thomas H.P. Andersen
6c0dc0b2a7 meson: use summary()
Make use of mesons summary() to create and align the configuration
summary.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
2023-01-20 04:22:39 +00:00
Dylan Baker
a79e6457d8 meson: use builtin support for reading version from a file
In meson 0.57 support was added for reading a version from a file to
meson natively, so we don't need this workaround anymore.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
2023-01-19 23:06:07 +00:00
Dylan Baker
c31629ee78 meson: remove version checks for < 0.59
Which is now required, so these are useless

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20752>
2023-01-19 23:06:07 +00:00
Dylan Baker
75276deebc meson: Use feature option methods for xmlconfig
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
37463bedec meson: use a feature option for shared-llvm
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
c52c2ed0f8 meson: use a feature option for egl
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
afa97e7468 meson: use a feature option for zstd
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
e3f60ea4a8 meson: use a feature option for xlib-lease
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
ce490a20e7 meson: use a feature option for power8
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
2653fe11c9 meson: use a feature option for lmsensors
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
202344e9a0 meson: use a feature option for libunwind
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
3f10a89180 meson: use a feature option for valgrind
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
d00c6e0fd7 meson: use a feature option for llvm
Still not as awesome as it should be, but an improvement over what we had
before.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
c40e1bb1d0 meson: use a feature option for gbm
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
6b334a8416 meson: use a feature option for gles2
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
ca615a4f16 meson: use a feature option for gles1
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
80eb78d7a4 meson: use a feature option for shared-glapi
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
98bd7cdb8c meson: use a feature option for shader_cache
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
b200d547dc meson: use a feature option for gallium-xa
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00
Dylan Baker
6f66b89ac3 meson: use a feature option for gallium-va
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
2023-01-19 16:29:03 +00:00