EGL: Allow vendor's dispatch stubs to update the EGL device map.

Export a new __EGLapiExports::setVendorForDevice function, which allows
dispatch stubs to update the device hashtable when something returns an
EGLDeviceEXT handle.

Bumped the ABI version number to 1.2.
This commit is contained in:
Kyle Brenneman 2021-02-10 15:52:11 -07:00
parent 2747fcd3fc
commit 26d15a9f13
2 changed files with 10 additions and 1 deletions

View File

@ -82,7 +82,7 @@ extern "C" {
* will still work.
*/
#define EGL_VENDOR_ABI_MAJOR_VERSION ((uint32_t) 0)
#define EGL_VENDOR_ABI_MINOR_VERSION ((uint32_t) 1)
#define EGL_VENDOR_ABI_MINOR_VERSION ((uint32_t) 2)
#define EGL_VENDOR_ABI_VERSION ((EGL_VENDOR_ABI_MAJOR_VERSION << 16) | EGL_VENDOR_ABI_MINOR_VERSION)
static inline uint32_t EGL_VENDOR_ABI_GET_MAJOR_VERSION(uint32_t version)
{
@ -191,6 +191,14 @@ typedef struct __EGLapiExportsRec {
* Returns the EGL vendor for an EGLDeviceEXT handle.
*/
__EGLvendorInfo *(*getVendorFromDevice)(EGLDeviceEXT dev);
/**
* Sets the EGL vendor for an EGLDeviceEXT handle. The dispatch stub for
* any function that returns an EGLDeviceEXT handle should call this.
*
* Supported since ABI version 1.2.
*/
EGLBoolean (* setVendorForDevice)(EGLDeviceEXT dev, __EGLvendorInfo *vendor);
} __EGLapiExports;
/*****************************************************************************

View File

@ -164,6 +164,7 @@ const __EGLapiExports __eglExportsTable = {
__eglSetLastVendor, // setLastVendor
__eglGetVendorFromDisplay, // getVendorFromDisplay
__eglGetVendorFromDevice, // getVendorFromDevice
__eglAddDevice, // setVendorForDevice
};
void TeardownVendor(__EGLvendorInfo *vendor)