From 71bb62e3c92a231eed6f4a2ddfc4e5ac83c40440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 21 Feb 2025 02:45:55 -0500 Subject: [PATCH] glx: stop exporting GL functions from libGLX_mesa.so Reviewed-by: Adam Jackson Part-of: --- src/glx/drisw_glx.c | 13 +++++++++++++ src/mapi/glapi/gen/static_data.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 58cc0e7d09a..d8e724af296 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -424,7 +424,20 @@ static const __DRIextension *kopper_extensions_noshm[] = { static void drisw_wait_gl(struct glx_context *context) { + /* TODO: Calling glFinish directly is the only thing that causes libGL.so + * to export all GL functions. This is fragile and needs a proper solution. + * + * On top of that, this code is only compiled with GLX_DIRECT_RENDERING, + * which means that indirect-only libGL (-Dglx-direct=false) doesn't export + * any GL functions. + * + * TODO: Always use CALL_Finish instead of glFinish. + */ +#if USE_LIBGLVND + CALL_Finish(GET_DISPATCH(), ()); +#else glFinish(); +#endif } static void diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index 8b5f6c255d2..8318c12cbfb 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -1678,7 +1678,7 @@ for name in all_functions: function_count = i -# Exported from libGL.so and libGLX_mesa.so (libEGL_mesa.so doesn't export any) +# Exported from libGL.so libgl_public_functions = { "Accum", "ActiveShaderProgram",