Yurii Kolesnykov
9822fa3ef3
Get rid of 5 remaining references to glapitable.h
...
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
...
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
Marek Olšák
e7214b9446
glapi: rename exported symbols so as not to conflict with old libglapi
...
libwaffle 1.7.0 has a hack that dlopen's libglapi with RTLD_GLOBAL, which
was meant to preload libglapi, but with this MR it overwrites libgallium's
own symbols, which breaks libgallium.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.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
Marek Olšák
44bda7c258
dri: put shared-glapi into libgallium.*.so
...
so that we don't have to maintain a stable ABI for it.
This will allow removal of the remapping table to reduce CALL_* overhead
for GL dispatch tables.
Also we can now clean it up.
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
b307951648
glx: fix glx-create-context-invalid-es-version
...
* GLES3.x is only valid for x <= 2
* The expected error is GLXBadProfileARB, not BadValue
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
Qiang Yu
e5e5af05ea
egl,gallium,glx: replace dri_get_screen_param with pipe_caps access
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955 >
2025-01-17 04:39:46 +00:00
duncan.hopkins
20b806284a
glx: Add back in applegl_create_display() so the OpenGL.framework, on MacOS, pointer get setup.
...
Fixes: 4e8740370a ("glx: rework __glXInitialize")
Tested-by: Yurii Kolesnykov <root@yurikoles.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32656 >
2025-01-12 16:49:33 +00:00
duncan.hopkins
48ebbe2777
glx: Guard some of the bind_extensions() code with the same conditions as glx_screens frontend_screen member.
...
Configution like simple MacOS builds do not have `frontend_screen` and fail to build.
Fixes: 34dea2b38e ("glx: unify extension binding")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12317
Tested-by: Yurii Kolesnykov <root@yurikoles.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32656 >
2025-01-12 16:49:33 +00:00
duncan.hopkins
568a4ca899
glx: ignore zink check for has_explicit_modifiers and DRI3 on MacOS.
...
MacOS has neither of these so always fails to start up zink.
Reviewed-By: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568 >
2024-12-13 00:39:16 +00:00
duncan.hopkins
e89eba0796
glx: change #if guard around dri_common.h to stop missing 'driDestroyConfigs' symbol on MacOS builds.
...
Reviewed-By: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32568 >
2024-12-13 00:39:16 +00:00
Pierre-Eric Pelloux-Prayer
9f4ab06842
glx: return BadMatch for invalid reset notification strategy
...
The specification doesn't say which error should be reported, but
piglit expects BadMatch:
/* The GLX_ARB_create_context_robustness spec does not say what error
* code should be generated. However, similar cases (e.g., valid GL
* versions) specify BadMatch. This is also the behavior of NVIDIA's
* closed-source driver.
*/
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32281 >
2024-11-27 19:00:20 +00:00
Erik Faye-Lund
5ced8b0ea2
glx: avoid null-deref
...
psc can be NULL here, so let's avoid dereferencing it.
Fixes: 34dea2b38e ("glx: unify extension binding")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32144 >
2024-11-18 09:13:14 +00:00
Adam Jackson
858eb18952
glx: Fix the GLX_EXT_swap_control_tear drawable attributes
...
GLX_SWAP_INTERVAL_EXT is always positive, GLX_LATE_SWAPS_TEAR_EXT is how
you tell whether the drawable is set to do it. This aligns us with the
spec and NVIDIA's GLX.
Closes : mesa/mesa#10193
Fixes: 5e9e457383 glx/dri3: Implement GLX_EXT_swap_control_tear
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31655 >
2024-10-23 19:55:53 +00:00
Marek Olšák
ee54fe9f69
mesa_interface: rename __DRIconfig to struct dri_config
...
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
Marek Olšák
186a3b6dad
mesa_interface: replace opaque __DRIdrawable with struct dri_drawable everywhere
...
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
Marek Olšák
329e03535b
mesa_interface: replace opaque __DRIcontext with struct dri_context everywhere
...
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
Marek Olšák
1ce9aa3d65
mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere
...
it's always struct dri_screen
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
David Rosca
656a03e583
glx: Destroy base screen after deinitScreen
...
Instead of destroying it before deinitScreen to match the original order.
Fixes: 407a9094f7 ("glx: move base screen destroy to glx_screen_cleanup")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31087 >
2024-09-10 08:55:58 +02:00
Sid Pranjale
27c09eacb7
glx: add a missing nullptr check
...
This caused GLX applications to segfault under zink.
This technically also fixes cleanup when any driver fails init
Signed-off-by: Sid Pranjale <mail@sidonthe.net >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31072 >
2024-09-10 01:29:48 +00:00
Mike Blumenkrantz
b6f201b173
meson: require dri3 modifiers
...
the year is 2024 and we have the technology
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31044 >
2024-09-06 17:34:17 +00:00
Mike Blumenkrantz
8f6fca89aa
meson: delete dri3 build option
...
this existed for historical reasons, but realistically now it should
be possible to build mesa with dri3 always enabled. additionally,
this check was often used as a substitute for having drm functionality,
which is sort of similar but also not really a direct match
this simplifies a bunch of conditionals and prevents users from footgunnning
themselves into orbit
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30952 >
2024-09-04 14:48:17 +00:00
Yunhyeok "Yune" Choi
27014df366
glx: Getting rid of the double assignment in __glXWireToEvent.
...
Previously the field `event_type` in `GLXPbufferClobberEvent`
was assigned twice in succession with different values.
Removing the first assignment and retaining only the second one.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30836 >
2024-08-26 23:19:56 +00:00
Mike Blumenkrantz
7930fe5f01
glx: unify dri screen init
...
lot of duplication
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
520572eb25
glx: inline __GLXDRIscreen onto base glx_screen
...
this is much less awkward
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
2c50ee4398
glx: determine is_direct_capable from driver type
...
indirect contexts have no driver type
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
912090fa96
glx: unify more extension setup
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
0af723ea44
glx/dri3: delete driScreenRenderGPU
...
this is redundant
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:59 +00:00
Mike Blumenkrantz
407a9094f7
glx: move base screen destroy to glx_screen_cleanup
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30619 >
2024-08-19 17:43:59 +00:00