From 11715760f95272a507c0b24bc05b75977fac26dc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 29 Oct 2023 14:44:29 -0400 Subject: [PATCH 1/3] Revert "glcontext: Better debug spew" This reverts commit 30e14f73fa8d1af1a5f73a9c48ae8129403efc5a. --- gdk/gdkglcontext.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index f1641cce9a..725cb5860c 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -1577,10 +1577,9 @@ gdk_gl_context_check_extensions (GdkGLContext *context) "* Extensions checked:\n" " - GL_KHR_debug: %s\n" " - GL_EXT_unpack_subimage: %s\n" - " - GL_EXT_texture_format_BGRA8888: %s\n" - " - GL_EXT_EGL_image_storage: %s\n" " - half float: %s\n" - " - sync: %s", + " - sync: %s\n" + " - bgra: %s", gdk_gl_context_get_use_es (context) ? "OpenGL ES" : "OpenGL", gdk_gl_version_get_major (&priv->gl_version), gdk_gl_version_get_minor (&priv->gl_version), priv->is_legacy ? "legacy" : "core", @@ -1588,10 +1587,9 @@ gdk_gl_context_check_extensions (GdkGLContext *context) max_texture_size, priv->has_khr_debug ? "yes" : "no", priv->has_unpack_subimage ? "yes" : "no", - priv->has_bgra ? "yes" : "no", - priv->has_image_storage ? "yes" : "no", priv->has_half_float ? "yes" : "no", - priv->has_sync ? "yes" : "no"); + priv->has_sync ? "yes" : "no", + priv->has_bgra ? "yes" : "no"); } #endif From 6e236b945942d1861361e77143171c18f680be38 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 29 Oct 2023 14:44:46 -0400 Subject: [PATCH 2/3] Revert "gl context: Check for more GL extensions" This reverts commit b8b5835fc6bac90a343338fcfa752044c4ec0122. --- gdk/gdkglcontext.c | 11 ----------- gdk/gdkglcontextprivate.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index 725cb5860c..9eac912e12 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -115,7 +115,6 @@ typedef struct { guint has_unpack_subimage : 1; guint has_debug_output : 1; guint has_bgra : 1; - guint has_image_storage : 1; guint extensions_checked : 1; guint debug_enabled : 1; guint forward_compatible : 1; @@ -1564,8 +1563,6 @@ gdk_gl_context_check_extensions (GdkGLContext *context) epoxy_has_gl_extension ("GL_ARB_sync") || epoxy_has_gl_extension ("GL_APPLE_sync"); - priv->has_image_storage = epoxy_has_gl_extension ("GL_EXT_EGL_image_storage"); - #ifdef G_ENABLE_DEBUG { int max_texture_size; @@ -1905,14 +1902,6 @@ gdk_gl_context_has_vertex_arrays (GdkGLContext *self) } } -gboolean -gdk_gl_context_has_image_storage (GdkGLContext *self) -{ - GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self); - - return priv->has_image_storage; -} - /* This is currently private! */ /* When using GL/ES, don't flip the 'R' and 'B' bits on Windows/ANGLE for glReadPixels() */ gboolean diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h index 9683e9d6e5..03d65cc42f 100644 --- a/gdk/gdkglcontextprivate.h +++ b/gdk/gdkglcontextprivate.h @@ -162,8 +162,6 @@ gboolean gdk_gl_context_has_bgra (GdkGLContext gboolean gdk_gl_context_has_vertex_arrays (GdkGLContext *self) G_GNUC_PURE; -gboolean gdk_gl_context_has_image_storage (GdkGLContext *self) G_GNUC_PURE; - double gdk_gl_context_get_scale (GdkGLContext *self); guint gdk_gl_context_import_dmabuf (GdkGLContext *self, From 1914adc344c6afb8c362ffc9de489e71d13e952b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 29 Oct 2023 14:45:20 -0400 Subject: [PATCH 3/3] dmabuf: Don't check for image storage I was wrong about this extension, and it isn't even a GL extension to begin with, so revert all this. --- gdk/gdkdmabufegl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gdk/gdkdmabufegl.c b/gdk/gdkdmabufegl.c index f02e098d30..d5d93307f6 100644 --- a/gdk/gdkdmabufegl.c +++ b/gdk/gdkdmabufegl.c @@ -55,8 +55,7 @@ gdk_dmabuf_egl_downloader_collect_formats (const GdkDmabufDownloader *downloader int n_mods; if (egl_display == EGL_NO_DISPLAY || - !display->have_egl_dma_buf_import || - !gdk_gl_context_has_image_storage (context)) + !display->have_egl_dma_buf_import) return FALSE; gdk_gl_context_make_current (context);