egl: Advertise EGL_MESA_gl_interop extension if support present

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: Antonio Gomes <antoniospg100@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24573>
This commit is contained in:
Sylvain Munaut
2023-08-11 14:15:55 +02:00
committed by Marge Bot
parent 8ee8788208
commit caf15a3276
3 changed files with 6 additions and 0 deletions

View File

@@ -870,6 +870,10 @@ dri2_setup_screen(_EGLDisplay *disp)
disp->Extensions.KHR_no_config_context = EGL_TRUE;
disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
if (dri2_dpy->interop) {
disp->Extensions.MESA_gl_interop = EGL_TRUE;
}
if (dri2_dpy->configOptions) {
disp->Extensions.MESA_query_driver = EGL_TRUE;
}

View File

@@ -588,6 +588,7 @@ _eglCreateExtensionsString(_EGLDisplay *disp)
if (disp->Extensions.KHR_no_config_context)
_eglAppendExtension(&exts, "EGL_MESA_configless_context");
_EGL_CHECK_EXTENSION(MESA_drm_image);
_EGL_CHECK_EXTENSION(MESA_gl_interop);
_EGL_CHECK_EXTENSION(MESA_image_dma_buf_export);
_EGL_CHECK_EXTENSION(MESA_query_driver);

View File

@@ -141,6 +141,7 @@ struct _egl_extensions {
EGLBoolean KHR_wait_sync;
EGLBoolean MESA_drm_image;
EGLBoolean MESA_gl_interop;
EGLBoolean MESA_image_dma_buf_export;
EGLBoolean MESA_query_driver;