- 18 May, 2016 4 commits
-
-
Kyle Brenneman authored
Use the gen_glx_dispatch.py script to generate some of the GLX entrypoints for libGLX.
-
Kyle Brenneman authored
Use a binary search to look up a function index by name. Add a dummy element to the __glXDispatchFuncIndices, __GLX_DISPATCH_FUNC_NAMES, and __GLX_DISPATCH_FUNCS arrays. This allows us to remove the (index >= 0) checks. Both changes are based on equivalent changes from Mesa.
-
Kyle Brenneman authored
Added a script, gen_glx_dispatch.py, which can generate the GLX dispatch stubs that a vendor library provides.
-
Kyle Brenneman authored
Various cleanup and fixes for glXGetProcAddress and the GLX dispatch tables. Simplified the code paths behind glXGetProcAddress. Moved the GLX dispatch table handling to a new file under src/util, so that it will be usable for EGL. libGLX will now provide a dispatch index for every GLX function (including core functions) to every vendor library. This is useful for functions like glXCreateContextAttribsARB, where it allows the GLX dispatch stub to destroy the context if the call to addVendorContextMapping fails. Reviewed-by:
Andy Ritger <aritger@nvidia.com>
-
- 17 May, 2016 8 commits
-
-
Kyle Brenneman authored
Added a license+copyright comment to winsys_dispatch.[ch]. Renamed __GLVNDwinsysDispatchIndexHash to __GLVNDwinsysDispatchIndexEntry, since it's not a hashtable anymore. In __glXLookupVendorByName, only call __glvndWinsysDispatchGetCount once instead of on every loop iteration. Removed the locks for the GLX dispatch index list and the generated GLX dispatch stubs. Instead, the vendor hashtable's lock is used for all three. There's enough overlap between when the three locks are taken that using separte locks has very little benefit and increases the risk of deadlocks.
-
Kyle Brenneman authored
Remove the __GLXvendorInfo::dynDispatchHash hashtable, and replace it with a dispatch table from winsys_dispatch.
-
Kyle Brenneman authored
Added functions to create and manage a per-vendor dispatch table for window-system functions. These will replace the __GLXdispatchFuncHash hashtable in GLX.
-
Kyle Brenneman authored
Some minor cleanup of __glXFetchDispatchEntry. Handle the various failure cases more directly: If we can't find a name, or if the vendor library doesn't support a function, then return early. If we can't allocate a cache entry for the function, then return the dispatch stub anyway. It can try to store the stub again next time.
-
Kyle Brenneman authored
In cacheProcAddress, check if the function is already in the hashtable before trying to add it. It's possible that another thread might have already called glXGetProcAddress for the same function. In addition, allocate each cache entry with a single malloc instead of a malloc and a strdup.
-
Kyle Brenneman authored
The dispatch functions in libGLX are now added to the GLX dispatch list just like vendor-provided dispatch functions would be. The function name cache in glXGetProcAddress is no longer required for correctness, because it can look up a locally-defined dispatch stub in the same list as the vendor-provided stubs. In addition to simplifying glXGetProcAddress, this allows vendor libraries to look up all GLX functions by index. In particular, this would allow a vendor to look up glXDestroyContext, which would let it recover properly if it fails to add a new context to the context-to-vendor mapping.
-
Kyle Brenneman authored
Remove the __GLXdispatchIndexHash table, and use the list in winsys_dispatch.c to keep track of the function indices, names, and dispatch stubs. If libGLX generates a GLX dispatch stub, then it will now assign an index to it when it generates the stub, not when it fills in the stub. That lets it treat generated stubs the same way regardless of whether they've been filled in or not. When assigning an index, it will now call the setDispatchIndex callback for every vendor library, not just the vendor that provided the dispatch stub. When loading a vendor library, it will call the new vendor's setDispatchIndex callback for every existing GLX dispatch function.
-
Kyle Brenneman authored
Added a new file, winsys_dispatch.c, with functions for keeping track of the indices, names, and dispatch stubs for window-system functions. This will replace the __GLXdispatchIndexHash hashtable in GLX. It's independant of the window system, so it should be usable for EGL as well.
-
- 11 May, 2016 2 commits
-
-
Kyle Brenneman authored
libOpenGL doesn't contain anything GLX-specific, so it doesn't need anything defined in glx.h.
-
Kyle Brenneman authored
Fix the warnings that autogen.sh spits out. Added libtool convenience libraries for the source files in src/util instead of including them directly in other makefiles. This avoids a bunch of subdir-objects warnings. Added libtool convenience libraries for each of the glapi builds. Flattened the vnd-glapi directory. In theory, just setting the subdir-objects flag should be enough, but that causes failures where "make distcheck" doesn't build all of the source files.
-
- 04 May, 2016 3 commits
-
-
Kyle Brenneman authored
-
Kyle Brenneman authored
Removed the header file and the script to generate the __glXDispatchNoopPtr table. Also removed the dependency on Perl from configure.ac, since the rest of the scripts are in Python. Reviewed-by: aplattner@nvidia.com
-
Kyle Brenneman authored
Removed the functions __glXGetCurrentDispatch and __glXGetStaticDispatch. Everything that used either one now looks up the __GLXvendorInfo pointer instead. Also removed __glXGetGLDispatch, since it's not used anywhere. Reviewed-by: aplattner@nvidia.com
-
- 26 Apr, 2016 1 commit
-
-
Kyle Brenneman authored
Fix a read after free
-
- 24 Apr, 2016 1 commit
-
-
Thomas Andersen authored
In MergeExtensionStrings currentString was read after it was realloc'ed to make space for the extra extensions. This patch makes the function read the realloc'ed memory instead. To allow that to work 'buf' has to be null terminated on after every extra extension is written.
-
- 23 Apr, 2016 1 commit
-
-
Thomas Andersen authored
-
- 19 Apr, 2016 1 commit
-
-
Kyle Brenneman authored
Moved everything under src/GLdispatch/vnd-glapi/mapi/ to src/GLdispatch/vnd-glapi. Removed the subdir-objects flag. Using subdir-objects causes errors when you do a make followed by a "make distcheck", because for some reason the distcheck doesn't build all of the source files.
-
- 07 Apr, 2016 1 commit
-
-
Kyle Brenneman authored
Add GL_OES_point_size_array to the set of features and extensions that are exported from libGLESv1_CM.so. According to the OpenGL ES 1.1 spec, all required extensions are supposed to be statically exported from the library. GL_OES_point_size_array is the only required extension that defines any functions.
-
- 06 Apr, 2016 6 commits
-
-
Kyle Brenneman authored
Move trace.c and trace.h into the src/utils directory instead of a subdirectory.
-
Kyle Brenneman authored
Added the subdir-objects option to the vnd-glapi makefile. Changed all of the _SOURCES variables in that makefile to use relative paths.
-
Kyle Brenneman authored
Moved the MAPI_PREFIX variable from configure.ac to the vnd-glapi makefile. Removed the MAPI_MESA_PREFIX variable entirely.
-
Kyle Brenneman authored
Move the various vnd-glapi builds into individual .la files in the vnd-glapi makefile, instead of defining them in the OpenGL, GL, GLESv1, and GLESv2 makefiles.
-
Kyle Brenneman authored
Fixed a few order and variable name warnings. Defined convenience libraries for the source files under src/util, to avoid the subdir-objects warning from them.
-
Kyle Brenneman authored
If glXDestroyContext is called with NULL for the GLXContext, then it will now report an error using glvndAppErrorCheckReportError but it won't generate a GLXBadContext error. Some existing drivers (NVIDIA, Mesa, and possibly others) will just silently return in that case, and some applications depend on that behavior.
-
- 05 Apr, 2016 1 commit
-
-
Kyle Brenneman authored
Added app_error_check.c to libGLX, and initialize it from __glxInit.
-
- 04 Apr, 2016 1 commit
-
-
Kyle Brenneman authored
Fix spelling mistakes.
-
- 03 Apr, 2016 1 commit
-
-
Eric Engestrom authored
-
- 01 Apr, 2016 1 commit
-
-
Kyle Brenneman authored
By the time __glXFini is called, the destructors in the vendor libraries may have already been called, so it's not safe to call any functions in the vendor library. __glXFini will now check for a fork and go through fork recovery, but it won't call __glDispatchCheckMultithreaded. If there was a current context, then __glDispatchCheckMultithreaded might call the vendor's thread attach callback.
-
- 30 Mar, 2016 3 commits
-
-
Kyle Brenneman authored
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.
-
Kyle Brenneman authored
Add support for reporting application errors.
-
Kyle Brenneman authored
GLdispatch: Emit public_entry_{start,end} as hidden symbols
-
- 29 Mar, 2016 1 commit
-
-
Kyle Brenneman authored
The libglvnd libraries will now check for a new environment variable, __GLVND_APP_ERROR_CHECKING. If it's set to a non-zero value, then libglvnd will check for and report some application errors. Many non-libglvnd implementations of libGL.so have been fairly tolerant of certain application bugs. Libglvnd has to be similarly tolerant to support existing apps that the developers can't or won't fix. The new __GLVND_APP_ERROR_CHECKING provides a way to check for some of those errors, so that hopefully there will be fewer broken apps in the future. In addition to the setting itself, this updates the no-op stubs in libGLdispatch to report an error when the app tries to call an OpenGL function without a current context. Later changes will likely add other error checks.
-
- 28 Mar, 2016 3 commits
-
-
Kyle Brenneman authored
Replace x11glvnd with GLX_EXT_libglvnd extension.
-
Kyle Brenneman authored
Updates to libGLX vendor library interface.
-
Kyle Brenneman authored
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.
-
- 24 Mar, 2016 1 commit
-
-
Kyle Brenneman authored
Delete the x11glvnd directory. Commented out the two tests that depend on it, testx11glvndproto and testglxnscreens. Eventually, they should be rewritten to use the GLX_EXT_libglvnd extension instead.
-