diff options
author | Kyle Brenneman <[email protected]> | 2017-01-04 11:31:58 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-04-17 13:03:58 +0100 |
commit | ce562f9e3fab769d64b0e5453ec2b4f8710a31ce (patch) | |
tree | 5c372e39ba2c33611f145b91224f304a53ab6dd0 /src/egl/main/egldispatchstubs.h | |
parent | 370df207cadbc1ae60415b3b953f85088e6398d4 (diff) |
EGL: Implement the libglvnd interface for EGL (v3)
The new interface mostly just sits on top of the existing library.
The only change to the existing EGL code is to split the client
extension string into platform extensions and everything else. On
non-glvnd builds, eglQueryString will just concatenate the two strings.
The EGL dispatch stubs are all generated. The script is based on the one
used to generate entrypoints in libglvnd itself.
v2: [Kyle]
- Rebased against master.
- Reworked the EGL makefile to use separate libraries
- Made the EGL code generation scripts work with Python 2 and 3.
- Change gen_egl_dispatch.py to use argparse for the command line arguments.
- Assorted formatting and style cleanup in the Python scripts.
v3: [Emil Velikov]
- Rebase
- Remove separate glvnd glx/egl configure toggles
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/main/egldispatchstubs.h')
-rw-r--r-- | src/egl/main/egldispatchstubs.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/egl/main/egldispatchstubs.h b/src/egl/main/egldispatchstubs.h new file mode 100644 index 00000000000..7861ea5e61a --- /dev/null +++ b/src/egl/main/egldispatchstubs.h @@ -0,0 +1,26 @@ +#ifndef EGLDISPATCHSTUBS_H +#define EGLDISPATCHSTUBS_H + +#include "glvnd/libeglabi.h" + +// These variables are all generated along with the dispatch stubs. +extern const int __EGL_DISPATCH_FUNC_COUNT; +extern const char * const __EGL_DISPATCH_FUNC_NAMES[]; +extern int __EGL_DISPATCH_FUNC_INDICES[]; +extern const __eglMustCastToProperFunctionPointerType __EGL_DISPATCH_FUNCS[]; + +void __eglInitDispatchStubs(const __EGLapiExports *exportsTable); +void __eglSetDispatchIndex(const char *name, int index); + +/** + * Returns the dispatch function for the given name, or \c NULL if the function + * isn't supported. + */ +void *__eglDispatchFindDispatchFunction(const char *name); + +// Helper functions used by the generated stubs. +__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDisplay(EGLDisplay dpy, int index); +__eglMustCastToProperFunctionPointerType __eglDispatchFetchByDevice(EGLDeviceEXT dpy, int index); +__eglMustCastToProperFunctionPointerType __eglDispatchFetchByCurrent(int index); + +#endif // EGLDISPATCHSTUBS_H |