Commit graph

364 commits

Author SHA1 Message Date
Yurii Kolesnykov
4913177b14 loader: Wrap nouveau_zink_predicate with HAVE_LIBDRM
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Fixes: 265afd9bfd ("loader: Don't fall back to nouveau GL without zink")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14290
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38429>
2025-11-20 18:39:19 +00:00
Antonio Ospite
222b85328e mesa: replace most occurrences of getenv() with os_get_option()
The standard way to query options in mesa is `os_get_option()` which
abstracts platform-specific mechanisms to get config variables.

However in quite a few places `getenv()` is still used and this may
preclude controlling some options on some systems.

For instance it is not generally possible to use `MESA_DEBUG` on
Android.

So replace most `getenv()` occurrences with  `os_get_option()` to
support configuration options more consistently across different
platforms.

Do the same with `secure_getenv()` replacing it with
`os_get_option_secure()`.

The bulk of the proposed changes are mechanically performed by the
following script:

-----------------------------------------------------------------------
  #!/bin/sh

  set -e

  replace() {

    # Don't replace in some files, for example where `os_get_option` is defined,
    # or in external files
    EXCLUDE_FILES_PATTERN='(src/util/os_misc.c|src/util/u_debug.h|src/gtest/include/gtest/internal/gtest-port.h)'

    # Don't replace some "system" variables
    EXCLUDE_VARS_PATTERN='("XDG|"DISPLAY|"HOME|"TMPDIR|"POSIXLY_CORRECT)'

    git grep "[=!( ]$1(" -- src/ | cut -d ':' -f 1 | sort | uniq | \
      grep -v -E "$EXCLUDE_FILES_PATTERN" | \
      while read -r file;
      do
        # Don't replace usages of XDG_* variables or HOME
        sed -E -e "/$EXCLUDE_VARS_PATTERN/!s/([=!\( ])$1\(/\1$2\(/g" -i "$file";
      done
  }

  # Add const to os_get_option results, to avoid warning about discarded qualifier:
  #   warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  # but also errors in some cases:
  #   error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
  add_const_results() {
    git grep -l -P '(?<!const )char.*os_get_option' | \
      while read -r file;
      do
        sed -e '/^\s*const/! s/\(char.*os_get_option\)/const \1/g' -i "$file"
      done
  }

  replace 'secure_getenv' 'os_get_option_secure'

  replace 'getenv' 'os_get_option'

  add_const_results
-----------------------------------------------------------------------

After this, the `#include "util/os_misc.h"` is also added in files where
`os_get_option()` was not used before.

And since the replacements from the script above generated some new
`-Wdiscarded-qualifiers` warnings, those have been addressed as well,
generally by declaring `os_get_option()` results as `const char *` and
adjusting some function declarations.

Finally some replacements caused new errors like:

-----------------------------------------------------------------------
../src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:127:31: error: no matching function for call to 'strtok'
  127 |          for (n = 0, option = strtok(env_llc_options, " "); option; n++, option = strtok(NULL, " ")) {
      |                               ^~~~~~
/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/string.h:124:17: note: candidate function not viable: 1st argument ('const char *') would lose const qualifier
  124 | char* _Nullable strtok(char* _Nullable __s, const char* _Nonnull __delimiter);
      |                 ^      ~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------------

Those have been addressed too, copying the const string returned by
`os_get_option()` so that it could be modified.

In particular, the error above has been fixed  by copying the `const
char *env_llc_options` variable in
`src/gallium/auxiliary/gallivm/lp_bld_misc.cpp` to a `char *` which can
be tokenized using `strtok()`.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38128>
2025-11-06 04:36:13 +00:00
Rob Clark
15924e941c loader: Ignore empty override strings
If you somehow have MESA_LOADER_DRIVER_OVERRIDE= in your environment,
you certainly weren't trying to force load the driver named "".

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38165>
2025-10-30 15:44:40 +00:00
Dylan Baker
0c11a9cfb3 meson: use the wayland module
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
This module has existed, unchanged, since Meson 0.64, and is now marked
as API stable in 1.8. It provides a number of helpers that reduce the
amount of code we need (including fiddly code about finding
wayland-scanner) by a bit, as well as some nice helpers for finding
external XML files.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35839>
2025-09-22 16:35:26 +00:00
Mel Henning
265afd9bfd loader: Don't fall back to nouveau GL without zink
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Long term, we don't want to support nouveau gl on new cards. Remove
the fallback so users without zink will get software rendering
instead of nouveau gl.

For now, NOUVEAU_USE_ZINK will still select nouveau gl on cards where
that is possible, but that isn't really supported and will likely be
removed for a lot of cards in the future.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36971>
2025-08-26 23:36:46 +00:00
Mel Henning
4be68b119e loader: Don't load nouveau GL on nvidia kmd
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The vulkan driver already has a check for this. This prevents the GL
driver from loading too.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13484
Fixes: e99446fc ("egl: Add EGL_EXT_device_query_name and EGL_EXT_device_persistent_id")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36449>
2025-07-29 23:52:32 +00:00
Faith Ekstrand
36631a4edc loader: Ignore NOUVEAU_USE_ZINK on Hopper+
The old Nouveau GL driver has no support for GPUs after Ada.  Instead,
users will always get NVK+Zink on Hopper+.  Right now, if the user sets
NOUVEAU_USE_ZINK=false, the loader will return "nouveau" and EGL/GLX
will try to load that, fail, and then fall back to Zink.  With this
patch, we instead print a warning message and then load Zink anyway.

Backport-to: 25.2
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36329>
2025-07-23 20:19:38 +00:00
Rob Clark
6d3f266406 dri: Add additional 16/32b float/int formats
Add additional 16 and 32b float formats, and the missing BGR161616.

For the dri2_format_table, just use the pipe formats twice, rather than
introducing new __DRI_IMAGE_FORMAT_x in this day and age (they are the
same thing).

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Daniel Stone
0fcb0ac1c5 dri: Expand pipe_format <-> FourCC lookup table
This pulls in every known mapping from the core DRI frontend, as well as
from GBM and Wayland. We can then start using it to de-duplicate the
lookups all throughout the tree.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Daniel Stone
d6e639816f dri: Convert pipe_format <-> FourCC lookup to a table
Saves typing it out twice.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:10 +00:00
Daniel Stone
b6332eb43b dri: Convert DRI_IMAGE_FORMAT to pipe_format
No functional change.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36081>
2025-07-15 12:37:09 +00:00
Faith Ekstrand
9e1a1633c4 loader: Report DRI_PRIME errors earlier
This needs devices[] in order to print an appropriate message but we
free it right after the loop.  Instead, print the error right away and
make the error case after the free just handle jumping to err.

Fixes: ea84b85887 ("loader: add DRI_PRIME_DEBUG env var")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36014>
2025-07-14 18:31:46 +00:00
Timothy Arceri
2ca46c7a7a dri: fix __DRI_IMAGE_FORMAT* to PIPE_FORMAT* mappings
As per the old comment:

"These formats correspond to the similarly named MESA_FORMAT_*
 tokens, except in the native endian of the CPU.  For example, on
 little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to
 MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian."

Fixes: 7e10601786 ("dri: Redeclare __DRI_IMAGE_FORMAT_* as PIPE_FORMAT_*")
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35814>
2025-06-30 23:04:57 +00:00
Ryan Mckeever
4848fbf774 gallium: Support RGB888/BGR888 formats
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
2025-06-24 05:41:48 +00:00
Derek Foreman
b3e3f0fc2e loader/wayland: Move acquisition time tracking into perfetto flows
We only use the acquisition time for calculating latency for perfetto
tracks later, and the acquisition time should ideally be the start of the
perfetto flow.

This has been more or less true with very small error margin for vk wsi,
but the wayland EGL buffer handling is a lot more complicated. Moving the
time check into the flow start will make re-using this code for EGL much
simpler.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
336cbc499f wsi/wayland: Move presentation tracing code into loader
Push the presentation feedback code into the common code in the loader,
so we're one step closer to using the perfetto instrumentation here in
the EGL code.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
94b45c6c8a wsi/wayland: Refactor some surface management code into loader
Share some wayland surface setup code in the loader so we can use it in
both VK and (in an upcoming commit) EGL.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
aefd3d835e wsi/wayland: Move buffer name string into common code
Push this into the loader bits so it will be available to egl when we
add profiling later.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
6946758682 wsi/wayland: Move perfetto flow_ids into loader_wayland_buffer
Pull some more common stuff into the new abstraction.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
c06624d797 wsi/wayland: Refactor some buffer management code into loader
For now just pull the tiny bit that looks up the wayland buffer id for
profiling. The end goal is to promote more code sharing between vk and egl
and improving wayland egl's perfetto profiling.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:25 -05:00
Derek Foreman
d8c8a7fb6e loader: Move the wayland protocol build into loader
We can hang this here instead of off wayland-drm's build.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32757>
2025-05-26 16:13:19 -05:00
Adam Jackson
9a610c5ab9 loader: Use RTLD_LOCAL not RTLD_GLOBAL
The gallium driver does not expose any symbols that anybody else wants
to see. But if we load it with RTLD_GLOBAL that's what happens, along
with all the symbols in the libraries it depends on.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30417>
2025-04-18 07:14:56 +00:00
Adam Jackson
e06b834dfa loader: Stop looking in ${libdir}/tls/
We don't install there, haven't in a long time.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34058>
2025-03-13 19:45:45 +00:00
Faith Ekstrand
dcbf5f08eb loader/nouveau: Fix the comment in nouveau_zink_predicate()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34009>
2025-03-11 23:00:09 +00:00
Dave Airlie
2983ca0d20 loader/nouveau: load zink as the GL driver for turing and above.
If the kernel supports modifiers and the GPU is a Turing+ then
force using zink instead of nvc0.

Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29232>
2025-03-11 17:39:14 +00:00
Lucas Stach
7e76c67632 kmsro: look for graphics capable screen as renderonly device
Exposing a rendernode from a supported driver is not a sufficient
matching criteria to qualify as the render part of a renderonly
device, as the rendernode might only expose compute or 2D accel
capabilities.

Look for a screen that actually supports gallium graphics operations
to qualify as a renderonly screen.

v2 (Tomeu): Have pipe-loader return a list of FDs for kmsro to choose
            based on capabilities.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30096>
2025-03-05 10:48:28 +00:00
Karmjit Mahil
54928d643e loader/wayland: Fix missing timespec.h include
`loader_wayland_dispatch()` also makes use of `timespec` so we
need `timespec.h`. Otherwise it fails to build due to
`timespec_sub_saturate()` missing.

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Fixes: 90effcceab ("wsi/wayland: refactor wayland dispatch")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12580
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33423>
2025-02-06 10:39:25 +01:00
Marek Olšák
6e3ee3a072 loader: improve the existing loader-libgallium non-matching version error
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789>
2025-01-23 00:49:05 +00:00
Pierre-Eric Pelloux-Prayer
1021d6fe62 dri: deal with ARGB1555
This helps fixing "glx-visuals-... -pixmap" which uses this
format.

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33036>
2025-01-21 14:33:13 +00:00
Jocelyn Falempe
c6d7ab7c1f loader: Fix typo in __DRI_IMAGE_FORMAT_XBGR16161616 definition
The X and A format are inverted by mistake.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31707>
2024-10-25 14:18:24 +00:00
Marek Olšák
872b5c70d1 mesa_interface: remove redundant __DRI*Rec types
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31752>
2024-10-22 06:48:02 +00:00
K900
41e83b243c meson: remove dri-search-path
It's not actually used anywhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31223>
2024-09-19 05:06:50 +00:00
Mike Blumenkrantz
2b042cb9c2 gallium: move loader_dri_create_image to dri frontend
this is another case of bad dependencies leaving dri the only place to
move something, which then exposes some other snags to be resolved later

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
0d83c570af dri: move swapinterval functions from loader to dri frontend
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30450>
2024-08-01 15:28:03 +00:00
Mike Blumenkrantz
f9f8652445 loader: split out dri3 into subdir
this fixes dependency hell

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Mike Blumenkrantz
4095fac72b loader: move some common dri3 functions out of dri3 loader
fixing dependency hell

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
2024-07-31 18:50:38 +00:00
Eric Engestrom
dfd70bab4a loader: gc loader_get_extensions_name() and __DRI_DRIVER_{GET_,}EXTENSIONS defines
Leaving the defines in include/GL/internal/dri_interface.h because I'm
not sure if something needs it.

Fixes: fa541a887c ("loader: delete loader_open_driver()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30266>
2024-07-19 20:38:19 +00:00
Daniel Stone
e05415a82e format: Generate endian-independent format aliases
Instead of having a hardcoded list of endian-independent format aliases
in the header, generate them from the format definitions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-19 13:50:42 +00:00
Mike Blumenkrantz
293c7b38ff loader/glx: move multibuffers check to loader
make this code more reusable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30128>
2024-07-18 21:58:49 +00:00
Mike Blumenkrantz
63191107ab loader/dri3: avoid killing the xcb connection if dri3 not found
calling open if the extension is unsupported closes the connection

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30128>
2024-07-18 21:58:49 +00:00
Mike Blumenkrantz
c24891e044 loader/dri3: check xfixes version in loader_dri3_open()
this will allow simplifying some code without losing functionality

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30128>
2024-07-18 21:58:49 +00:00
Mike Blumenkrantz
fa541a887c loader: delete loader_open_driver()
no longer used

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29771>
2024-07-18 20:30:43 +00:00
Daniel Stone
80bcdc08ec loader/dri3: Use FourCC for buffer allocations
Switch to using FourCC for buffer allocations instead of
DRI_IMAGE_FORMAT, albeit with a transient helper to convert from FourCC
to DRI_IMAGE_FORMAT for createImage.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:51 +00:00
Daniel Stone
361f362258 dri: Unify createImage and createImageWithModifiers
There's no real reason for the two to exist separately. Nuke the old
createImage in favour of just having createImageWithModifiers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:51 +00:00
Daniel Stone
efb88deb36 loader/dri3: Use FourCC for create-image entrypoints
Use FourCC for everything winsys-facing, instead of pipe_format.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:51 +00:00
Daniel Stone
60cb420996 dri: Remove old createImageWithModifiers
Everyone can use createImageWithModifiers2, which is now just called
createImageWithModifiers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00
Emma Anholt
26c1354578 dri: Consistently use createImageFromDmabufs() not createImageFromFds()
They're calling the same thing in the backend, so reduce the proliferation
of interfaces consumed within our implementation.

driVkImageExtensionSw now sets dri2_from_dma_bufs, which means that
egl_dri2 will now expose EXT_image_dma_buf_import.  Given that it
previously set dri2_from_fds suggesting that it can import dmabufs, this
is presumably OK.

Reviewed-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/30245>
2024-07-18 14:16:50 +00:00
Emma Anholt
24d03a1c0f dri: Replace createImageFromDmaBufs() with createImageFromDmaBufs3()
If FromDmaBufs()/FromDmaBufs2() are available, then FromDmaBufs3() is.
Drop the old method (unused by third parties) and make the new preferred
entrypoint take its name.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00
Emma Anholt
13ea03f088 dri: Consistently use createImageFromFds2(), not createImageFromFds()
dri_screen.c supports it if it supports createImageFromFds().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00
Emma Anholt
9a026df0f7 dri: Consistently use createImageWithModifiers2()
dri_screen.c supports it regardless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00