summaryrefslogtreecommitdiff
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* meson/ci: promote virtio-experimental to virtioYiwei Zhang2023-05-031-1/+1
| | | | | Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22547>
* wayland: generalize wayland-protocols code generationSimon Ser2023-05-031-4/+0
| | | | | | | | | | Make it easy to add a new protocol to the list without duplicating logic. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22682>
* clc: Add clang frontendhlsl module to fix build of microsoft-clc with llvm 16+Lone_Wolf2023-04-271-3/+4
| | | | | | | Cc: mesa-stable Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22741>
* clc: Add clangASTMatchers to fix static llvm build of microsoft-clc with ↵Lone_Wolf2023-04-271-0/+3
| | | | | | | | | LLVM 16+ Cc: mesa-stable Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22741>
* build: Add Iris and ANV to ARM's auto-generated driversJosé Roberto de Souza2023-04-171-2/+2
| | | | | | | | | Xe KMD supports ARM CPUs, so we are now able to have Intel discrete GPUs with ARM CPUs working. 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/22476>
* meson: keep Mako version checking in accord with build msgLuc Ma2023-04-141-1/+1
| | | | | | | Fixes: 52194ae4df1 ("meson: Ensure that mako is >= 0.8.0") Signed-off-by: Luc Ma <luc@sietium.com> Reported-by: Terry Zhang <terry@sietium.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22499>
* meson: ensure i915 Gallium driver includes Intel sourcesJames Knight2023-04-141-1/+8
| | | | | | | | | | | Ensure builds flag the use of Intel sources when the i915 Gallium driver is configured (`-Dgallium-drivers=i915`). Otherwise, a build may fail if other Intel-based configuration options are not enabled: ./src/gallium/winsys/i915/drm/meson.build:21:0: ERROR: Unknown variable "libintel_common". Signed-off-by: James Knight <james.d.knight@live.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22490>
* d3d12: Update and require DirectX-Headers 1.610.0Giancarlo Devich2023-04-141-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22454>
* util/disk_cache: use posix_fallocate() for index filesJuston Li2023-03-301-0/+1
| | | | | | | | | | | | | | | | | | ftruncate() allocates disk space lazily. If the disk is full and it is unable to allocate disk space when accesed via mmap(), it will crash with a SIGBUS. Switch to posix_fallocate(), which ensures disk space is allocated otherwise it fails if there isn't enough disk space. The disk cache won't be enabled in this case. For normal cases, a small increase in disk usage as the 1.3MB index file will be fully allocated when initialized now. fallback to ftruncate() if posix_fallocate() isn't found. Signed-off-by: Juston Li <justonli@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22097>
* glsl: Write a new test for GLSL and NIR mediump lowering.Emma Anholt2023-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mediump lowering tests are important for poking at the lowering pass behavior, since you can't really assert the behavior in any given driver, given that the GLSL spec allows any mediump op to be done in highp. But, in hacking on mediump lowering, I wanted several things that the old test couldn't do: - Be able to assert about the actual NIR code we expect to generate for a hypothetical driver (important if other compiler stages might do invalid transformations like eliminating highp temps, or if we were to move the lowering after GLSL IR) - Run faster (gtest unit tests rather than python forking off the standalone glsl compiler per testcase). - Express expectations with a lot less escaping of typical syntax. - High-quality logs for displaying failures. This new test does all of that, I think, though I haven't converted all of the unit tests over yet. In converting, I dropped some of the combinatorial explosion for float/int variations, instead only doing so when it gets at some different code path (default precision flags). I've also included some new tests I wrote in the process of writing my proposed gl_nir mediump lowering. Even if the conversion isn't complete, getting these tests to run faster is probably a good idea on its own, for anyone iterating running Mesa's unit tests (80 tests in 25ms, compared to 109 tests in 1.5s!). Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21886>
* meson: correct typo in commentErik Faye-Lund2023-03-161-1/+1
| | | | | Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21868>
* build: Block build of HASVK, Crocus and i915 in non-x86 architecturesJosé Roberto de Souza2023-03-101-0/+12
| | | | | | | | HASVK, Crocus and i915 drivers only supports integrated GPUs. 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/21773>
* meson: inline gtest_test_protocol now that it's always 'gtest'Eric Engestrom2023-03-101-8/+0
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21485>
* meson: bump minimum version to 0.60Eric Engestrom2023-03-101-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21485>
* meson: forcefully disable libdrm when host doesn't have itMark Collins2023-03-061-5/+11
| | | | | | 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/21724>
* intel: Add Meson parameter to enable Xe KMD supportJosé Roberto de Souza2023-03-031-0/+4
| | | | | | | | | | | | | 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>
* meson: allow checking for null pointers even if they're supposed to be non-nullEric Engestrom2023-02-281-0/+1
| | | | | | | | | | | | | ../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>
* meson: Split sse2_arg and sse2_args out of c_cpp_argsYonggang Luo2023-02-271-1/+9
| | | | | | | | 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>
* meson: When sse2 enabled, both c and cpp using sse2 optionsYonggang Luo2023-02-271-1/+1
| | | | | | 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>
* meson: print c_cpp_argsDavid Heidelberg2023-02-261-0/+7
| | | | | | | 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>
* tu+meson: Re-work KMD selectionRob Clark2023-02-251-6/+7
| | | | | | | | | | | | | | | 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>
* r300: drop VDPAU supportPavel Ondračka2023-02-241-2/+1
| | | | | | | | | | | 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>
* meson: update flex/bison requirement to cover all usagesMark Collins2023-02-231-4/+5
| | | | | | | | | | 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>
* meson: reuse vulkan_wsi_list for defining vk_wsi_argsEric Engestrom2023-02-231-24/+0
| | | | | | | 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>
* meson: add basic support for loongarchSui Jingfeng2023-02-221-0/+11
| | | | | | 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>
* mesa: optimize out _mesa_is_desktop_gl*() and _mesa_is_gles*() calls when ↵Eric Engestrom2023-02-171-0/+4
| | | | | | | | | | | 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>
* meson: allow building GLES without GLEric Engestrom2023-02-171-2/+0
| | | | | | 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>
* meson: make GLX require OpenGLEric Engestrom2023-02-171-1/+7
| | | | | | | | | 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>
* Revert "meson: Fix Asahi build on macOS"Erik Faye-Lund2023-02-151-1/+1
| | | | | | | | | This reverts commit 4ca4a05627e40e8212a8ea957f8ef2f697e4e322. 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>
* meson: don't pass vk wsi args where they don't belongErik Faye-Lund2023-02-151-19/+9
| | | | | | | | | | | | | | 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: b39958a3a18 ("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>
* meson: Combine duplicated c_args and cpp_argsYonggang Luo2023-02-151-4/+2
| | | | | | | 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>
* meson: Split c_cpp_args from pre_argsYonggang Luo2023-02-151-1/+7
| | | | | | | | 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>
* meson: remove unused USE_FOO_ASM definesErik Faye-Lund2023-02-141-2/+1
| | | | | | | | | 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>
* util: avoid calling kcmp on AndroidEric Engestrom2023-02-121-0/+10
| | | | | | | | | | | | 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>
* meson: Ignore unused variables when assertions are disabledpal10002023-02-071-6/+6
| | | | | | | | | | | | | | | | | | 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>
* meson: Fix Asahi build on macOSAsahi Lina2023-02-051-1/+1
| | | | | | | | | | | !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>
* meson: combine checks for linker --gc-sections supportDylan Baker2023-02-031-6/+4
| | | | | | | | | | | | | | | | 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: f51ce21e4e0bf7efabe58afb4a2cd6b9f98d9505 ("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>
* meson: turn android-libbacktrace into a feature optionEric Engestrom2023-02-011-8/+4
| | | | | | 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>
* rusticl: fix build error with valgrind being enabledKarol Herbst2023-01-301-2/+2
| | | | | | | | | | 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: 20c90fed5a0 ("rusticl: added") Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19778>
* meson: remove deprecated dri-drivers optionErik Faye-Lund2023-01-271-5/+0
| | | | | | | | | | This was deprecated in cdde031ac2c ("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>
* meson: remove deprecated osmesa-bits optionErik Faye-Lund2023-01-271-4/+0
| | | | | | | | | | We've released several new major versions since this was deprecated in 202cab3d308 ("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>
* meson: remove dupliace add_devenv callErik Faye-Lund2023-01-271-2/+0
| | | | | | | | | Looks like a bad merge-conflict resolution. Fixes: 7bed7d94756 ("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>
* android: Make libbacktrace optional againTomeu Vizoso2023-01-251-1/+16
| | | | | | | | | | | | | | | | 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>
* android: allow system = 'android' on cross fileHelen Koike2023-01-251-1/+1
| | | | | | | | | | | 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>
* util/fossilize_db: fix macOS inotify build errorJuston Li2023-01-231-1/+1
| | | | | | | | | require <sys/inotify.h> for fossilize_db Fixes: 3b69b67545b ("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>
* meson: use sections in summary()Thomas H.P. Andersen2023-01-201-59/+70
| | | | | | | Makes the list easier to read Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12161>
* meson: use summary()Thomas H.P. Andersen2023-01-201-64/+47
| | | | | | | | 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>
* meson: use builtin support for reading version from a fileDylan Baker2023-01-191-4/+1
| | | | | | | | 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>
* meson: remove version checks for < 0.59Dylan Baker2023-01-191-12/+3
| | | | | | | 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>
* meson: Use feature option methods for xmlconfigDylan Baker2023-01-191-9/+7
| | | | | | 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>