Merge branch 'inspector-gl-extensions' into 'main'

gl: Check for the right extension name

See merge request GNOME/gtk!6893
This commit is contained in:
Matthias Clasen 2024-02-12 22:55:05 +00:00
commit 67912c1051
2 changed files with 21 additions and 1 deletions

View File

@ -1718,7 +1718,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
}
priv->has_half_float = gdk_gl_context_check_version (context, "3.0", "3.0") ||
epoxy_has_gl_extension ("OES_vertex_half_float");
epoxy_has_gl_extension ("GL_OES_vertex_half_float");
priv->has_sync = gdk_gl_context_check_version (context, "3.2", "3.0") ||
epoxy_has_gl_extension ("GL_ARB_sync") ||

View File

@ -298,6 +298,13 @@ add_label_row (GtkInspectorGeneral *gen,
gtk_list_box_insert (GTK_LIST_BOX (list), row, -1);
}
static void
append_gl_extension_row (GtkInspectorGeneral *gen,
const char *ext)
{
add_check_row (gen, GTK_LIST_BOX (gen->gl_extensions_box), ext, epoxy_has_gl_extension (ext), 0);
}
#ifdef GDK_WINDOWING_X11
static void
append_glx_extension_row (GtkInspectorGeneral *gen,
@ -374,6 +381,19 @@ init_gl (GtkInspectorGeneral *gen)
return;
}
gdk_gl_context_make_current (gdk_display_get_gl_context (gen->display));
append_gl_extension_row (gen, "GL_OES_rgb8_rgba8");
append_gl_extension_row (gen, "GL_EXT_abgr");
append_gl_extension_row (gen, "GL_EXT_texture_format_BGRA8888");
append_gl_extension_row (gen, "GL_EXT_texture_norm16");
append_gl_extension_row (gen, "GL_OES_texture_half_float");
append_gl_extension_row (gen, "GL_EXT_color_buffer_half_float");
append_gl_extension_row (gen, "GL_OES_texture_half_float_linear");
append_gl_extension_row (gen, "GL_OES_vertex_half_float");
append_gl_extension_row (gen, "GL_OES_texture_float");
append_gl_extension_row (gen, "GL_EXT_color_buffer_float");
append_gl_extension_row (gen, "GL_OES_texture_float_linear");
#if defined(GDK_WINDOWING_X11) || defined(GDK_WINDOWING_WAYLAND) || (defined(GDK_WINDOWING_WIN32) && defined(GDK_WIN32_ENABLE_EGL))
EGLDisplay egl_display = get_egl_display (gen->display);
if (egl_display)