- 31 May, 2016 1 commit
-
-
Kyle Brenneman authored
In __glDispatchLoseCurrent, don't try to restore the default entrypoints. Instead, __glDispatchMakeCurrent will check if it's using a different vendor library, and if so, it will unpatch and repatch the entrypoints then. If it's using the same vendor library (which will usually be the case), then it can leave them patched and skip the patch overhead. Some applications will call glXMakeCurrent to release and bind the same context every frame, sometimes multiples times. Each patch and unpatch sequnce can chew up 1-2 milliseconds. That's enough to significantly reduce the framerate of some applications. Reviewed-by:
James Jones <jajones@nvidia.com>
-
- 27 May, 2016 1 commit
-
-
Kyle Brenneman authored
Moved the unlock in __glXLookupVendorByName to after the calls to update the GLX entrypoints. Fixed a typo in GLXEntrypointUpdateCallback.
-
- 20 May, 2016 7 commits
-
-
Kyle Brenneman authored
Remove the libGLX_patchentry dummy vendor library. The libGLX_dummy.so library will provide the entrypoint patching callbacks based on an environment variable.
-
Kyle Brenneman authored
The testglxmakecurrent tests will now test both the GLXFBConfig and XVisualInfo-based GLX functions. The tests will also now cover using glXCreateContextAttribsARB to create a rendering context.
-
Kyle Brenneman authored
Added an implementation and dispatch function for glXCreateContextAttribsARB.
-
Kyle Brenneman authored
Defined a second array in GLX_dummy.c for GLX extension functions. The new array includes the name, function pointers, and the dispatch index for each function. Made the naming and formatting of the GL and GLX functions more consistent.
-
Kyle Brenneman authored
Implemented more GLX functions in the dummy vendor library. glXGetFBConfigs and glXChooseFBConfig will now hand back arrays of GLXFBConfig handles. There's nothing behind them, but the test app can then pass them to other functions. Implemented dummyCreateNewContext. Implemented the various functions for creating GLXDrawables. All of them just hand back a new XID. Implemented glXGetVisualFromFBConfig as a wrapper around glXChooseVisual.
-
Kyle Brenneman authored
Remove uneeded xorg-server dependency
-
Nicolas Chauvet authored
-
- 18 May, 2016 1 commit
-
-
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 2 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.
-