glx: Advertise GLX_MESA_gl_interop extension if support present
authorSylvain Munaut <tnt@246tNt.com>
Fri, 11 Aug 2023 12:03:17 +0000 (14:03 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 19 Aug 2023 01:08:30 +0000 (01:08 +0000)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: Antonio Gomes <antoniospg100@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24573>

src/glx/dri2_glx.c
src/glx/dri3_glx.c
src/glx/glxextensions.c
src/glx/glxextensions.h

index 79ca02e..81314c0 100644 (file)
@@ -979,6 +979,9 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
 
    if (psc->rendererQuery)
       __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
+
+   if (psc->interop)
+      __glXEnableDirectExtension(&psc->base, "GLX_MESA_gl_interop");
 }
 
 static char *
index 2206589..a1c9fb5 100644 (file)
@@ -755,6 +755,9 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
 
    if (psc->rendererQuery)
       __glXEnableDirectExtension(&psc->base, "GLX_MESA_query_renderer");
+
+   if (psc->interop)
+      __glXEnableDirectExtension(&psc->base, "GLX_MESA_gl_interop");
 }
 
 static char *
index b731042..7c443fc 100644 (file)
@@ -105,6 +105,7 @@ static const struct extension_info known_glx_extensions[] = {
    { GLX(ATI_pixel_format_float),         N, N },
    { GLX(INTEL_swap_event),               N, N },
    { GLX(MESA_copy_sub_buffer),           N, N },
+   { GLX(MESA_gl_interop),                N, Y },
    { GLX(MESA_query_renderer),            N, Y },
    { GLX(MESA_swap_control),              N, Y },
    { GLX(NV_float_buffer),                N, N },
index 23c6fd1..ebd5def 100644 (file)
@@ -60,6 +60,7 @@ enum
    ATI_pixel_format_float_bit,
    INTEL_swap_event_bit,
    MESA_copy_sub_buffer_bit,
+   MESA_gl_interop_bit,
    MESA_query_renderer_bit,
    MESA_swap_control_bit,
    MESA_swap_frame_usage_bit,