I've been trying to look at this for a little while but I'm a beginner so I haven't gotten very far.
Interesting bits are here:
I've been attempting to skip all the GLX code in glxtest.cpp if getenv("MOZ_ENABLE_WAYLAND"), adding a hook to eglGetDisplayDriverConfig and calling fatal_error(driConfig) in get_egl_status() just to see if the XML driver config from this function contains the information necessary to replace the GLX code with EGL equivalents. However, I get an EGL_BAD_MATCH in eglCreateContext during eglInitialize() before my code even runs into my "test"...
I believe this is caused by one of the explanations discussed here: https://community.nxp.com/thread/351905
My suspicion is that an EGL context is not being shared to the glxtest thread.
Question 1: is eglGetDisplayDriverConfig useful at all in this situation?
Question 2: can this function safely be used instead of running the glxtest thread when running natively in wayland by using the display found by gdk_display_get_default() in main thread, which might already have an EGL context initialized?
P.S.: I probably should have installed piglit and run the egl_mesa_query_driver test to find out Question 1 instead...