summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-02-12Fix EGLDisplay parameters in epoxy functionsFredrik Höglund1-4/+4
EGLDisplay is typedefed as a pointer.
2014-02-06Fix some silly line-wrapping in a printf.Eric Anholt1-2/+1
2014-02-06Add a missing \n on an error message.Eric Anholt1-1/+1
2014-02-06Use the same typedefs as upstream khrplatform.h in a couple cases.Eric Anholt1-2/+2
This should avoid any differences we might end up with compared to system khrplatform.h.
2014-02-06Define the rest of the khrplatform.h types, and prevent its inclusion.Eric Anholt1-2/+14
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-01Add missing dependency on libdl.Eric Anholt1-0/+1
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-01Use LDADD instead of LDFLAGS/DEPENDENCIES.Matt Turner1-1/+4
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-01-31Fix a missing \n on printing out failure to dlsym().Eric Anholt1-1/+1
2014-01-31Fix using epoxy on systems with only EGL and GLES1 or GLES2.Eric Anholt3-3/+72
Fixes #19
2014-01-31Fix typo in gles2 dlsym setupEric Anholt1-1/+1
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-30Add missing make dist of gen_dispatch.py.Eric Anholt1-0/+4
Fixes distcheck when built out of tree (not that I'm using make dist for distributing releases, currently).
2014-01-30Fix a typo in the Makefile.am.Eric Anholt1-3/+3
Fixes #15 (and make dist when built out of tree)
2014-01-28Do a trivial sort on the enums generated.Eric Anholt1-2/+10
Python was apparently randomizing the output of the hash iterator, preventing ccache after a make clean.
2014-01-22Add support for Mesa's GLES1 implementation.Eric Anholt2-2/+2
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.
2013-12-17win32: Convert the API to being based on function pointers, like Linux.Eric Anholt4-27/+27
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-17win32: Expose the dispatch table reset funtion in the public API.Eric Anholt1-7/+16
Fixes #2.
2013-12-17win32: Reset all dispatch tables to re-resolve on any wglMakeCurrent.Eric Anholt4-9/+63
2013-12-17Drop the PLATFORM_HAS_EGL check in epoxy_egl_dlsym().Eric Anholt1-4/+0
If you accidentally call it on a non-egl platform, better to get an informative error message.
2013-12-17win32: Move dynamic symbol loading to do_dlsym().Eric Anholt1-12/+13
This should help get us better error handling when we accidentally call the wrong loader path.
2013-12-17win32: Start wrapping the 1.0 wgl functions.Eric Anholt1-13/+12
I want to have a chance to intercept wglMakeCurrent for WGL's context-dependent function pointer handling.
2013-12-17win32: Use thread local storage to get us a dispatch table per thread.Eric Anholt3-2/+79
2013-12-17Don't forget to tell our users that the epoxy GL functions are __dllimport.Eric Anholt2-5/+4
This lets the compiler generate faster function calls (call through function pointer, instead of call into a linker-generated stub func containing jump to function pointer).
2013-12-16Add and clean up some more comments in the python.Eric Anholt1-9/+22
Fixes #8
2013-12-16Update python comments about aliases.Eric Anholt1-4/+2
2013-12-16Add support for lower-priority aliases of functions.Eric Anholt1-0/+16
For example, on desktop 2.1 GL on Apple, there's no glBindVertexArray, but there is glBindVertexArrayAPPLE, and as far as a caller is concerned, the APPLE variant should be able to stand in for the core/ARB version. Similarly for trying to do FBOs on an old Mesa implementation that didn't have ARB_fbo yet, but did have EXT_fbo.
2013-12-16Fix copyrights on the Makefile.ams.Eric Anholt1-16/+17
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-15Fix printout of missing versions/extensions.Eric Anholt1-1/+1
Not sure how I misplaced the \n in the previous fix.
2013-12-15Fix declaration of glBegin/End_unwrapped.Eric Anholt1-2/+2
On non-win32, it was declaring a new function pointer variable on every #include, and OS X's linker got angry.
2013-12-15Fix loading of extension functions on OS X.Eric Anholt1-0/+2
For a non-GLX application, at least, we need to pull our extensions using dlsym, not glXGetProcAddress(). The symptom was a segfault in glXGetProcAddress().
2013-12-15Use a non-inlined helper for the simple case of a single provider.Eric Anholt1-16/+38
This reduces the built size by another 37k.
2013-12-15Reuse the same string table in one more place.Eric Anholt1-1/+3
Saves another 53k on disk, no relocations.
2013-12-15Use offsets into a string table to reduce the binary size.Eric Anholt1-4/+20
Saves 54k on disk and 3700 relocations.
2013-12-15Move the #defines into the main generated header.Eric Anholt2-9/+1
I initially thought I was going to have two sets of defines you chose from using #include, but that never ended up being necessary.
2013-12-15Abandon ifuncs and go with the traditional global function pointers.Eric Anholt3-42/+69
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-13Add a check that we've made it into the C runtime when doing dlopen().Eric Anholt1-0/+17
This should give us a more informative failure mode than the one mentioned in the README.
2013-12-12Fix infinite loop in extension detection when the needle is a substring.Eric Anholt1-3/+7
We could keep examining the same ptr value over and over.
2013-12-12Fix loading of EGL 1.1+ entrypoints.Eric Anholt1-2/+3
2013-12-12Include epoxy/gl.h instead of epoxy/gl_generated.h from egl_generated.hEric Anholt1-1/+1
This gets us the safety check for including GL/gl.h before epoxy/gl.h
2013-12-12Fix most GLhandleARB warnings on OS X with a big comment in our code.Eric Anholt1-2/+21
2013-12-12Use the right library name for GLX on OS X.Eric Anholt1-2/+8
2013-12-11Fix the path to the GL library on OS X.Eric Anholt1-0/+11
2013-12-11Disable EGL on OS X.Eric Anholt2-1/+17
It doesn't exist. There's EAGL, but that's not something we're covering.
2013-12-11Use X11_CFLAGS during the build so we find the right xlib headers.Eric Anholt1-1/+5
We don't need x11_libs, because we don't directly call any xlib functions. We're just passing xlib types around.
2013-12-11Link the library with -Bsymbolic.Eric Anholt1-0/+1
We don't want anybody to accidentally override the library's internal usage of epoxy_has_gl_extension() or similar public interfaces.
2013-12-11Use ifuncs on Linux to avoid dispatch table overhead.Eric Anholt1-0/+44
These tell the linker to generate GNU_IFUNC relocs that rewrite the PLT entries in the user's address space to point to our resolved GL function, so there's no extra function pointer. It also, as a bonus, cuts 400k out of the library. This requires a toolchain from 2010 or so. Unfortunately, it's going to take a bit more investigation to find out what specific bits are required. Fixes #4
2013-12-11Move the unwrapped logic to function setup.Eric Anholt1-18/+17
I'm going to want the same stuff for ifuncs.
2013-12-11Make func.alias_name always have the name of our alias.Eric Anholt1-13/+6
The "None" for "we're not an alias of anything else" wasn't actually simplifying things.
2013-12-10Reduce the overhead of the dispatch table usage.Eric Anholt1-8/+54
We now initialize our dispatch table with function pointers that go and do the rewrite, then we never have to check for a NULL table entry again. On my 64-bit build, epoxy_glClear() drops from 83 bytes to 14, while the total library size only goes up by 5%. This also paves the way for fixing our dispatch table management using TLS on windows.
2013-12-10Add dispatch generation for wgl.Eric Anholt5-1/+140
This is very poorly tested at this point, but survives a simple testcase.
2013-12-10Use get_core_proc_address() on win32.Eric Anholt1-2/+2
This is needed for glGetString() lookup to work, since wglGetProcAddress() returns NULL for core procs.