Allow for Mesa to be built with VAAPI support, without having to install
libva headers first.
Signed-off-by: Thong Thai <thong.thai@amd.com>
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38271>
If the library_path is just a basename like `libvulkan_lvp.so`, then we
can share the same JSON manifest like `lvp_icd.json` between all of the
architectures, like we already do for Vulkan layers. The library will
be looked up in the dynamic linker's default search path in this case,
and in practice will be found in `${libdir}`. This is how the Mesa's
EGL driver and Vulkan layers work, how Mesa is packaged in Debian 13,
and also how the Nvidia proprietary driver works; it makes installation
simpler for distros, especially on multiarch systems like Debian and
the freedesktop.org SDK.
However, if we want a separate manifest per architecture in order to
be able to write the full path into it, we still need per-architecture
filename disambiguation like `lvp_icd.x86_64.json`.
We presumably still want a separate per architecture on Windows, because
the concept of a single monolithic `${libdir}` is less common there, and
it can also be helpful during development when setting `$VK_DRIVER_FILES`
to force the use of a specific driver installed in a non-default location.
Use the following parameter to passed to vk_icd_gen:
'--icd-lib-path', vulkan_icd_lib_path,
'--icd-filename', icd_file_name,
output : 'virtio_icd.' + vulkan_manifest_suffix,
and the output is passed by '--out', '@OUTPUT@',
so we can detect vulkan_manifest_per_architecture from the --out parameter in script.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13745
Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37314>
The imagination-experimental flag has been replaced with the imagination flag,
as the driver is now Vulkan conformant.
Signed-off-by: Ashish Chauhan <Ashish.Chauhan@imgtec.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37761>
VDPAU only supports X11 and GL interop. There is no Wayland or Vulkan
interop support. The API has limitations that makes it impossible to
correctly decode certain streams.
Application support is also very limited, and VAAPI is always a better
choice over VDPAU.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36632>
The programming model matches very closely to that of NVIDIA's NVDLA.
Enough is implemented to run SSDLite MobileDet with roughly the same
performance as the blob (when running on a single NPU core).
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29698>
VkLayer_MESA_anti_lag is a lightweight implicit layer which provides
an open-source implementation of the VK_AMD_anti_lag vulkan extension.
The algorithm used by this layer is very simplistic and only aims to
minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2
and the begin of the execution of the submission.
In order to build VkLayer_MESA_anti_lag, pass -Dlayers=anti-lag to meson.
It is possible to either install the layer or to use
VK_ADD_IMPLICIT_LAYER_PATH=<buildpath>/share/vulkan/implicit_layer.d/
for testing purposes.
(Keep in mind that you have to adjust the library_path in the json file in that case.)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34242>
Similar to how support for X11's DRI2 protocol was deprecated in 24.2,
begin deprecating EGL_WL_bind_wayland_display (including
eglBindWaylandDisplayWL et al) by moving it behind a legacy-wayland
build option.
This extension was originally created in a pre-dmabuf world, where we
didn't have a universally-accepted way of exchanging buffers between
client and compositor, or even really the ability to describe formats
and modifiers universally.
Since then, the world has settled on dmabuf with DRM FourCC and
modifiers. We've had the zwp_linux_dmabuf_v1 protocol for 10 years now:
both clients and compositors implement this protocol to handle buffer
sharing. Compositors either use EGL_EXT_image_dma_buf_import or the
Vulkan dmabuf extensions to import these into GPU world.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36026>
DRI2 was hidden behind a legacy-x11 build option back in the 24.2
release. It's now been a year, so let's get on with removing it so we
can simplify our winsys interactions.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35885>
This is similar to radv-build-id which is mainly used on SteamOS for
shaders pre-compilation.
For RadeonSI, it also useful to have this option to force the disk
cache key to be uniq for redistributed shaders accross machines when
it's safe.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35629>
The msm driver hasn't yet passed conformance, so it's not part of the
auto set at this point in time. But this will allow distribution to
enable it by default, if they find it suitable.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35618>
Will be used by Cuttlefish CI/CD, but also commonly used by
gfxstream developers.
meson setup gfxstream-build -Dvulkan-drivers="gfxstream" -Dgallium-drivers="" -Dvirtgpu_kumquat=true -Dopengl=false -Drust_std=2021
In distros, virtgpu_kumquat is not expected to be packaged since
it is a CI/CD tool.
Reviewed-by: Aaron Ruby <aruby@qnx.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35210>
This fixes the following warning from Meson:
meson.options:179: WARNING: Project targets '>= 1.3.0' but uses
feature deprecated since '1.1.0': "boolean option" keyword argument
"value" of type str. use a boolean, not a string
Fixes: d348fd5fb5 ("mediafoundation: Add mediafoundation frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35468>
This allows building Mesa with the Android NDK, which doesn't provide
libdrm.
We will generate an `Android.bp` file using the `ninja-to-soong` tool
(https://github.com/rjodinchr/ninja-to-soong), and to do this we run
Mesa's standard meson build system to generate the ninja commands that
we then translate to soong.
That meson invocation is done using the Android NDK, which doesn't
provide libdrm, so until we find an alternative solution[*] we provide a
wrap file that builds libdrm as part of the Mesa build (but does not
install it--we still use the Android-provided libdrm at runtime)
Co-authored-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35058>
Commit cf40099730 ("meson: deprecate gallium-xa") deprecated XA
tracker, but didn't disable it by default. Thus any attempt to disable
it would cause a deprecated option warning. Flip the default to disable
XA tracker by default.
Fixes: cf40099730 ("meson: deprecate gallium-xa")
Backport-to: 25.1
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35113>
Currently mesa-clc bundles OpenCL headers from Clang only if the static
LLVM is used (which means Clang / LLVM are not present on the target
system). In some cases (e.g. when building in OpenEmbedded environemnt)
it is desirable to have shared LLVM library, but skip installing the
whole Clang runtime just to compile shaders. Add an option that forces
OpenCL headers to be bundled with the mesa-clc binary.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34551>
Radeonsi hasn't yet passed conformance, so it's not part of the auto set
at this point in time. But this will allow distribution to enable it if
they feel comfortable enough, or to disable it again, if it causes too
many problems.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34621>
Bump default value of platform-sdk-version to 34 which is Android 14.
This is the API version recommended by Google for new app development
since 31 August 2024, but it does not hurt to strongly suggest it for
mesa as well.
Developers who need to build for older Android SDK versions can always
pass `platform-sdk-version` when configuring the build.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34468>
there comes a time when a project has to be declared unfit to remain
in the tree
this frontend hasn't seen actual development in about 6 years
if someone has a pressing need to continue development, there's no
blocker to un-deleting it, but unless that happens, there's now a
more featureful, more conformant, more active CL frontend in the tree
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19385>
If it compiles, it works. And there's not a particularly good reason to
disable it, so don't let people disable it.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34239>
Shared glapi is already statically linked with libmesa (src/mesa),
and some parts are statically linked with loaders.
Static glapi will be removed after this is merged.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
It's redundant with EGL surfaceless and it doesn't have much use.
It's also available from the amber branch, so distros should get it from
there if they want to continue packaging it.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33836>
The proper name for the meson options changed to meson.options in Meson
1.1. Since we don't support older versions of Meson anyway, let's just
rename the options-file to the new name.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33445>