Commit Graph

876 Commits

Author SHA1 Message Date
Karol Herbst
338636a4ab clc: require LLVM-15
Allows us to drop code dealing with `opencl-c.h`.

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/27141>
2024-01-18 14:39:03 +00:00
Karol Herbst
faea27e4ac clc: require LLVM-14
This allows some code reorganization :)

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/27141>
2024-01-18 14:39:03 +00:00
Yiwei Zhang
3923d43908 meson/vulkan/util: allow venus to drop compiler deps
Files to compile: 451 => 232

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/26783>
2024-01-10 21:06:35 +00:00
Marek Olšák
1f5f1ce29d meson: require libdrm_amdgpu 2.4.119
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26914>
2024-01-10 08:41:42 +00:00
Florian Weimer
0319789331 meson: C type error in strtod_l/strtof_l probe
Future compilers will fail compilation due to the C type error:

…/testfile.c: In function 'main':
…/testfile.c:12:30: error: passing argument 2 of 'strtod_l' from incompatible pointer type
   12 |       double d = strtod_l(s, end, loc);
      |                              ^~~
      |                              |
      |                              char *
/usr/include/stdlib.h:416:43: note: expected 'char ** restrict' but argument is of type 'char *'
  416 |                         char **__restrict __endptr, locale_t __loc)
      |                         ~~~~~~~~~~~~~~~~~~^~~~~~~~
…/testfile.c:13:29: error: passing argument 2 of 'strtof_l' from incompatible pointer type
   13 |       float f = strtof_l(s, end, loc);
      |                             ^~~
      |                             |
      |                             char *
/usr/include/stdlib.h:420:42: note: expected 'char ** restrict' but argument is of type 'char *'
  420 |                        char **__restrict __endptr, locale_t __loc)
      |                        ~~~~~~~~~~~~~~~~~~^~~~~~~~


This means that the probe no longer tests is objective and always
fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26927>
2024-01-08 13:46:42 +00:00
Karol Herbst
d72544eea6 ci,rusticl: bump meson req to 1.3.1
See https://github.com/mesonbuild/meson/pull/12620

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24386>
2024-01-06 03:09:48 +00:00
Eric Engestrom
0ffb828513 Revert "meson: add wrap for libdrm"
This reverts commit 40b87cde2a.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26835>
2023-12-28 15:44:25 +00:00
Eric Engestrom
753056fb94 meson: use allow_fallback instead of manually listing the deps and what they provide
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26834>
2023-12-28 13:17:25 +00:00
Dylan Baker
40b87cde2a meson: add wrap for libdrm
Sometimes as a developer when a new version of libdrm is required, it's
nice to not have to install it somewhere and set up pkg-confing, and
just let Meson do it for us.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10364>
2023-12-28 11:35:04 +00:00
Eric Engestrom
7e8db6aedf meson: always define {,DRAW_}LLVM_AVAILABLE one way or the other
With the usual benefits of `#if` instead of `#ifdef` (mostly the fact
that typos can be build failures instead of silently being interpreted
as if 0).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3863>
2023-12-24 10:01:39 +00:00
Karol Herbst
9643671dae rusticl: check rustc version for flags requiring newer rustc/clippy
Fixes: 7e74ee07e3 ("rusticl: silence clippy::arc-with-non-send-sync for now")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26780>
2023-12-21 18:06:26 +00:00
Yonggang Luo
670a799ebf meson: Support for both packaging and distutils
distutils was deprecated and is now gone on modern systems.
so the default behavior is to use the supported thing, which is packaging.version, and when on an old system, fallback to the old distutils.version.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9943

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26746>
2023-12-19 21:36:58 +00:00
Sil Vilerino
90b49f16f7 d3d12: Bump directx-headers dependency to v611.0 for latest video codecs and features
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26556>
2023-12-14 20:06:52 -05: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
Karol Herbst
280dde8c23 rusticl: bump meson req
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26636>
2023-12-12 00:21:40 +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
Karol Herbst
b470bd7359 rusticl/gl: make GLX support optional
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26394>
2023-12-05 14:44:52 +00:00
Karol Herbst
494fd5d068 rusticl: add x11 dependency
This is needed by `glx.h` pulling in `X11/Xlib.h`

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10221
Fixes: df0623e51a ("rusticl, meson: Add gl/egl/glx bindings")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26394>
2023-12-05 14:44:52 +00:00
Sil Vilerino
936dd81ed9 ci: Build d3d12 gallium driver in debian-x86_32
Adding d3d12 to this ci build will prevent issues such
as #6708 or fixes like !26363 from happening again in the future.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26447>
2023-12-04 21:06:16 +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
Dennis Bonke
653405ee08 mesa: add managarm support
Co-authored-by: Alexander Richards <electrodeyt@gmail.com>
Signed-off-by: Alexander Richards <electrodeyt@gmail.com>
Signed-off-by: Dennis Bonke <dennis@managarm.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25818>
2023-11-20 13:35:19 +00:00
Faith Ekstrand
f54b1f1e77 meson: Set build.rust_std
This is needed because meson currently makes rust_std part of the build
environment and therefore per-arch.  This is a bit nonsense but it's not
too hard to work around.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Alyssa Rosenzweig
a2d3c74094 meson: Require clc for asahi
By the end of the series, this will become a hard dependency for the driver.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498>
2023-11-02 11:37:46 +00:00
Alyssa Rosenzweig
01d0d94319 meson: Simplify clc expression
To make it easier to add more clc users later.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25498>
2023-11-02 11:37:46 +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
Alyssa Rosenzweig
2552ac360d crocus: Support building on non-Intel
Ditto.

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
Alyssa Rosenzweig
c8192c1c93 hasvk: Support builiding on non-Intel
Should help Eric build test releases on their MacBook :-)

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
Qiang Yu
0a564171f6 meson: be able to build radeonsi without llvm
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25632>
2023-10-26 10:27:55 +08:00
Yogesh Mohan Marimuthu
ff4d658fd5 vulkan/runtime: add compute astc decoder helper functions
The astc compute decode and lut creation code is copied
from https://github.com/Themaister/Granite/

Always set DECODE_8BIT idea is copied from
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19886

v2: use astc glsl shader code (Chia-I Wu)
v3: fix 32bit compilation error (Christopher Snowhill)
v4: use pitch to copy in vk_create_fill_image_visible_mem() function
    pass correct layer to decode_astc()
v5: use existing ASTCLutHolder (Chia-I Wu)
v6: use only staging buffer (Chia-I Wu)
    use texel buffer for partition table (Chia-I Wu)
v7: use 2DArray for input and output
v8: check for == mem_property (Chia-I Wu)
    do not use vk_common* functions (Chia-I Wu)
    squash single buffer patch (Chia-I Wu)
    fix for minTexelBufferOffsetAlignment (Chia-I Wu)
    avoid wasting 4 slots (Chia-I Wu)
    remove partition_tbl_mask (Chia-I Wu)
    remove wrong bindings count (Chia-I Wu)
    use binding names from glsl code (Chia-I Wu)
    use ARRAY_SIZE (Chia-I Wu)
    use VkFormat for getting partition table index (Chia-I Wu)
    fix mutex lock (Chia-I Wu)
    image layout should be based on function call (Chia-I Wu)
    VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE is wrong (Chia-I Wu)
    add vk_texcompress_astc tag to helpder functions (Chia-I Wu)
    remove write_desc_set_count (Chia-I Wu)
    use desc_i++ (Chia-I Wu)
    add assert for desc_i count at end (Chia-I Wu)
    remove unused vk_create_map_texel_buffer() function (Chia-I Wu)
    dynamically create the lut offset (Chia-I Wu)
    offset not to pass as push contant (Chia-I Wu)
v9: use correct stoage and sampled flags (Chia-I Wu)
    always pass single_buf_size (Chia-I Wu)
    query drivers for minTexelBufferOffsetAlignment (Chia-I Wu)
    remove blank lines (Chia-I Wu)
    remove unnecessary if check in destroy (Chia-I Wu)
    name label as unlock instead of fail and pass (Chia-I Wu)
    use prog_glslang.found() (Chia-I Wu)
    add offset,extent check to astc shader (Chia-I Wu)
v10: prog_glslang can be undefined in meson.build (Chia-I Wu)
v11: remove with_texcompress_astc and use required in find_program (Chia-I Wu)
v12: offset are aligned to blk size (Chia-I Wu)
v13: texel_blk_start should be under vulkan if check (Chia-I Wu)
     dst image layout is always VK_IMAGE_LAYOUT_GENERAL (Chia-I Wu)

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24672>
2023-10-11 19:28:40 +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
Roman Stratiienko
d923d6234d Revert "util: Add NONNULL macro"
We agreed in [1] not to use it since it has little value,
but making a code less readable.

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25256

This reverts commit 21dcde096f.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25256>
2023-09-21 10:50:34 +00:00
Mark Collins
dee280249c meson: Warn about side-effects from DRM for FD KMDs
Any build which requires Turnip to link to libdrm will cause a
runtime dependency which could be a compatibility hazard on
platforms such as Android which generally don't ship with libdrm.
This hazard could be unintentionally triggered and to avoid this
from happening, a warning is now issued when building FD with msm
alongside other backends or if DRM is enabled due to building a
Gallium driver using DRM.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25005>
2023-09-13 22:20:13 +00:00
Marek Olšák
d11900d5e7 meson: use llvm-config instead of cmake to fix linking errors with meson 1.2.1
The cmake path picks a random LLVM in /usr, which happens to be 32-bit LLVM,
which fails to link with 64-bit Mesa. This is a meson, cmake, or LLVM bug.

Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25042>
2023-09-09 00:56:41 +00:00
Jordan Justen
b68582b1c5 meson: Check for the __builtin_ia32_clflushopt function
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22379>
2023-09-06 01:39:53 +00:00
Matt Turner
c38b67f4d1 intel: Limit Intel Vulkan RT to x86_64
Note: passed CI repeatedly except for the timing out WHL jobs.

Fixes: 28c1053c07 ("intel: Allow using intel_clc from the system")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25009>
2023-09-02 15:43:18 -04: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
Feng Jiang
a1a2aac3a3 meson: Move video to separate section in meson configuration summary
Since the video configuration is shared by multiple video APIs, not
just vulkan, move it to a separate section.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24598>
2023-09-01 11:57:37 +00:00
Matt Turner
4f89c1dafd intel: Consider with_intel_clc in with_any_intel
This makes it possible to configure mesa to build only intel_clc.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24974>
2023-08-31 21:53:19 +00:00
Matt Turner
37b88a72fb intel: Rearrange for next commit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24974>
2023-08-31 21:53:19 +00:00
Simon Ser
5ceba97c2e vulkan/wsi/wayland: add support for IMMEDIATE
Use the tearing-control-unstable-v1 protocol to indicate to the
Wayland compositor that tearing is acceptable.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18268>
2023-08-24 09:38:54 +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
Roman Stratiienko
21dcde096f util: Add NONNULL macro
Macro leverages __attribute__((__nonnull__)) to help users mark
the function parameter that isn't allowed to be NULL.

Suggested-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18215>
2023-08-12 18:46:57 +00: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
Karol Herbst
ec93d46a7c meson,ci: bump meson req for rusticl to 1.2
Signed-off-by: Karol Herbst <git@karolherbst.de>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21451>
2023-08-01 13:16:55 +00:00
Erik Faye-Lund
9709ae4cc6 meson: report with_glvnd in summary
GLVND *really* kinda belongs in *both* GLX and EGL, but it feels silly
to repeat the same setting. So let's just report it under the GL
section, as that's generic enough to apply to both of other sections.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24317>
2023-07-27 00:46:29 +00:00
Caio Oliveira
2f3230a736 meson: Ensure that LLVMSPIRVLib is not required for Clover
Fixes: cb588d5d6e ("compiler/clc: Move related NIR passes to the common mesa clc")
Closes: #9391
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24244>
2023-07-24 18:21:11 +00:00
Eric Engestrom
431bbea840 meson: clarify what "off-screen rendering" means
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24114>
2023-07-12 12:38:14 +00:00
Friedrich Vock
1c268196b8 meson: Prefix Vulkan "Ray Tracing" summary with "Intel"
This only applies to Intel's ray tracing. With RADV also having
ray tracing support that is always compiled in, seeing
"Ray Tracing: NO" is a bit misleading.

Reviewed-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24008>
2023-07-07 09:39:11 +00:00