These LDFLAGS go to the compiler, and getting the arg to the linker
requires -Wl or -Xlinker. gcc apparently was passing this through
anyway, while clang was getting angry.
This isn't quite as good as I'd like -- the XVFB setup doesn't support
a bunch of context creation extensions that we use, and I haven't
looked into the multiplatform stuff for doing OS X testing yet. I
think it's a good start, though.
This has been tested with both OpenGL and OpenGL ES on Android.
We can't use dlsym on Android to get all the function pointers since Android's libGLES* libraries are just shim libraries that pass everything through
to the real vendor specific libraries.
Due to this we must grab function pointers entirely through eglGetProcAddress instead of dlsym.
Fixes failure of the X Server with glamor using desktop GL on EGL, and
the associated testcase in the tree. This was clearly just
copy-and-paste failure on my part in
b251e3ae33.
This increases the size of the library, but avoids some of the
concerns that have been brought up with the library silently switching
you from glWhateverEXT() to glWhatever() if there might be slight
behavior differences between the two that hadn't been identified. The
downside is that it means we can't share the resolver functions among aliases.
Now that it's split out from epoxy_get_core_proc_address(),
the particular symbols we were testing for before calling
GetCurrentContext() didn't make much sense, plus we were leaking
dlerror()s still.
I couldn't find a spec for this one on the internet, but this matches
the prototype in eglmesaext.h. The note in swap_region2 says:
4) How is this extension an improvement over EGL_NOK_swap_region?
RESOLVED: This extension builds on the previous
EGL_NOK_swap_region extension by requiring that the implementation
considers the update region provided by the application as a
mandate rather than a hint. This allows for region-restricted
rendering without requiring the use of preserved buffer swaps
which may be relatively expensive for the implementation.
Furthermore, whilst preserved swap behaviour is necessary for
incremental rendering, many applications fully re-render modified
surface regions and so don't require preserved swap
behaviour. This extension provides a lighter weight surface update
mechanism for such applications.
This fixes crashes on ARM's Mali drivers, where desktop GL isn't
supported, and epoxy didn't notice the error and tried to dlsym() on
libGL.so.1.
An alternative would have been to look at the response from
eglQueryAPI() first, but that would have meant that we still need to
BindAPI in the case that eglQueryAPI returns something like VG or CL,
and so we needed to handle these errors regardless.
Fixes#22