mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
egl: Support EGL_KHR_no_config_context
If the extension is supported, we create configless contexts. This will come in handy real soon now, we use different configs for HDR and SDR.
This commit is contained in:
parent
3ca84c4357
commit
bc7c0d05f8
@ -1698,6 +1698,8 @@ gdk_display_init_egl (GdkDisplay *self,
|
||||
epoxy_has_egl_extension (priv->egl_display, "EGL_EXT_buffer_age");
|
||||
self->have_egl_swap_buffers_with_damage =
|
||||
epoxy_has_egl_extension (priv->egl_display, "EGL_EXT_swap_buffers_with_damage");
|
||||
self->have_egl_no_config_context =
|
||||
epoxy_has_egl_extension (priv->egl_display, "EGL_KHR_no_config_context");
|
||||
|
||||
GDK_DISPLAY_NOTE (self, OPENGL, {
|
||||
char *ext = describe_extensions (priv->egl_display);
|
||||
|
@ -108,6 +108,7 @@ struct _GdkDisplay
|
||||
/* egl info */
|
||||
guint have_egl_buffer_age : 1;
|
||||
guint have_egl_swap_buffers_with_damage : 1;
|
||||
guint have_egl_no_config_context : 1;
|
||||
};
|
||||
|
||||
struct _GdkDisplayClass
|
||||
|
@ -359,7 +359,7 @@ gdk_gl_context_real_realize (GdkGLContext *context,
|
||||
|
||||
if (egl_display)
|
||||
{
|
||||
EGLConfig egl_config = gdk_display_get_egl_config (display);
|
||||
EGLConfig egl_config;
|
||||
GdkGLContext *share = gdk_display_get_gl_context (display);
|
||||
GdkGLContextPrivate *share_priv = gdk_gl_context_get_instance_private (share);
|
||||
EGLContext ctx;
|
||||
@ -377,6 +377,11 @@ gdk_gl_context_real_realize (GdkGLContext *context,
|
||||
use_es = GDK_DISPLAY_DEBUG_CHECK (display, GL_GLES) ||
|
||||
(share != NULL && gdk_gl_context_get_use_es (share));
|
||||
|
||||
if (display->have_egl_no_config_context)
|
||||
egl_config = NULL;
|
||||
else
|
||||
egl_config = gdk_display_get_egl_config (display);
|
||||
|
||||
flags = 0;
|
||||
|
||||
if (debug_bit)
|
||||
|
Loading…
Reference in New Issue
Block a user