Commit 9034866a authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

wflinfo: use glGetStringi() only when available

In some corner cases, we may end up attempting to get the extension list
via the new API, even though we're yet to get function pointer.

Fetching symbols is fun, as can be seen in the beefy comment above the
glGetStringi retrieval.

With this in place, we no longer crash with the following:

  wflinfo --platform glx --api gl --profile compat --version 3.1
Reported-by: Ben Crocker's avatarBen Crocker <>
Signed-off-by: Emil Velikov's avatarEmil Velikov <>
(cherry picked from commit be8eaddd)
parent 273bc286
......@@ -994,7 +994,11 @@ gl_has_extension_GetStringi(const char *name)
static bool
gl_has_extension(const char *name)
if (gl_get_version() >= 30) {
// Use the new glGetStringi when possible.
// Due to the funky semantics of obtaining the function pointer, we can
// get here, even when it is NULL.
if (glGetStringi && gl_get_version() >= 30) {
return gl_has_extension_GetStringi(name);
} else {
return gl_has_extension_GetString(name);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment