Commit Graph
367 Commits
Author SHA1 Message Date
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
Fredrik Höglund fea4a8feee Add alias for NV_framebuffer_multisample 2014-02-12 00:56:58 +01:00
Fredrik Höglund 64e90baf87 Add aliases for OES_texture_3D 2014-02-12 00:56:57 +01:00
Fredrik Höglund e20b3ce6c7 Fix EGLDisplay parameters in epoxy functions
EGLDisplay is typedefed as a pointer.
2014-02-12 00:56:57 +01:00
Fredrik Höglund 87a099b141 Add alias for NV_framebuffer_blit 2014-02-12 00:56:57 +01:00
Fredrik Höglund 6c5417db46 Add aliases for EXT_map_buffer_range
Note that GLES doesn't allow zero-length mappings, unlike desktop GL.
2014-02-12 00:56:53 +01:00
Fredrik Höglund 8d942b8639 Add aliases for OES_vertex_array_object 2014-02-11 20:47:29 +01:00
Fredrik Höglund 93a5b15ae9 Add aliases for NV_instanced_arrays 2014-02-11 20:47:29 +01:00
Fredrik Höglund f09c4d00dc Add aliases for ANGLE_instanced_arrays 2014-02-11 20:47:26 +01:00
Eric Anholt e1e13a51b4 Bump version to 1.1 for release. v1.1 2014-02-06 15:08:38 -08:00
Eric Anholt 67a1ad4f6c Add limited support for the KHRONOS_* defines from khrplatform.h.
The only way these get used is when you choose to include epoxy/gl.h
but EGL/egl.h.  I'm not sure that's something I want to actually
support, but piglit happened to do so, and this gets things working.

There's not as much support here as in real khrplatform.h, but then
there's no EGL for windows.  And seriously, compilers support 64-bit
and float types, why would you even build this complexity?
2014-02-06 14:50:22 -08: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 81ccc70837 Fix some silly line-wrapping in a printf. 2014-02-06 13:17:23 -08:00
Eric Anholt c4d19366cc Add a missing \n on an error message. 2014-02-06 11:29:36 -08:00
Eric Anholt 766422a82c Use the same typedefs as upstream khrplatform.h in a couple cases.
This should avoid any differences we might end up with compared to
system khrplatform.h.
2014-02-06 11:23:43 -08:00
Eric Anholt e4f5da9539 Add a test that khrplatform.h (if present) agrees with us. 2014-02-06 11:16:18 -08:00
Eric Anholt c996534080 Define the rest of the khrplatform.h types, and prevent its inclusion.
One of the problems with krhplatform.h (besides it being a terrible
idea in the first place) is that it's not present on many systems at
all, including apple, win32, and linux before late 2009.

So, unless we introduce the first ./configure dependency to the core
library build, we really do need to define these standard types to
their standard values.  But if we allow khrplatform.h inclusion as
well, we'll get long-vs-int redefinition warnings on 32-bit.  So, we
have to completely replicate the header, which is a thing we've done
for everything else except for eglplatform.h.

A testcase will be used to make sure that our types don't drift from
the system khrplatform.h types, if it even exists.

Fixes #17
2014-02-06 11:16:11 -08:00
Eric Anholt 79600fa6d2 Merge branch 'khronos-registry' 2014-02-01 12:33:08 -08:00
Eric Anholt 17e5c307f5 Add missing dependency on libdl.
Everything I'd linked against the library so far already had a libdl
dependency (through libX11, for example), so I hadn't noticed.
2014-02-01 12:32:42 -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 1c2b6daa9b Import registry from SVN 25146 2014-02-01 12:13:17 -08:00
Eric Anholt a55d28ee1b Fix a missing \n on printing out failure to dlsym(). 2014-01-31 15:52:43 -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 7c660c5c7a Add a COPYING file describing the two licenses for the project code.
Fixes #20
2014-01-31 15:51:53 -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 72e57908c6 Fix typo in gles2 dlsym setup
If you happened to do both GLES2 and GLES1 in a process, it meant that
you'd try to look up v1 procs in the v2 API, and lose.  Caught by
piglit oes_fixed_point-attribute-arrays.
2014-01-31 15:30:22 -08:00
Eric Anholt 46953a662c Add missing make dist of gen_dispatch.py.
Fixes distcheck when built out of tree (not that I'm using make dist
for distributing releases, currently).
2014-01-30 12:23:55 -08:00
Eric Anholt 9e30b7e633 Fix a typo in the Makefile.am.
Fixes #15 (and make dist when built out of tree)
2014-01-30 12:16:15 -08:00
Eric Anholt f6e91a7e86 Declare a private dependency on libdl.
The new linker requires that the consumers of a library link against
the libraries that that library depends on, which is supported by
Libs.private.

Fixes #16
2014-01-30 12:11:24 -08:00
Eric Anholt 12ef9dcf2d Do a trivial sort on the enums generated.
Python was apparently randomizing the output of the hash iterator,
preventing ccache after a make clean.
v1.0
2014-01-28 15:20:11 -08:00
Eric Anholt aa778ef39d Add support for Mesa's GLES1 implementation.
Mesa reports "OpenGL ES-CM 1.1", so we need to not look for a space
after "ES", and 1.1 is still a 1.0-compatible implementation.
2014-01-22 01:06:04 -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 f10bff9bc0 Avoid polluting the compiler's namespace with our own stuff.
We can't completely avoid it, since gl's headers use these defines for
their header guards, and we really do need to stop the system GL
headers from doing anything.

Fixes #14
2014-01-22 01:00:56 -08:00
Eric Anholt d653a87e46 Fix the definition of ALL_ATTRIB_BITS.
It's been 0x000fffff on Mesa since the initial import in 1999.  It's
the same value on my OS X 10.8 system, mingw's Windows-compatible
gl.h, and a copy of the windows SDK gl.h I found laying around on the
internet.

Fixes piglit ARB_multisample/pushpop.
2014-01-22 01:00:43 -08:00
Eric Anholt 8067f15e97 Merge branch 'registry'
Conflicts:
	registry/egl.xml
	registry/gl.xml

The only diff we now have from the source is glUnmapBufferOES()'s
alias to normal glUnmapBuffer().
2014-01-20 09:29:16 -08:00
Eric Anholt 46ad30c54f Import registry from SVN 24778. 2014-01-20 09:25:48 -08:00
Eric Anholt cfdb26c2a4 Add missing provider for eglCreateImageKHR.
EGL_KHR_image_base defines these two functions, and so does
EGL_KHR_image (which is bascically the union of EGL_KHR_image_base and
EGL_KHR_image_pixmap).
2013-12-27 17:53:06 -08:00
Eric Anholt efa64545fb Add missing aliases for OES_mapbuffer to desktop's buffer mapping. 2013-12-27 13:36:58 -08:00
Eric Anholt 0b55e879b1 Include the README in the distributed tarball. 2013-12-17 15:21:48 -08:00
Eric Anholt e6ec61b737 Work around README.md rendering on github.
It would sure be neat if any of the README previewers out there
actually rendered things the same way github does.
2013-12-17 15:14:14 -08:00
Eric Anholt 9bc909f5a7 win32: Convert the API to being based on function pointers, like Linux.
For performance, I want to be able to make single-context (well,
single-pixel-format-and-device) apps be able to directly call GL
functions through function pointers.  Bake that into the ABI now so I
can get a release out the door and fix this up later.

This also fixes the lack of __stdcall annotation on the
PFNWHATEVERPROC typedefs.
2013-12-17 15:08:02 -08:00
Eric Anholt 3ae4726cdb win32: Expose the dispatch table reset funtion in the public API.
Fixes #2.
2013-12-17 14:34:02 -08:00