summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-04-03Fix spelling mistakesEric Engestrom1-1/+1
2016-03-30GLX: Fix the version number macros.Kyle Brenneman1-3/+11
Fix the reversed GLX_VENDOR_ABI_GET_MAJOR_VERSION and GLX_VENDOR_ABI_GET_MINOR_VERSION macros. Add individual #defines for libglvnd's major and minor version for better readability.
2016-03-28Merge pull request #74 from kbrenneman/libglx-abi-version-1.Kyle Brenneman2-110/+186
Updates to libGLX vendor library interface.
2016-03-28GLX: A few more ABI fixes.Kyle Brenneman1-5/+5
Fix the return type in the __GLX_MAIN_PROTO macro. In GLX_dummy.c, check the major and minor version numbers like a real vendor library might. In addition, GLX_dummy.c now keeps a pointer to the __GLXapiExports struct instead of a copy of it.
2016-03-21Merge pull request #71 from evelikov/use-glprotoKyle Brenneman2-2776/+0
build: use system glproto headers
2016-03-10GLX: Add the patch callbacks directly to __GLXapiImports.Kyle Brenneman2-82/+78
Added the function pointers for entrypoint rewriting as members of __GLXapiImports, instead of using a separate __GLdispatchPatchCallbacks pointer. Moved the __GLdispatchPatchCallbacks struct to GLdispatch.h.
2016-03-10GLX: Change __glx_Main to use the libGLX-allocated __GLXapiImports table.Kyle Brenneman2-20/+29
__glx_Main now takes a pointer to the __GLXapiImports struct and fills it in. The __GLXapiImports struct is now allocated and zeroed by libGLX. This makes it possible to add an optional element to the end of the struct without breaking backward compatibility.
2016-03-03GLX: Change the __glx_Main function prototype.Kyle Brenneman1-13/+28
Removed the vendorID and vendorName parameters from the __glx_Main function, since neither one is useful to a vendor. Instead, __glx_Main now takes the __GLXvendorInfo pointer as a parameter. We can use that to look up any additional per-vendor information that might be added in the future.
2016-03-02GLX: Change the ABI version number to a (major, minor) pair.Kyle Brenneman1-1/+11
The version number for the libGLX vendor library interface now uses a major and minor version number in the high- and low-order 16 bits. The major version is used for changes that break existing vendor libraries, and the minor version is for changes where existing vendor libraries will still work.
2016-03-02Update a comment in GLdispatchABI.h.Kyle Brenneman1-2/+2
2016-02-29GLdispatch: Change the stub type enums.Kyle Brenneman1-10/+37
Removed the distinction between TSD and TLS stubs, since that doesn't matter to a vendor library. There's now a single type for the x86 stubs and a single type for the x86-64 stubs. Added a separate type enum for normal ARM and thumb stubs. As with x86, there's no distinction between TLS and TSD. Changed the __GLDISPATCH_STUB_PURE_C enum to a more generic __GLDISPATCH_STUB_UNKNOWN. Also removed the internal ENTRY_* enums and changed everything to use the __GLDISPATCH_STUB_* enums instead.
2016-02-29Rename a couple of functions in the ABI's.Kyle Brenneman2-2/+2
Renamed __GLdispatchPatchCallbacks::checkPatchSupported to isPatchSupported, and renamed __GLXapiImports::checkSupportsScreen to isScreenSupported.
2016-02-29GLX: Change the mapping functions to return a vendor directly.Kyle Brenneman1-15/+12
Changed vendorFromContext, vendorFromFBConfig, and vendorFromDrawable to return the vendor pointer as its return value instead of using a pointer. Returning by pointer was necessary when the functions would also return a screen number. But, GLX objects are now associated directly with a vendor, not with any particular screen or display.
2016-02-29GLX: Remove the XVisualInfo to vendor mapping.Kyle Brenneman1-4/+0
Removed addScreenVisualMapping, removeScreenVisualMapping, and vendorFromVisual from __GLXapiExports. The XVisualInfo to vendor mapping is a no-op, since it just uses the screen number to select a vendor. It might be useful in the future at some point to provide a mechanism for selecting between multiple vendors on a single X screen, but such an option would more likely be used with the GLXFBConfig-based functions, not with the XVisualInfo-based ones.
2016-02-29GLX: Return failures from the addVendor*Mapping functions.Kyle Brenneman1-3/+8
The addVendorContextMapping, addVendorFBConfigMapping, and addVendorDrawableMapping functions in __GLXapiExports now return an int to indicate success or failure. Updated the various GLX functions so that they will deal with those failures. In the case of context and drawable creations functions, it will call back into the vendor library to destroy the object before returning.
2016-02-29Add a threadAttach callback for entrypoint patching.Kyle Brenneman2-1/+22
The threadAttach callback is used so that a vendor library can go through any thread initialization it needs to in order to deal with any later OpenGL calls. This allows a vendor library to work around broken applications that try to call OpenGL functions without a current context.
2016-02-29build: use system glproto headersEmil Velikov2-2776/+0
As pointed out with commit d5bc0866a8c "Check for glproto in configure.ac" we want to rely on the upstream/distribution provided package. Thus lets remove the in-tree copy. Also make sure we use the headers (add the missing CFLAGS). Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-02-25Remove the GLVNDPthreadFuncs parameter from the lkdhash.h macros.Kyle Brenneman1-16/+25
The macros in lkdhash.h now just use the __glvndPthreadFuncs table, instead of taking a GLVNDPthreadFuncs parameter. Reviewed-by: Andy Ritger <aritger@nvidia.com>
2016-01-18Add glxmd.h back.Kyle Brenneman1-0/+54
glxmd.h was removed in a previous commit, but it's used from glxproto.h.
2016-01-14Remove a bunch of unused files.Kyle Brenneman9-5051/+0
Removed several header files that were copied from Mesa but aren't used in libglvnd. Removed everything under src/arch, also copied from Mesa but unused.
2016-01-13Install the public header files.Kyle Brenneman3-0/+488
Two header files (libglxabi.h and GLdispatchABI.h) are public -- intended to be used by vendor libraries, while the other headers are all internal to libglvnd. Move the public header files to a new directory, include/glvnd. Add a makefile so that the public headers are installed by make install.
2015-03-27Build fixes, mostly for old systems and compilers.Kyle Brenneman1-0/+54
- Add a config check for ((constructor)) and ((destructor)) funciton attributes. - Add missing GL/glxmd.h header. - For sufficiently old gcc versions, revert to inline asm implementations of Atomic{Increment,Swap,CompareAndSwap}() - Add a local implementation of asprintf. - entry_x86_tsd.h: Add missing cast to (char *) in entry_get_public - glvnd_pthread.[ch]: Only use pthread_rwlock_t if it's available, and fall back to pthread_mutex_t otherwise. - trace.c: Add missing _GNU_SOURCE define - uthash.h: Fix a -Wcast-qual warning - x11glvndclient.c: Fix a -Wcast-qual warning by using a writable array for storing the XGLV_EXTENSION_NAME Based on a patch by Brian Nguyen.
2014-10-28Add LKDHASH_TEARDOWN() macro to handle hash table cleanupBrian Nguyen1-0/+43
This macro frees all entries in a locked hash table, and either re-initializes the table's lock for fork recovery, or destroys the lock, in which case the hash table is fully torn down and must be re-initialized before it can be used. Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
2014-01-23[util] Add STATIC_ASSERT() and UNUSED macros to utils_misc.hBrian Nguyen1-12/+0
Also remove a duplicate STATIC_ASSERT() macro from include/compiler.h.
2013-11-25Remove redundant GLfixed typedefBrian Nguyen1-2/+1
This typedef is already defined in GL/glext.h and GLES/gl.h; including this redundant typedef may lead to build errors. Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
2013-08-26Add mesa headers from git commit fa7829c36b78b8ecc42238cbc0a02d1059320c77Brian Nguyen4-0/+787
2013-08-26Add lkdhash.hBrian Nguyen1-0/+43
This is a simple wrapper around uthash which simplifies read/write locking around hashtables used by libGLX.
2013-08-26Add glvnd_list.hBrian Nguyen1-0/+482
This is a copy of list.h from xserver commit 74469895e39fa38337f59edd64c4031ab9bb51d8, modified to prevent namespace clashes with list.h.
2013-08-26Add mesa GL headers from git commit fa7829c36b78b8ecc42238cbc0a02d1059320c77Brian Nguyen16-0/+24336