diff options
author | Marek Olšák <[email protected]> | 2017-10-18 20:23:00 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-18 20:23:42 +0200 |
commit | 84f3afc2e122cb418573f1e9c61716520f9859c1 (patch) | |
tree | fd8f3bbc2b7f5eeb905a5699cf0f5bdec59f95d0 /src/egl/drivers/haiku | |
parent | 2cb9ab53dd3ae6850a2611b01695f7449d24614d (diff) |
Revert "egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}"
This reverts commit 8cb84c8477a57ed05d703669fee1770f31b76ae6.
This fixes crashing shader-db/run.
Diffstat (limited to 'src/egl/drivers/haiku')
-rw-r--r-- | src/egl/drivers/haiku/egl_haiku.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 590e43f00fb..237cebf056e 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -305,14 +305,21 @@ haiku_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) /** * This is the main entrypoint into the driver, called by libEGL. - * Gets an _EGLDriver object and init its dispatch table. + * Create a new _EGLDriver object and init its dispatch table. */ extern "C" -void -_eglInitDriver(_EGLDriver *driver) +_EGLDriver* +_eglBuiltInDriver(void) { CALLED(); + _EGLDriver* driver = calloc(1, sizeof(*driver)); + if (!driver) { + _eglError(EGL_BAD_ALLOC, "_eglBuiltInDriverHaiku"); + return NULL; + } + + _eglInitDriverFallbacks(driver); driver->API.Initialize = init_haiku; driver->API.Terminate = haiku_terminate; driver->API.CreateContext = haiku_create_context; @@ -328,4 +335,6 @@ _eglInitDriver(_EGLDriver *driver) driver->Name = "Haiku"; TRACE("API Calls defined\n"); + + return driver; } |