Commit Graph

954 Commits

Author SHA1 Message Date
Caio Oliveira
f6e7d1dca2 meson: Update Lua dependency version to 5.3
Lua is used for unittests in Freedreno.  When this was added, 5.3 was too new,
now this version is available in debian stable (and oldstable). A notable
improvement in Lua 5.3 is better handling for integers. Note the wrap provided
in subprojects/ already uses 5.4.

Also move the dependency up so other tools/tests can use it.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30062>
2024-08-14 03:03:46 +00:00
Matt Turner
b3430a7bb8 util: Add ATTRIBUTE_OPTIMIZE(flags)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30622>
2024-08-13 20:35:23 +00:00
Jesse Natalie
169f8ec227 meson: Add an error message for llvmpipe without llvm draw support
Fixes: 010b2f9497 ("gallium/meson: Deconflate swrast/softpipe/llvmpipe")
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30577>
2024-08-09 18:45:11 +00:00
Karol Herbst
f7f343796f meson: centralize checking for new enough meson for rust support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
b3a9c91d9b meson: centralize bindgen version check
It's entirely duplicated and every rust user also wants to use bindgen
anyway. This way bindgen won't show up multiple times in the meson log
as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
03ecda08de meson: centralize rust handling
This bumps the req for everything, but I think that's fine, because one
part restricting to a lower rust version doesn't make much sense as we are
also not doing it generally for C or C++.

This also makes it easier for packagers to know what requires rust.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:43 +00:00
Karol Herbst
cc37ecc7ba rusticl: bump rust req to 1.76
Current FireFox ESR requires 1.76, so this is an update according to our
rust update policy.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30414>
2024-07-31 16:22:42 +00:00
Eric Engestrom
5d84e6cf26 meson: improve wording of "incompatible llvm options" error
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30366>
2024-07-28 06:34:39 +00:00
Eric Engestrom
77b69cdbc3 meson: don't select the deprecated swrast option ourselves
Users get the deprecation warning but didn't do anything, they left
things to `auto` and we pick the deprecated `swrast`? Hardly seems fair!

(I forgot to do this when I added the deprecation warning to ajax's commit)

Fixes: 010b2f9497 ("gallium/meson: Deconflate swrast/softpipe/llvmpipe")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30366>
2024-07-28 06:34:39 +00:00
Alyssa Rosenzweig
5bc8284816 hk: add Vulkan driver for Apple GPUs
Honeykrisp is a Vulkan 1.3 driver for Apple GPUs. It currently support M1 and
M2, future hardware support is planned. It passed CTS a few months ago and with
two exceptions[1] should still pass now.

Compared to the May snapshot that passed conformance [1], this adds a bunch of
new features, most notably:

* Geometry shaders
* Tessellation shaders
* Transform feedback
* Pipeline statistics queries
* Robustness2
* Host image copy

Theoretically, we now support everything DXVK requires for D3D11 with full
FL11_1. To quote Rob Herring:

   How's performance? Great, because I haven't tested it.

This driver is NOT ready for end users... YET. Stay tuned, it won't be long now
:}

I would like to reiterate: Honeykrisp is not yet ready for end users. Please
read [3].

Regardless, as the kernel UAPI is not yet stable, this driver will refuse to
probe without out-of-tree Mesa patches. This is the same situation as our GL
driver.

On the Mesa side, the biggest todo before the release is improving
performance. Right now, I expect WineD3D with our GL4.6 driver to give better
performance. This isn't fundamental, just needs time ... our GL driver is 3
years old and honeykrisp is 3 months old.

On the non-Mesa side, there's still a lot of movement around krun and FEX
packaging before this becomes broadly useful for x86 games.

At any rate, now that I've finished up geometry and tessellation, I'm hopefully
done rewriting the whole driver every 2 weeks. So I think this is settled enough
that it makes sense to upstream this now instead of building up a gigantic
monster commit in a private branch.

[1] Pipeline robustness and pipeline statistics are included in this tree but
    need bug fixes in the CTS to pass. This is being handled internally in
    Khronos. These features may be disabled to get a conformant driver.

[2] https://rosenzweig.io/blog/vk13-on-the-m1-in-1-month.html

[3] https://dont-ship.it/

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30382>
2024-07-26 18:40:47 +00:00
Adam Jackson
e8c1d966e5 meson: Introduce the legacy-x11 option
We're going to use this to hide support for excessively old or weird
xserver environments.

Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29969>
2024-07-26 11:38:42 +00:00
Yiwei Zhang
3e6b73a75a Revert "meson: disallow Venus debug + LTO build via GCC"
This reverts commit 423ba5d1c7.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30355>
2024-07-25 19:14:31 +00:00
Eric Engestrom
aed5a974e9 meson: xcb & xcb-randr are needed by the loader whenever x11 is built
Specifically, `src/loader/loader_dri_helper.c` needs them.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11536
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30292>
2024-07-23 09:16:55 +00:00
Daniel Stone
bed6e0d691 build: Check for PyYAML in Meson build
Closes: #11540
Fixes: ccc6442d6f ("u_format: Rewrite format table to use YAML")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30272>
2024-07-20 08:05:44 +00:00
Jessica Clarke
ec55a6c329 Revert "meson: fix with_dri2 definition for GNU Hurd"
This reverts commit ad862c36e5.

This change does not work, because libdrm is required if with_dri2 is
true. Moreover, we don't want all of DRI2 on Hurd, we just want the
egl_dri2 driver, as done by autotools. So first revert this to stop
trying to build all of DRI2.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
2024-07-20 06:53:42 +00:00
Jessica Clarke
8461776a09 Revert "meson: Do not require libdrm for DRI2 on hurd"
This reverts commit 2fd85105c6.

Despite its name, egl_dri2 works under plain DRI without DRI2, and the
old autotools build system built it when $enable_dri = yes, with no
check for DRI2. A future commit will adapt meson.build to follow that
approach rather than this hackier one.

Note that the case removed in the second hunk is already dead code,
since system_has_kms_drm is false on GNU/Hurd, and could have been
dropped as part of 66d2ae0386 ("meson: forcefully disable libdrm when
host doesn't have it").

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/587>
2024-07-20 06:53:42 +00:00
Adam Jackson
010b2f9497 gallium/meson: Deconflate swrast/softpipe/llvmpipe
This adds explicit names for softpipe and llvmpipe to the gallium driver
list. "swrast" is treated as a compatibility name that selects both. We
clarify how lavapipe depends on (just) llvmpipe, and we make it possible
to build llvmpipe without softpipe.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27607>
2024-07-18 17:48:20 +00:00
Adam Jackson
3de62b2f9a gallium/dril: Compatibility stub for the legacy DRI loader interface
This provides just enough of a "DRI driver" for non-glamor-using
xservers to initialize GLX and enable direct clients. We build it if you
build DRI support for GLX, or if you build any X11 client support for
EGL. We only build it at this point, we'll swap it into the install
next.

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Co-authored-by: Pavel Ondračka <pavel.ondracka@gmail.com>

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:05 +00:00
Yukari Chiba
6f02ec5ed1 llvmpipe: add an implementation with llvm orcjit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26018>
2024-07-16 12:22:29 +10:00
C Stout
b16b1d05c5 meson: remove unnecessary line continuation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30190>
2024-07-15 18:46:31 +00:00
Pierre-Eric Pelloux-Prayer
253f26558a radeonsi, radv: bump libdrm_amdgpu version requirement
This will be needed for virtio native context support.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30043>
2024-07-09 17:54:49 +00:00
David Heidelberg
68215332a8 build: pass licensing information in SPDX form
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29972>
2024-06-29 12:42:49 -07:00
Karol Herbst
646a0ea576 meson: rename with_gallium_opencl to with_gallium_clover
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
2024-06-27 20:50:32 +00:00
Patrick Lerda
82e9880b04 clover: fix meson opencl-spirv option
As reported by https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
this option is broken. Indeed, when "with_clc" is false the compilation
process failed with the following error:
"ERROR: Unknown variable "idep_mesaclc".

Fixes: 815a6647eb ("meson: do not pull in clc for clover")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10674
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29646>
2024-06-27 20:50:32 +00:00
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
Mingcong Bai
cfa0293c8b meson: set default Vulkan drivers for ppc, ppc64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29827>
2024-06-21 05:22:28 +00:00
Mingcong Bai
32e781f381 meson: set default drivers for ppc, ppc64
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29811>
2024-06-20 20:00:26 +00:00
Konstantin Seurer
3233d19f87 zink: Always include renderdoc_app.h
Removes the dependency on a system wide installation ot the renderdoc
header.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28892>
2024-06-20 07:02:15 +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
Dylan Baker
46644ba371 meson: use glslang --depfile argument when possible
This reduces the amount of manual dependency tracking developers need to
do. This is turned on if glslang >= 11.3.0 is used, or 11.9.0 on
Windows, but otherwise the status quo is maintained. This means I have
not removed any use of `depend_files`. We could make make these hard
requirements and remove the use of `depend_files` too.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28329>
2024-05-20 17:34:17 +00:00
Karol Herbst
3e3eab12d8 rusticl: bump meson req to 1.4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25265>
2024-05-16 06:40:59 +00:00
Yiwei Zhang
423ba5d1c7 meson: disallow Venus debug + LTO build via GCC
This is likely a GCC issue per below (always succeed with clang):

|with gcc                  |optimization   |-Db_lto=true|
|-                         |-              |-           |
|-Dbuildtype=plain         |plain (default)|fail        |
|-Dbuildtype=debug         |0 (default)    |fail        |
|-Dbuildtype=debugoptimized|2 (default)    |succeed     |
|-Dbuildtype=release       |3 (default)    |succeed     |
|-Dbuildtype=minsize       |s (default)    |succeed     |
|-Dbuildtype=custom        |plain          |fail        |
|-Dbuildtype=custom        |0              |fail        |
|-Dbuildtype=custom        |g              |succeed     |
|-Dbuildtype=custom        |1              |succeed     |
|-Dbuildtype=custom        |2              |succeed     |
|-Dbuildtype=custom        |3              |succeed     |
|-Dbuildtype=custom        |s              |succeed     |

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28729>
2024-05-08 19:58:24 +00:00
Eric Engestrom
47f6e24ad5 meson: move tsan-blacklist.txt to build-support with the other build support files
Fixes: 0d46e0e88b ("meson: Add blacklist when compiling with tsan")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28996>
2024-05-01 07:05:12 +00:00
Eric Engestrom
a963c67298 meson: use bool.to_int() instead of manually converting
Suggested-by: @dbaker
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28990>
2024-04-30 18:34:08 +00:00
Eric Engestrom
7187373ec2 meson: always set USE_LIBGLVND
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28947>
2024-04-30 16:22:50 +00:00
Eric Engestrom
11b060f41a meson: simplify -gsplit-dwarf compiler argument check
Fixes: 44b080af07 ("meson: implement split-debug")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28898>
2024-04-30 15:30:59 +00:00
JCWasmx86
7352f948be meson: Fix invalid kwarg name
Introduced in !28576

Fixes:  44b080af ("meson: implement split-debug")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28924>
2024-04-29 20:52:12 +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
Lucas Fryzek
112063a060 llvmpipe: Only use udmabuf if header is found
Fixes #11032

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28810>
2024-04-18 22:20:58 +00:00
Erik Kurzinger
899263ecfc wsi/x11: support explicit sync
This adds support to the X11 WSI for explicit synchronization using DRM
syncobjs. It relies on versions 1.4 of the DRI3 and Present extensions.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27226>
2024-04-16 02:40:01 +00:00
Gert Wollny
0d46e0e88b meson: Add blacklist when compiling with tsan
Check whether the compiler actually supports it and if
not than warn about it. Note that meson will also
suggest that one should use the build-in flag, but this
is just sloppy testing for -fsanitize, -fsanitize-blacklist
is actually not available as build-in option.

v2: define THREAD_SANITIZER to 1 or 0 (suggested by Yonggang Luo)
v3: Update comment about meson warning (Dylan Baker)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28650>
2024-04-11 13:52:36 +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
Eric Engestrom
3a4a16e9e8 meson: regroup glvnd lines to get an easier-to-review diff in the next commit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26367>
2024-04-06 18:40:46 +00:00
Joshua Ashton
dd16c28b78 meson: Bump wayland-protocols requirement to 1.34
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25709>
2024-04-02 13:09:38 +00:00
Karol Herbst
88a9576a3e meson: fix link failure with llvm-18
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10739
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10775
cc: mesa-stable

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28267>
2024-03-29 07:31:02 +00:00
Sil Vilerino
cc04a04f13 d3d12: Bump directx-headers dependency to v613
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28424>
2024-03-28 21:31:25 +00:00
Yonggang Luo
1d18aba016 meson: Remove the non-used -DDEBUG manually
And also remove the workarounds for LLVM and bellagio

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Yonggang Luo
0578f13fc9 meson: Define MESA_DEBUG for latter usage
rationale:
DEBUG is easily conflict with third-party headers, for example LLVM https://github.com/llvm/llvm-project/issues/24002#issuecomment-1673922017
And amdcommon's addrlib

And according to https://github.com/llvm/llvm-project/issues/24002#issuecomment-1673922017
LLVM is already switched to LLVM_DEBUG, I think it's time for mesa switch to MESA_DEBUG for #ifdef DEBUG.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:34 +00:00
Yonggang Luo
5d3ce49e76 meson: Extract with_mesa_debug and with_mesa_ndebug for latter usage
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-03-22 18:22:33 +00:00
Marek Olšák
4ed3418a43 Unbreak Viewperf by reverting "util: use crc32_z instead of crc32 and bump zlib dep to 1.2.9"
It breaks apps shipping their own copy of zlib, such as Viewperf.
If we use crc32_z, Viewperf is unable to start because it's an undefined
symbol.

This reverts commit 010272b62e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28233>
2024-03-19 03:08:10 +00:00