Skip to content

eglinfo: do not perform illegal limit-queries

Erik Faye-Lund requested to merge kusma/mesa-demos:eglinfo-version-check into main

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:

  1. We're using the same code for GL and GLES, but we don't distinguish between the API types in the print_limits-function.
  2. 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.

Merge request reports

Loading