Commit Graph

926 Commits

Author SHA1 Message Date
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
duncan.hopkins
0108bae30f apple: Meson defines GLX_USE_APPLE to allow for Gallium drivers to work on MacOS.
By default, on MacOS, MESA will build a version that does not run the Gallium drivers on MacOS.
GLX_USE_APPLE must be defined to switch the code over to using the Gallium drivers.

GLX_USE_APPLE will be defined if any Gallium driver other than just SWRast is requested.
The default behaviour, due to default values, always asks for SWRast.
This logic leaves the default behaviour alone but allows the Gallium drivers to be actived without extra parameters.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
duncan.hopkins
b0bdd0cae3 meson: relaxed some meson restrictions on MacOS/Apple allowing for wider build support.
This patch allows the meson build files, on MacOS, to build the DRI2 and EGL code paths.

This is needed to activate the gallium drivers for swrast and zink to be used.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28205>
2024-03-18 18:06:45 +00:00
Danylo Piliaiev
2aab8e0806 meson: Correctly get sizeof_pointer with cross-compilers
"native : true" used build system's compiler to determine
sizeof void*, which is wrong - we need to use host compiler.

Found when using pure NIX cross-compilation environment.

Fixes: ad34c932cd
("glapi: pass pointer size to python for glthread from meson")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.co
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28177>
2024-03-14 17:49:18 +00:00
Karol Herbst
821f4c8d99 nouveau: import libdrm_nouveau
Most of the code is copied as is, but there are a couple of changes:
- drop pre nvif code
- nouveau_list -> list_head
- pthread_mutex_t -> simple_mtx_t
- nvif_unwrap removed
- no assignments in if statements
- nouveau_object_mthd -> nouveau_device_info
- reworked object allocation UAPI calls

Most of the reworked code was copied from NVK or a previous version of it

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
2024-03-13 15:21:07 +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
Yonggang Luo
a367cd4931 Revert "meson/vulkan/util: allow venus to drop compiler deps"
This reverts commit 3923d43908.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26574>
2024-03-07 20:33:28 +00:00
Chris Rankin
f64e8ca7f4 meson: bump the minimal required vdpau version to 1.5
Signed-off-by: Chris Rankin <rankincj@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27825>
2024-03-07 07:55:19 +00:00
Luca Bacci
fe520ecfbf meson,windows: Use relative paths in Vulkan ICD manifest files
See https://github.com/msys2/MINGW-packages/issues/16065

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27468>
2024-03-01 20:09:59 +00:00
Boyuan Zhang
74f6392545 meson: bump the minimal required vdpau version to 1.4
VDP_YCBCR_FORMAT_P010 and VDP_YCBCR_FORMAT_P016 require ver 1.4 or above

Fixes: c3ceec6cd8 ("vdpau: Refactor query for video surface formats.")

Cc: mesa-stable

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27857>
2024-02-29 00:32:45 +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
Derek Foreman
eb1235f343 loader/wayland: Add named queue fallback
If libwayland isn't new enough to create event queues with names, just
throw away the name. It's just a debug feature anyway.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27824>
2024-02-28 11:01:31 +00:00
Sebastian Wick
a00f9c401b loader/wayland: Add fallback wl_display_dispatch_queue_timeout
This is almost a 1:1 copy of the same function in libwayland. If the version
with the symbol propagates far enough the fallback can be removed again.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27511>
2024-02-27 13:10:13 +00:00
Marek Olšák
ad34c932cd glapi: pass pointer size to python for glthread from meson
glthread (the python generator) needs to know the pointer size at compile
time to sort structure fields of calls for optimal structure packing based
on the CPU.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
2024-02-23 18:03:59 +00:00
Joshua Ashton
6767ad9c86 meson: Enable d3d12 in gallium_drivers by default on Windows
This is pretty much the only usable one that isn't
swrast for some people, eg. WoA + QCom.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27737>
2024-02-23 02:28:29 +00:00
Joshua Ashton
5a6de45bd5 meson: Enable zink in gallium_drivers by default
Zink is the only way to use hw accelerated GL on
a7xx and the preferred way for hw supporting NVK.

Start building Zink by default everywhere that we
would build swrast by default, except for Mac +
Cygwin + Haiku.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27737>
2024-02-23 02:28:29 +00:00
Karol Herbst
815a6647eb meson: do not pull in clc for clover
Fixes: 01d0d94319 ("meson: Simplify clc expression")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27663>
2024-02-21 20:53:36 +00:00
Dave Airlie
6a688e65a0 loader: handle picking zink for nouveau for certain GPUs.
This adds NOUVEAU_USE_ZINK env var, but also has commented out
code to pick it for turing+ if mesa is built with nvk and zink.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27628>
2024-02-21 11:16:25 +10: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
Matt Turner
88d0c6c26a meson: Limit intel_vk_rt to x86_64
Fixes: a512c2a8b5 ("meson: enforce build of intel-clc with anv/iris")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10610
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27608>
2024-02-14 13:08:55 +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
5438b19104 iris: enable generated indirect draws
This mirror the ring buffer mode we have in Anv.

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:45 +00:00
Lionel Landwerlin
b52e25d3a8 anv: rewrite internal shaders using OpenCL
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: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
David Heidelberg
010272b62e util: use crc32_z instead of crc32 and bump zlib dep to 1.2.9
1.2.9 has been released in January 2017, so let's assume
we'll find it everywhere.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27311>
2024-02-06 19:22:53 +00:00
Yiwei Zhang
558aca10b4 meson: drop -DANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
2024-02-01 19:29:49 +00:00
Pierre-Eric Pelloux-Prayer
d9f15f8d9b meson: require libelf when radeonsi is built
radeonsi has a hard dependency on libelf so tell meson about this
requirement.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10240
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27295>
2024-02-01 09:28:41 +01:00
Friedrich Vock
8b209a6200 util: Provide a secure_getenv fallback for platforms without it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27381>
2024-01-31 17:28:11 +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