Skip to content

Implement support for allowing vendor libraries to overwrite libglvnd entrypoints

Kyle Brenneman requested to merge github/fork/bnguyen0/master into master

Created by: bnguyen0

Vendor libraries may wish to override the default libglvnd entrypoints with custom code for performance reasons. The following series of changes implements the infrastructure to make this possible.

Commits 69c1d70b and abc5c9a5 refactor mapi's assembly dispatch generation to be more general-purpose, allowing libglvnd to restore the default entrypoints when no context is current.

Commit fdf67a7d defines the ABI that vendor libraries may use to write custom code to libglvnd's entrypoints.

This optimization may cause conflicts if a process attempts to make current to more than one vendor's context at the same time, when one or more of those vendors implements custom entrypoint code. To work around this issue, users may set the __GLVND_DISALLOW_PATCHING environment variable to turn this optimization off.

Merge request reports