63 Commits
Author SHA1 Message Date
Eric Anholt b73be3c588 Imported Upstream version 1.3 2015-07-15 16:16:10 -07:00
Chun-wei Fan a2a51904b0 test/wgl_per_context_funcptrs.c: Fix build on Visual Studio
Ensure that we do __stdcall only after the return type, as Visual Studio
will not like it otherwise.
2015-06-05 17:51:39 -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 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 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 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 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 9998c39e8d Fix a bad error message in an EGL test. 2014-02-06 13:34:35 -08:00
Eric Anholt eb7a99d1bd Add missing '\n's to wgl test errors.
Like some of the other missing '\n's, I'd originally used errx(), then
just done a sed job to fprintf when I found that win32 lacked errx().
2014-02-06 13:34:25 -08: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 36847f88a7 Fix compiler warnings in the tests.
I didn't have CWARNFLAGS in the Makefile.am, so lots of things that
would generate warnings had crept in.
2014-01-31 15:52:28 -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 7f68641d1b Make headerguards check for double-inclusion of our own headers.
Since I was touching these bits, it was easy enough to make sure that
our header guards work on our own headers.
2014-01-22 01:05:59 -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 d6e4e9ac4c Fix the build of the headerguards test on OS X. 2013-12-11 17:18:28 -08:00
Eric Anholt 34d7b3d872 Fix signedness warning on OS X build of the testsuite. 2013-12-11 17:18:28 -08:00
Eric Anholt 6553c08752 Fix compiler warning in glx_static. 2013-12-11 14:58:33 -08:00
Eric Anholt 22ce76fe0b Make glx_static report skip if it was built non-static.
It won't have that symbol, unless it happens to be linked against the
full library.
2013-12-11 14:35:46 -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