diff --git a/src/dispatch_common.c b/src/dispatch_common.c index 90ff92a..e1cb500 100644 --- a/src/dispatch_common.c +++ b/src/dispatch_common.c @@ -271,8 +271,21 @@ epoxy_extension_in_string(const char *extension_list, const char *ext) PUBLIC bool epoxy_has_gl_extension(const char *ext) { - return epoxy_extension_in_string((const char *)glGetString(GL_EXTENSIONS), - ext); + if (epoxy_gl_version() < 30) { + return epoxy_extension_in_string((const char *)glGetString(GL_EXTENSIONS), + ext); + } else { + int num_extensions; + + glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); + for (int i = 0; i < num_extensions; i++) { + char *gl_ext = (char *)glGetStringi(GL_EXTENSIONS, i); + if (strcmp(ext, gl_ext) == 0) + return true; + } + + return false; + } } bool diff --git a/test/Makefile.am b/test/Makefile.am index 4fe2535..59e4ee3 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -48,8 +48,6 @@ TESTS = \ headerguards \ $() -XFAIL_TESTS = glx_public_api_core - check_PROGRAMS = $(TESTS) egl_has_extension_nocontext_LDFLAGS = $(X11_LIBS) $(EPOXY) libegl_common.la