Commit Graph

234 Commits

Author SHA1 Message Date
Erik Faye-Lund
c26d4ee44f meson: build html-docs
This allows us to build our Sphinx-based documentation from the meson
build system.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11494>
2024-06-25 10:59:54 +00:00
Mike Blumenkrantz
2aaa6ebba1 build/amd: add amd-use-llvm build option
this allows amd drivers to disable llvm support while still allowing
llvmpipe/lavapipe to be built

by disabling llvm support in amd drivers, the load times for these drivers
decreases by 5-10ms

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28969>
2024-05-30 19:05:00 +00:00
David Heidelberg
44b080af07 meson: implement split-debug
split-debug uses C args `--gsplit-dwarf` and linker args `--gdb-index`
to achieve split debug, speed up the CI linking, and allow us to
distribute debug symbols standalone.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28576>
2024-04-23 18:31:39 +00:00
Christian Gmeiner
7d33bab3b4 meson: Add missing newline at eof
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28747>
2024-04-15 19:28:40 +00:00
Eric Engestrom
d5aefb7a16 meson: auto-enable glvnd when libglvnd is installed
We've talked about flipping the default value of `glvnd` to `true`
a bunch of times but never actually went through with it because some
don't want to use glvnd, so let's instead go for the middle ground of
"enabled glvnd by default if it's installed".

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:47 +00:00
Eric Engestrom
4f25b84b24 meson: turn glvnd option into a feature
Makes for nicer code, and allows the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:46 +00:00
José Roberto de Souza
31920cb60c intel: Enable Xe KMD support by default
Xe KMD landed on drm-next, uAPI is now stable and we can remove
the build time parameter to enable support to it but platforms
older than Lunar lake will have experimental support with Xe KMD.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20418>
2024-03-12 22:22:50 +00:00
Sil Vilerino
55e377e965 d3d12: Add partial media, compute, graphics support with CORE and GENERIC feature levels
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27997>
2024-03-06 23:06:59 +00:00
Faith Ekstrand
75785749ef meson: Rename nouveau-experimental to nouveau and build by default on x86
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27832>
2024-02-28 19:58:28 +00:00
Dylan Baker
876db91350 meson: rework intel-rt option to be a feature
This allows intel-rt to be turned on in cases where we're on x86_64 and
we're building anv, but otherwise default to off, while still giving
users the power to ignore those defaults if they want to.

Because of the use of `feature.disable_if` this bumps the Meson
requirement to 1.1. I can get rid of that, but it just makes for a lot
more code than using the helper methods

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
2024-02-16 18:28:58 +00:00
Dylan Baker
6a126b75e0 meson: drop intel-cl deprecation of 'false'
It maps to `disabled`, which isn't actually an option.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27645>
2024-02-16 18:28:58 +00:00
Lionel Landwerlin
a512c2a8b5 meson: enforce build of intel-clc with anv/iris
If we do a native build, regardless of the host architecture and we
build Anv or Iris, we need intel-clc. So force building that tool.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10601
Fixes: b52e25d3a8 ("anv: rewrite internal shaders using OpenCL")
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27593>
2024-02-13 15:31:10 +00:00
Lionel Landwerlin
1e31fd5f42 meson: add option to install intel-clc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
012489e55c meson: add a new option to enable intel-clc without building RT shaders
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797>
2024-02-13 00:06:44 +00:00
Max R
67da5a8f08 d3d10umd, meson: Allow naming d3d10umd DLLs
For graphics drivers on windows it is beneficial to have usermode DLLs
names matching driver overall name, example being vm3dum_10.dll and
nvwgf2um.dll for d3d10 usermode drivers from VMWare and Nvidia.

To implement that new meson option `gallium-d3d10-dll-name` that
names the resulting d3d10umd target DLL is introduced. Additionaly,
to avoid confusion `gallium-dll-name` is renamed to `gallium-wgl-dll-name`
as it corresponds to the name used in wgl target.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27416>
2024-02-05 16:59:22 +00:00
Karol Herbst
37a1346347 meson: remove opencl-external-clang-headers option and rely on shared-llvm
Setting opencl-external-clang-headers to enabled while using shared LLVM
was broken and this option was mostly used for windows to force static
inclusion of opencl base headers.

Simply relying on the shared-llvm option here is enough to get what we
want.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25568>
2024-01-31 12:23:49 +00:00
Tomeu Vizoso
af199e0ff0 teflon: Initial commit
Teflon is a Gallium frontend that TensorFlow Lite can load to delegate
the execution of operations in a neural network model.

See docs for more.

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25714>
2024-01-24 10:02:10 +00:00
Danylo Piliaiev
480ec5b1d4 freedreno/replay: Add WSL backend for Windows
d3dkmthk.h contains only non driver specific structs, private
data structs are not defined anywhere public but contain
important information for memory allocation and submissions.
Luckily only small parts of these structs are relevant for what
we want to do and most of them are not changed between calls.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26101>
2024-01-15 13:12:58 +00:00
Chris Spencer
50458703fa meson: Add option to ignore artificial Android limitations
Some capabilities are artificially disabled on Android to avoid running
afoul of the CTS. Make this behaviour opt-out so devices that don't need
strict conformance can take advantage of the full capabilities of the
driver.

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25101>
2023-12-13 20:09:37 +00:00
Sil Vilerino
d0c3556011 meson: Add all, all_free (default) options for video-codecs option.
- Adds new 'all' value to the video-codecs option
- Adds 'all_free' value to video-codecs and sets
   it as default value for non patent-encumbered
   codecs, restoring the behavior for these codecs
   before existing as options in commit 7b22dd8bfd

Fixes: 7b22dd8bfd ("meson: add vp9 and av1 codec support options")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26320>
2023-12-06 21:49:27 +00:00
Sil Vilerino
7b22dd8bfd meson: add vp9 and av1 codec support options
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26223>
2023-11-20 17:19:00 +00:00
Alyssa Rosenzweig
ef4aa24a15 meson: Add gallium-drivers=all option
Again, useful to lint common code changes and for our macbook-wielding rel
manager <3

Omits i915g due to dependency hell, everything else builds on fedora asahi.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25882>
2023-10-26 19:48:20 +00:00
Alyssa Rosenzweig
b70e948886 meson: Add vulkan-drivers=all option
To build-test everything, helpful to check common code changes before pounding
CI.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25882>
2023-10-26 19:48:19 +00:00
Faith Ekstrand
6af617095b nvk: Rip out old UAPI support
This was mostly generated by

    unifdef -DNVK_NEW_UAPI=1 -m src/nouveau/**/*.h

with a few manual fixups for device features and to remove includes and
strip out the meson bits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25357>
2023-09-26 05:05:26 +00:00
Matt Turner
28c1053c07 intel: Allow using intel_clc from the system
With -Dintel-clc=system, the build system will search for an `intel_clc`
binary and use it instead of building `intel_clc` itself.

This allows Intel Vulkan ray tracing support to be built when cross
compiling without terrible hacks (that would otherwise be necessary due
to `intel_clc`'s dependence on SPIRV-LLVM-Translator, libclc, clang, and
LLVM).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24983>
2023-09-01 21:36:02 +00:00
Bas Nieuwenhuizen
11198951e6 util/perf: Add gpuvis integration.
Initial integration, still needs the init functions to be changed
across the codebase.

For the context usage https://github.com/mikesart/gpuvis/pull/82 is
needed to display it correctly in gpuvis.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22505>
2023-08-19 23:09:45 +02:00
Faith Ekstrand
8c62b3938a nvk: Enable the new UAPI
We also add a meson option to disable it and re-enable the legacy API.
This code probably won't last long but it gives developers the option.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:32:07 +00:00
Karol Herbst
83786bf1c9 nvk: add vulkan skeleton
This is enough to run vulkaninfo without crashing.

Jason:
* Drop a redundant nvk_device_entrypoints
* Add some VKAPI_ATTR and VKAPI_CALL
* nvk: Move EnumerateInstanceExtensionProperties to the top
  This way things are more-or-less in initialization order.  First the
  version then extensions then create the instance.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
2023-08-04 21:31:52 +00:00
Eric Engestrom
4ef16e34a8 meson: clarify description of opengl option
There was some confusion from users as to whether disabling this option
disables OpenGL ES as well, so let's remove the confusing "all versions"
note and specify this affects "desktop OpenGL" only.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24113>
2023-07-12 12:24:43 +00:00
Dylan Baker
6788aade62 meson: Add back execmem option as a deprecated option
I've been betting support requests by people confused as to why their
builds broke because this option was removed. We can add the option back
with the deprecated flag set so that Meson will give a nice warning, but
builds will continue to work.

fixes: 1dd1147408

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23893>
2023-06-30 16:35:22 +00:00
Yonggang Luo
e44773b6d6 meson: Use consistence disabled/enabled comment for shared-glapi option
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23793>
2023-06-22 11:08:11 +00:00
Dylan Baker
ce07aabab1 meson: Key whether to build batch decoder on expat
Instead of on Android. Which allows an end user to turn off expat
without breaking or disabling Intel support. I've additionally
refactored to separate expat and xmlconfig a bit more in the root
meson.build

This does make expat a hard dependency for building Intel tools, despite
the fact that only aubinator actually requires it. This simplifies the
build for the common case, and in the event that someone wants to build
the Intel tools and doesn't have libexpat, they can fall back to the
meson wrap for expat instead.

fixes: 75276deebc
closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8791

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23605>
2023-06-12 23:07:00 +00:00
Emma Anholt
1dd1147408 mapi: Delete execmem support code.
No longer used now that we don't dynamically generate dispatch stubs.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23451>
2023-06-12 21:37:37 +00:00
Dor Askayo
a28540a430 meson: add feature option for use of system Clang headers at runtime
Enabling or disabling the "microsoft-clc" option previously changed
shared logic for all compiler/clc users, which was surprising.

In addition, the option to avoid the use of system Clang headers at
runtime is useful outside the scope of Windows.

Separating the two concepts by making this a neutral feature option
addresses both matters.

Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23255>
2023-05-31 14:21:25 +00:00
Yiwei Zhang
7d76038712 meson/ci: promote virtio-experimental to virtio
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22547>
2023-05-03 22:42:30 +00:00
Eric Engestrom
a18f439f52 meson: allow feature options to take true/false to mean enabled/disabled
This reduces the pain of Meson having picked inconsistent value names.

See also https://github.com/mesonbuild/meson/pull/11279 where Meson devs
argue that allowing `foo=false` could be interpreted by users to mean
either `disabled` or `auto`, which I personally don't see.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21485>
2023-03-10 07:20:29 +00:00
José Roberto de Souza
7d34ec4691 intel: Add Meson parameter to enable Xe KMD support
The plan is to compile all the Xe files but in run time it will fail
to detect the KMD loaded and it will fall back to software
rendering(if build).

Compiling Xe files makes sure newer commits don't break Xe even if
developers don't have Xe enabled in their build folder.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21368>
2023-03-03 05:25:35 +00: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
Eric Engestrom
84e5d50b89 meson: improve formatting of options file
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21321>
2023-02-18 01:48:16 +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
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
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
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
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