212 Commits
Author SHA1 Message Date
Eric Anholt b2ae054b3a Avoid name conflicts between pkgconfig's EGL_LIBS and a temporary var.
I felt a little uncomfortable knowing I had two things defining
EGL_LIBS, but it worked on my system.  It failed on the travis ci
build.
2014-06-13 15:57:11 -07:00
Eric Anholt 0096b79923 Fix context type detection if we find eglGetCurrentContext().
Fixes #29.
2014-06-13 15:00:31 -07:00
Eric Anholt d56f21c494 Use the EGL pkgconfig for finding eglplatform.h.
We don't ever explicity link against libEGL, so no need to make use of
EGL_LIBS.

Fixes #30.
2014-06-13 14:59:37 -07:00
Eric Anholt 27298ee31b tests: Fix the passing of the "-z now" arg to the linker.
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.
2014-06-13 14:44:54 -07:00
Eric Anholt 4a76cb97f8 Add a control file for Travis CI.
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.
2014-06-13 13:56:05 -07:00
Eric Anholt 28c9c471b2 Remove a C99ism from dispatch.
I've decided it's time to accept that building with MSVC 2010 is a way
that people want to use this software.
2014-06-13 13:55:42 -07:00
Eric Anholt 4d64234e05 Merge pull request #27 from Sonicadvance1/Android-Support
Add support for Android.
2014-06-13 13:55:01 -07:00
Ryan Houdek c791612b0a Adds support for Android.
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.
2014-05-28 22:18:56 -05:00
Eric Anholt 7422de5b4b Bump version to 1.2 for release. v1.2 2014-05-13 17:22:08 -07:00
Eric Anholt 5f88ca5cd6 Merge branch 'khronos-registry' 2014-05-13 13:41:14 -07:00
Eric Anholt 3f402f6052 Import registry from SVN 26622 2014-05-13 13:41:00 -07:00
Eric Anholt c7a91844de Don't forget to install the wgl headers.
Fixes #26
2014-05-13 12:36:43 -07:00
Eric Anholt 568533441f Move __stdcall into the parens for function pointer definitions.
MSVC 2010 appears to require that it be located there.
2014-04-10 13:37:47 -07:00
Eric Anholt 6eb075c70e Fix EGL context detection for non-GLES2-core functions.
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.
2014-04-08 23:54:26 -07:00
Eric Anholt bb94003b78 Add a test for a failure I found with the X Server after my last fixes. 2014-04-08 23:54:25 -07:00
Eric Anholt 756dcaf6a5 Disable the dlwrap-based tests on apple.
We'd need a dlvsym() equivalent.
2014-03-28 16:45:26 -07:00
Eric Anholt 3e09de7550 win32: Delay using dispatch tables until the second MakeCurrent.
Fixes #11.
2014-03-28 16:45:26 -07:00
Eric Anholt 370c49d5cd Use #defines to shrink the size of gl_generated_dispatch.c
I was running into file size limits with win32 debug symbols.
2014-03-28 16:33:53 -07:00
Eric Anholt 11a946cbf5 Prefer non-aliased functions when resolving.
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.
2014-03-28 16:33:53 -07:00
Eric Anholt ea12f935c1 wgl: Add a test for MakeCurrent returning different function pointers.
Huh, my old rule of "untested code is broken code" didn't hold up, for once.
2014-03-28 16:33:19 -07:00
Eric Anholt b1d875ef0b Clean up epoxy_current_context_is_glx().
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.
2014-03-27 23:17:02 -07:00
Eric Anholt db5b939f98 Ask glXGetProcAddress for ES symbols when we're on a GLX context.
Fixes #24
2014-03-27 23:17:02 -07:00
Eric Anholt b251e3ae33 Factor out the GLX versus EGL current context detection code.
It turns out I need to reuse this for GLES symbols when using
GLX_EXT_create_context_es2_profile.
2014-03-27 23:17:02 -07:00
Eric Anholt d48978c084 Don't leak dlerror()s while we're trying to probe libraries.
Again, no known bugs, but it seems like a bad idea.
2014-03-27 23:17:02 -07:00
Eric Anholt 72187a29c2 Don't dlsym() if we failed to dlopen().
No reported bugs I'm fixing here, just cleanup.
2014-03-27 23:17:02 -07:00
Eric Anholt e230042ffe test: Add a test using GLX_EXT_create_context_es2_profile.
This is based on a bug report from Steinar H. Gunderson about using
GLES3 with SDL and epoxy.
2014-03-27 23:17:02 -07:00
Eric Anholt 46da7790b2 test: Avoid segfaulting when nvidia driver does a dlopen(RTLD_DEFAULT) 2014-03-27 17:32:16 -07:00
Eric Anholt 7f5fc047da win32: Fix a C90 compiler warning. 2014-03-27 15:37:32 -07:00
Eric Anholt e7d3088d71 win32: Add support for wglUseFontBitmaps().
Fixes #10.
2014-03-27 15:33:21 -07:00
Eric Anholt 5a37cf88b5 win32: Add a test for wglUseFontBitmaps(). 2014-03-27 15:33:21 -07:00
Eric Anholt e7f69038da Add EGL_NOK_swap_region definition.
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.
2014-03-27 10:53:33 -07:00
Eric Anholt d74355fc96 Add EGL_NOK_swap_region2 definition.
Found at:

https://www.khronos.org/registry/egl/extensions/NOK/EGL_NOK_swap_region2.txt
2014-03-27 10:53:01 -07:00
Eric Anholt d53169404a Add EGL_NOK_texture_from_pixmap definition.
Found at:

https://www.khronos.org/registry/egl/extensions/NOK/EGL_NOK_texture_from_pixmap.txt
2014-03-27 10:45:27 -07:00
Eric Anholt 91d8e5f848 Merge branch 'khronos-registry'
This brings in GLES 3.1, EGL 1.5, and GLX_MESA_query_renderer.
2014-03-27 09:05:12 -07:00
Eric Anholt f762c7feb7 Import registry from SVN 26007 2014-03-27 09:02:27 -07:00
Eric Anholt 5dcdfe9d79 Remove a debug printf that slipped in. 2014-03-27 08:43:31 -07:00
Eric Anholt 847a6d50db Avoid using eglGPA() for core funcs when the current context is GLX.
If you already had GLX loaded by epoxy, this wouldn't happen, but on
the first call, fallback cases might have taken the EGL path if EGL
was loaded.
2014-03-19 18:43:21 -07:00
Eric Anholt b670c84039 Refactor dispatch_common's EGL context detection code.
I want to reuse this from get_core_proc_address().
2014-03-19 18:43:19 -07:00
Eric Anholt e6d9bb971b Try to use glXGPA() for core funcs if the current context is GLX.
Fixes the GLX-only subtest of egl_and_glx_different_pointers.  Now
what remains is dispatch tables for when you're actively using both.

Fixes #23
2014-03-19 18:34:30 -07:00
Eric Anholt 698185e24a Try to avoid looking up bootstrap functions in the wrong library.
Fixes the EGL-only subtest of egl_and_glx_different_pointers.
2014-03-19 18:34:30 -07:00
Eric Anholt 037ac7f566 Add a test for EGL and GLX returning different function pointers.
This is the case on the nvidia binary driver's GL, or when you've got
a system mixing nvidia binary GL and Mesa EGL.
2014-03-19 17:39:52 -07:00
Eric Anholt dae231680e Import a copy of dlwrap from libfips.
This is just cworth's code, reindented for this project.
2014-03-19 12:56:22 -07:00
Eric Anholt 9efad17eb4 Actually fix #21 (hopefully). 2014-03-17 11:21:11 -07:00
Eric Anholt 14f24485e3 Add support for looking up GLES3 functions using dlsym().
ARM and Mesa disagreed on how to look up the functions, so support
both ways.

Fixes #21
2014-03-17 11:20:10 -07:00
Eric Anholt 053ac5f457 Fix test build.
I was initially planning on having a separate file of the overrides
when I'd forgotten I couldn't rely on ELF symbol lookup.
2014-03-17 11:19:15 -07:00
Eric Anholt 53b87c33e4 Catch eglBindAPI() failures in looking up bootstrap functions.
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
2014-03-17 11:02:41 -07:00
Eric Anholt f15c169cad Extend the egl_without_glx test for another quirk of the platform.
Epoxy dlsym()s directly into libEGL instead of using dlsym() on a NULL
handle, so we can't relying on ELF resolution like we do for dlopen().
Instead, just override epoxy's function pointers for the functions
epoxy will call in the process of getting one of these bootstrap
functions.
2014-03-17 09:55:46 -07:00
Fredrik Höglund d4ad80fb8e Add aliases for OES_get_program_binary 2014-02-12 18:11:24 +01:00
Fredrik Höglund 35e3b0a6da Add aliases for APPLE_sync 2014-02-12 18:07:44 +01:00
Fredrik Höglund 30de2e86ea Add aliases for EXT_texture_storage 2014-02-12 00:56:58 +01:00