Commit Graph
49 Commits
Author SHA1 Message Date
Emmanuele Bassi 2b6f01b008 Allow enabling and disabling GLX support, part II
After doing this for Meson in commit fc014fa1, let's do the same dance
for the Autotools build.
2017-02-06 15:58:20 +00:00
Emmanuele Bassi 6b68ddeaa0 build: Skip GLESv1 tests if there's no GLESv1
It's pretty much pointless to build and run tests for a library that we
know is not available.

The Meson build already skips the GLES 1.0 test, so let's make the
Autotools build do the same.
2017-01-25 12:28:29 +00:00
Eric Anholt 8bbc0d40c6 Make the glx_alias_prefer_same_name test work, and hook it up.
Apparently I started writing it, and didn't notice I wasn't building
my code when I committed the library support.
2015-07-16 11:24:34 -07:00
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 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 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 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 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 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 5a37cf88b5 win32: Add a test for wglUseFontBitmaps(). 2014-03-27 15:33:21 -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 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
Eric Anholt e4f5da9539 Add a test that khrplatform.h (if present) agrees with us. 2014-02-06 11:16:18 -08:00
Matt Turner 5a39b7abe2 List X11_LIBS after lib{egl,glx}_common.
Fixes linking with --as-needed.
2014-02-01 12:32:42 -08:00
Matt Turner 309f2d2020 Use LDADD instead of LDFLAGS/DEPENDENCIES.
This is a lot shorter to type, and still gets the dependencies to work
(tested with touch src/dispatch_common.c; make check, and touch
src/egl_common.c; make check).
2014-02-01 12:32:09 -08:00
Eric Anholt c761908c3e Enable compiler warnings in the tests. 2014-01-31 15:52:43 -08:00
Eric Anholt 1064406814 Fix using epoxy on systems with only EGL and GLES1 or GLES2.
Fixes #19
2014-01-31 15:51:53 -08:00
Eric Anholt dbf940dabc Test for using GLES1/2 without GLX installed. 2014-01-31 15:30:36 -08:00
Eric Anholt 972989b4ce Fix copyrights on the Makefile.ams.
When initially writing the Makefiles, I started from a Makefile.am
that had ajax's copyright instead of an Intel one.  The only line I
can see that's left from the original Makefile.am is "pkgconfigdir" in
the root Makefile.am.
2013-12-16 09:20:25 -08:00
Eric Anholt c92fcc852f Fix testsuite build on OS X.
There's no linker flag of this name in the normal clang, presumably
beause the linker feature doesn't exist.
2013-12-16 08:27:55 -08:00
Eric Anholt 3d2a2b3c80 Abandon ifuncs and go with the traditional global function pointers.
In addition to the failing testcase, there were a couple of
regressions in piglit's attribs test: one from glBegin_unwrapped vs
glBegin confusion in the __asm__ directives we were generating, and
one where the function pointers apparently were just getting mixed up
at application runtime.
2013-12-15 20:15:51 -08:00
Eric Anholt e58e98feee Fix the behavior of glx_shared_znow if it doesn't die at startup.
We're sharing the source file with glx_static, but we don't want to
SKIP due to not being statically linked.
2013-12-13 17:00:56 -08:00
Eric Anholt 5c4f73fa7f Add a test showing a way that our ifuncs are broken. 2013-12-13 13:01:22 -08:00
Eric Anholt acd3b38d6e Relink tests when the library changes.
For the dynamically-linked tests, it wasn't a big deal because the
updated library was always picked up.  But for glx_static, we were
actually testing stale code.
2013-12-13 12:30:14 -08:00
Eric Anholt 2206e6e302 Add a testcase for trying to use libepoxy as a static library.
Note that it will only actually link statically against epoxy if
you've set --enable-static.
2013-12-11 13:49:08 -08:00
Eric Anholt ca14052cfe Add a test for basic functionality on win32. 2013-12-10 14:19:01 -08:00
Eric Anholt bfd687da89 Port tests directory to win32. 2013-12-06 18:34:46 -08:00
Eric Anholt 0d7d26537d Conditionalize building GLX and EGL tests and headers.
Note that the generated code is still generated, they just aren't
built and installed.  The goal with that is that someone could take
the built .c and .h files and drop it into their own project, if they
want to avoid shared libs.
2013-12-06 15:50:01 -08:00
Eric Anholt 19053c4d6f Fix out of tree build 2013-12-06 15:50:01 -08:00
Eric Anholt 01ce694073 Add a compile-time test for missing #defines. 2013-12-06 11:38:41 -08:00
Eric Anholt 0983996e49 Fix calling new entrypoints from within glBegin()/glEnd(). 2013-12-05 15:07:08 -08:00
Eric Anholt 9ffa5d25c4 Add a test for a bug when called during glBegin()/glEnd(). 2013-12-05 15:07:08 -08:00
Eric Anholt 8bb5a2545e Fix extension detection on core GL contexts.
The nasty old strings were deprecated.
2013-12-05 13:02:51 -08:00
Eric Anholt 20f03e65c4 Add a new test for our public API against a core context.
Our extension detection for core is totally broken.
2013-12-05 12:56:58 -08:00
Eric Anholt 0270c80008 Add support for EGL.
This totally replaces the getprocaddress and dlsym code, which was
basically just stubs up until now.  The is_glx/is_egl() is also
dropped -- they weren't doing anything, and the only false answer they
could give is if the dlopen were to fail.
2013-12-05 12:38:15 -08:00
Eric Anholt de70a2a0ab Fix a similar bug to HEAD~2, this time in epoxy_has_glx_extension(). 2013-12-04 19:22:13 -08:00
Eric Anholt 7603c144db Add a failing testcase for the public API of epoxy_has_glx_extension. 2013-12-04 19:20:34 -08:00
Eric Anholt 0f67bf3f11 Fix bug in public entrypoint for epoxy_glx_version()
Unfortunately, for GLX 1.4+ entrypoints (just glxGetProcAddress
currently) or extensions, if there isn't a context bound then we don't
have a dpy and screen available to provide useful debug messages.  Oh
well.
2013-12-04 19:18:31 -08:00
Eric Anholt 14f822ee91 Add a testcase for a bug in the public API. 2013-12-04 19:18:31 -08:00
Eric Anholt 617fd39b5b Add a test for including system GL headers after epoxy. 2013-12-04 16:19:20 -08:00
Eric Anholt 04cf940e1b Add an initial testsuite for GLX API. 2013-11-14 11:18:15 -08:00