Commit graph

1950 commits

Author SHA1 Message Date
Krzysztof Sobiecki
615e2d15d1 os: Add support for GNU/HURD compilation and use of dri swrast/llvmpipe.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39277>
2026-02-17 08:24:02 +00:00
Khem Raj
268e19378f glx: fix const qualifier warnings found with C23 glibc support
glibc master has been C23'fying the functions which is resulting errors

Several functions assigned results of bsearch/strstr/strpbrk/memchr to
non-const pointers, triggering -Wincompatible-pointer-types-discards-qualifiers
under clang/gcc with -Werror. Cast bsearch return values where needed and
propagate const correctness for strstr/strpbrk/memchr results.

Removes build failures with strict warning flags without changing behavior.

Signed-off-by: Khem Raj <raj.khem@gmail.com>

[Eric: changed the glxglvnd.c hunk to add the missing `const` instead of casting it away]

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38594>
2026-02-09 09:00:43 +00:00
Timothy Arceri
67eeee43e0 driconf: add a way to override GLX_CONTEXT_RESET_ISOLATION_BIT_ARB
This allows us to override and clear the reset isolation bit.
It will be used in the following patch to override missing support
for GLX_CONTEXT_RESET_ISOLATION_BIT_ARB.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38668>
2025-12-17 23:35:24 +00:00
Yurii Kolesnykov
8cc06191a8 apple_cgl.c: Fix error: call to undeclared function 'os_get_option'
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Fixes: 222b85328e ("mesa: replace most occurrences of getenv() with os_get_option()")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
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
stefan11111
37f1d19a68 glx: Add some NULL pointer checks
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This prevents mesa from segfaulting if GLX is working on some screens, but not all screens.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38201>
2025-11-04 00:21:19 +00:00
Dmitry Baryshkov
681c734804 glx: provide glx.pc
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
New Vulkan CTS 1.4.4 started requiring glx.pc pkg-config file. Provide
one if GLVND is not used in order to let VK CTS and other programs find
Mesa GLX implementation.

Cc: mesa-stable
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37834>
2025-10-14 20:53:10 +00:00
stefan11111
8e000cecac glx: Fix segfault when Nvidia PRIME render offload is enabled, but not used
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11719

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37342>
2025-09-20 08:43:00 +00:00
Mike Blumenkrantz
37701ba6bc glx/kopper: don't call glFlush from swapbuffers
this is redundant and leads to extra glthread syncs

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36887>
2025-08-22 00:42:28 +00:00
Mike Blumenkrantz
40b3479635 glx/egl/kopper: explicitly pass __DRI2_FLUSH_CONTEXT when appropriate
this avoids unnecessary st flushing

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36887>
2025-08-22 00:42:28 +00:00
Marek Olšák
ecbe35d878 egl,glx: allow OpenGL with old libx11, but disable glthread if it's unsafe
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
pass bool thread_safe to the dri frontend, and enable glthread accordingly

Reviewed-by: Eric Engestrom <eric@igalia.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36378>
2025-08-21 02:05:26 +00:00
Marek Olšák
8f2532453c mesa: move src/mapi to src/mesa/glapi
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36562>
2025-08-06 20:35:26 +00:00
Yurii Kolesnykov
f292faebd7 Guard call to free_zombie_glx_drawable with condition from its definition
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13589
Fixes: ad9db6b259 ("glx: Free all populated fields of the glx_display on creation failure")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36495>
2025-08-06 08:46:52 +00:00
Antonio Ospite
ddf2aa3a4d build: avoid redefining unreachable() which is standard in C23
In the C23 standard unreachable() is now a predefined function-like
macro in <stddef.h>

See https://android.googlesource.com/platform/bionic/+/HEAD/docs/c23.md#is-now-a-predefined-function_like-macro-in

And this causes build errors when building for C23:

-----------------------------------------------------------------------
In file included from ../src/util/log.h:30,
                 from ../src/util/log.c:30:
../src/util/macros.h:123:9: warning: "unreachable" redefined
  123 | #define unreachable(str)    \
      |         ^~~~~~~~~~~
In file included from ../src/util/macros.h:31:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:456:9: note: this is the location of the previous definition
  456 | #define unreachable() (__builtin_unreachable ())
      |         ^~~~~~~~~~~
-----------------------------------------------------------------------

So don't redefine it with the same name, but use the name UNREACHABLE()
to also signify it's a macro.

Using a different name also makes sense because the behavior of the
macro was extending the one of __builtin_unreachable() anyway, and it
also had a different signature, accepting one argument, compared to the
standard unreachable() with no arguments.

This change improves the chances of building mesa with the C23 standard,
which for instance is the default in recent AOSP versions.

All the instances of the macro, including the definition, were updated
with the following command line:

  git grep -l '[^_]unreachable(' -- "src/**" | sort | uniq | \
  while read file; \
  do \
    sed -e 's/\([^_]\)unreachable(/\1UNREACHABLE(/g' -i "$file"; \
  done && \
  sed -e 's/#undef unreachable/#undef UNREACHABLE/g' -i src/intel/isl/isl_aux_info.c

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36437>
2025-07-31 17:49:42 +00:00
Faith Ekstrand
56ed5cf1bb dri: Get rid of __DRIbackgroundCallableExtension
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This was originally needed to bind the context to the background thread
for DRI2 because it needs to be able to get buffers from the X server.
With DRI3 and Wayland, however, it's not needed.  All the DRI3 code gets
everything it needs from the drawable and only uses the context for
flushes and blits, which always come from GLX itself, not the render
thread.  Now that we've deleted all the DRI2 code, let's delete this,
too.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
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/36123>
2025-07-16 01:32:56 +00:00
Faith Ekstrand
30b98a7ec1 glx: Refuse to initialize if Display is not thread-safe
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
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/36123>
2025-07-16 01:32:56 +00:00
Faith Ekstrand
950dac6e6c x11: Add an x11_xlib_display_is_thread_safe() helper
Even though Xlib 1.8 enables thread-safety by default it's still
theoretically possible that the user's system has an Xlib that has been
built with this turned off.  Warn in that case.  Since this requires
poking at Xlib internals, it's better to have this as a util helper.

Now that libloader_x11 contains more than just dri3 helpers, we build it
unconditionally if with_platform_x11 and just add loader_x11.c if it

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
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/36123>
2025-07-16 01:32:56 +00:00
Faith Ekstrand
b8ef9bfbf5 x11: Move loader_x11.c/h to x11_dri3.c/h
That's more descriptive of what they actually are.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36123>
2025-07-16 01:32:55 +00:00
Faith Ekstrand
4e88f02ab4 egl,glx,kopper: Switch back to DRIkopperLoaderExtension::GetDrawableInfo
This decouples Kopper and swrast.  With this change, dri/kopper.c no
longer references DRIswrastLoaderEsxtension at all.

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
Faith Ekstrand
246c588ab2 glx: Drop LIBGL_DRI3_DISABLE
We no longer support DIR2 so there's nothing to fall back to if you
disable DRI3.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36054>
2025-07-10 17:11:13 +00:00
Emma Anholt
b4eed47828 glx: clean up a litttle remains of DRI2 support.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19942>
2025-07-09 14:31:05 -07:00
Daniel Stone
08c6ba223b x11: Remove DRI2 support
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>
2025-07-09 17:49:58 +00:00
Corentin Noël
ad9db6b259 glx: Free all populated fields of the glx_display on creation failure
Add a common path to ensure that there is no copy-paste error.

CID: 1644424,1644409 Resource leak

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35474>
2025-06-27 13:56:23 +00:00
Doug Nazar
c3980bb4ec glx: Fix memory leak with software dri
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
dri_screen_init() now calls glx_screen_init() directly. Calling
twice overwrites the config.

Fixes: 7930fe5f01 ("glx: unify dri screen init")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35525>
2025-06-21 23:47:13 +00:00
Karol Herbst
0e322c6092 glx,egl: drop libpipe_loader_dynamic dependency
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Karol Herbst
2edd0c4bbd glx,egl: use driGetDriInfoXML
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/833>
2025-05-27 07:53:20 +00:00
Yurii Kolesnykov
9822fa3ef3 Get rid of 5 remaining references to glapitable.h
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Closes: #13003
Fixes: 0cebfb15 ("glapi: remove duplicated generated header glapitable.h")

Co-authored-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34682>
2025-04-23 20:18:25 +00:00
Eric Engestrom
33caee7dfe glx: drop dead GL_LIB_NAME define
Fixes: 5b89be3545 ("glx: Don't try to dlopen ourselves")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34602>
2025-04-18 12:14:11 +00:00
Adam Jackson
5b89be3545 glx: Don't try to dlopen ourselves
The intention here, long ago, was to ensure that any symbols the DRI
driver needed from libGL were available. We don't have this problem
anymore, libgallium does not import any symbols from the GLX frontend
(or any other one for that matter).

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
Marek Olšák
47d08dbde7 glx: stop exporting EXT_texture_object functions from libGLX_mesa.so
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
These aliases of the non-EXT functions have a non-aliased indirect GLX
implementation. Remove it since it's not needed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
574c1a70d6 mesa: move dispatch.h and marshal_generated.h generation to glapi/gen
This is where most files are generated. It's a prerequisite for
a future change.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
b928304732 glx: remove the hack that forced exporting GL functions from libGL
GL functions were exported by luck because we incorrectly used
link_with in meson, which exports functions only if the static lib is
used. link_whole guarantees that the functions are always exported
even if the static lib is unused.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:35 +00:00
Marek Olšák
dcc805469b glx: add a test to verify exported symbols
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
9e24940bc7 glx: don't generate indirect GLX dispatch for ARB_imaging functions
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34002>
2025-03-27 05:46:34 +00:00
Marek Olšák
8bb7033095 glx: fix build with -Dlegacy-x11=dri2
Fixes: 71bb62e3c9 - glx: stop exporting GL functions from libGLX_mesa.so

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
0cebfb15b5 glapi: remove duplicated generated header glapitable.h
mesa/main/dispatch.h is exactly the same. We generated the same header
twice.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:23 +00:00
Marek Olšák
fefb1a6fb3 meson: remove with_shared_glapi variable (it's always true)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33794>
2025-03-06 17:13:22 +00:00
Marek Olšák
906dcb56e1 glx: make it more obvious what libglapi_bridge is
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
71bb62e3c9 glx: stop exporting GL functions from libGLX_mesa.so
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
628608672c glx: fix hardcoded use of dispatch table index in glAreTexturesResidentEXT
No idea why this exists, and it's dead code with glvnd because it's
exported from libGLX_mesa.so.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
ebf6008434 glx: don't call GL functions directly, use the current dispatch instead
With glvnd, GL functions will not be publicly exported from libGLX_mesa
and we don't even need them privately defined.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Marek Olšák
1fde49d50e glapi: remove unused functions from dispatch tables
We also have to remove __indirect_glVertexAttribPointerNV because nothing
uses it after the removal from dispatch tables.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
2025-03-03 21:06:06 +00:00
Mike Blumenkrantz
0e87acb2f3 dri: delete INVALIDATE extension
this shouldn't be needed anymore since it doesn't do anything

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33774>
2025-02-26 21:46:06 +00:00
Adam Jackson
32a10ccbdd glx: Remove (almost) all usage of _X_HIDDEN / _X_INTERNAL
It's redundant at this point. The one exception is for GLX_PUBLIC when
building for glvnd, because then we really do want the GLX API to be
hidden.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Adam Jackson
09bbf71e68 glx: Make #undef GLX_INDIRECT_RENDERING do something
Not that meson lets you reach this state yet, but if you did, you'd
still build all of the indirect code but the linker would gc most of it.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33623>
2025-02-20 15:47:23 +00:00
Qiang Yu
42068643e9 dri,egl,glx: remove redundant usage of HAVE_X11_DRM
These files are build or used only when drm platform is
available, no need to check this macro inside them.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Qiang Yu
2a1ae6d94b glx/egl/x11: fix x11_dri3_check_multibuffer
glx/egl "multibuffers" denotes if server side support DRI3
multi plane and modifiers which is version >= 1.2. But now
it returns true just when DRI3 version >= 1.

This causes problem when xserver with amdgpu DDX which only
support DRI3 1.0, so "multibuffers" gets set unexpectedly,
and client send DRI3 >= 1.2 request to server which gets
unimplemented error.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31657>
2025-02-17 02:50:15 +00:00
Matt Turner
388e9e6b33 glx: Fix typos
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33556>
2025-02-15 17:43:44 +00:00
Michel Dänzer
e4d189f26f egl/glx/sw: Check xcb_query_extension_reply return value for MIT-SHM
For consistency with other xcb_query_extension_reply callers.

v2:
* Now with less use-after-free. (Eric Engestrom)

Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33400>
2025-02-08 13:50:15 +00:00
Hyunjun Ko
bf88b9b324 kopper: implement to get sync values.
v1. Makes special_event a member of struct dri_drawable to be re-used.
(Michel Dänzer @daenzer)

v2. Guard with VK_USE_PLATFORM_XCB_KHR and clean-up.
(Mike Blumenkrantz @zmike)

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31474>
2025-02-04 14:36:05 +00:00