eglinfo: do not perform illegal limit-queries
I recently noticed that debug-builds of Mesa spew quite a few errors when eglinfo is run with the -l
argument.
The reasons are two-fold:
- We're using the same code for GL and GLES, but we don't distinguish between the API types in the
print_limits
-function. - Some limits only exist if multiple extensions are supported.
Instead of trying to target these two issues directly, I decided to leverage a neat feature of GLAD; it uses different global variables to distinguish between the GL and GLES APIs, so we don't really need to pipe more information down there. I also decided to refactor how the extension table is traversed, to simplify things and clarify the output a tiny bit. Details are in the commits.
Other than this, this has the potential issue that we no longer try to report limits for GLES 1.x. However, I can't figure out how to get eglinfo
to create a GLES 1.x context, so that might be a purely theoretical issue. In either case, I don't feel GLES 1.x is worth the hassle, as it's mostly a dead API. But others might feel differently, dunno.