Commit cc034480 authored by Eric Engestrom's avatar Eric Engestrom 💤 Committed by Marge Bot
Browse files

egl: inline _EGLAPI into _EGLDriver



_EGLDriver was an empty wrapper around _EGLAPI, so let's only keep one
of them. "driver" represents better what's being accessed, so that's the
one we're keeping.
Signed-off-by: Eric Engestrom's avatarEric Engestrom <eric@engestrom.ch>
Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
Part-of: <!5987>
parent 7b7917a4
Pipeline #179651 passed with stages
in 1 minute and 9 seconds
LIBEGL_C_FILES := \
main/eglapi.c \
main/eglapi.h \
main/eglarray.c \
main/eglarray.h \
main/eglconfig.c \
......
......@@ -1136,7 +1136,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
}
/**
* Called via eglInitialize(), GLX_drv->API.Initialize().
* Called via eglInitialize(), drv->Initialize().
*
* This must be guaranteed to be called exactly once, even if eglInitialize is
* called many times (without a eglTerminate in between).
......@@ -1305,7 +1305,7 @@ dri2_egl_surface_free_local_buffers(struct dri2_egl_surface *dri2_surf)
}
/**
* Called via eglTerminate(), drv->API.Terminate().
* Called via eglTerminate(), drv->Terminate().
*
* This must be guaranteed to be called exactly once, even if eglTerminate is
* called many times (without a eglInitialize in between).
......@@ -1463,7 +1463,7 @@ dri2_fill_context_attribs(struct dri2_egl_context *dri2_ctx,
}
/**
* Called via eglCreateContext(), drv->API.CreateContext().
* Called via eglCreateContext(), drv->CreateContext().
*/
static _EGLContext *
dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
......@@ -1638,7 +1638,7 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
}
/**
* Called via eglDestroyContext(), drv->API.DestroyContext().
* Called via eglDestroyContext(), drv->DestroyContext().
*/
static EGLBoolean
dri2_destroy_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
......@@ -1753,7 +1753,7 @@ dri2_create_drawable(struct dri2_egl_display *dri2_dpy,
}
/**
* Called via eglMakeCurrent(), drv->API.MakeCurrent().
* Called via eglMakeCurrent(), drv->MakeCurrent().
*/
static EGLBoolean
dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
......@@ -1871,7 +1871,7 @@ dri2_surface_get_dri_drawable(_EGLSurface *surf)
}
/*
* Called from eglGetProcAddress() via drv->API.GetProcAddress().
* Called from eglGetProcAddress() via drv->GetProcAddress().
*/
static _EGLProc
dri2_get_proc_address(_EGLDriver *drv, const char *procname)
......@@ -3655,55 +3655,55 @@ dri2_interop_export_object(_EGLDisplay *disp, _EGLContext *ctx,
void
_eglInitDriver(_EGLDriver *dri2_drv)
{
dri2_drv->API.Initialize = dri2_initialize;
dri2_drv->API.Terminate = dri2_terminate;
dri2_drv->API.CreateContext = dri2_create_context;
dri2_drv->API.DestroyContext = dri2_destroy_context;
dri2_drv->API.MakeCurrent = dri2_make_current;
dri2_drv->API.CreateWindowSurface = dri2_create_window_surface;
dri2_drv->API.CreatePixmapSurface = dri2_create_pixmap_surface;
dri2_drv->API.CreatePbufferSurface = dri2_create_pbuffer_surface;
dri2_drv->API.DestroySurface = dri2_destroy_surface;
dri2_drv->API.GetProcAddress = dri2_get_proc_address;
dri2_drv->API.WaitClient = dri2_wait_client;
dri2_drv->API.WaitNative = dri2_wait_native;
dri2_drv->API.BindTexImage = dri2_bind_tex_image;
dri2_drv->API.ReleaseTexImage = dri2_release_tex_image;
dri2_drv->API.SwapInterval = dri2_swap_interval;
dri2_drv->API.SwapBuffers = dri2_swap_buffers;
dri2_drv->API.SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
dri2_drv->API.SwapBuffersRegionNOK = dri2_swap_buffers_region;
dri2_drv->API.SetDamageRegion = dri2_set_damage_region;
dri2_drv->API.PostSubBufferNV = dri2_post_sub_buffer;
dri2_drv->API.CopyBuffers = dri2_copy_buffers,
dri2_drv->API.QueryBufferAge = dri2_query_buffer_age;
dri2_drv->API.CreateImageKHR = dri2_create_image;
dri2_drv->API.DestroyImageKHR = dri2_destroy_image_khr;
dri2_drv->API.CreateWaylandBufferFromImageWL = dri2_create_wayland_buffer_from_image;
dri2_drv->API.QuerySurface = dri2_query_surface;
dri2_drv->API.QueryDriverName = dri2_query_driver_name;
dri2_drv->API.QueryDriverConfig = dri2_query_driver_config;
dri2_drv->Initialize = dri2_initialize;
dri2_drv->Terminate = dri2_terminate;
dri2_drv->CreateContext = dri2_create_context;
dri2_drv->DestroyContext = dri2_destroy_context;
dri2_drv->MakeCurrent = dri2_make_current;
dri2_drv->CreateWindowSurface = dri2_create_window_surface;
dri2_drv->CreatePixmapSurface = dri2_create_pixmap_surface;
dri2_drv->CreatePbufferSurface = dri2_create_pbuffer_surface;
dri2_drv->DestroySurface = dri2_destroy_surface;
dri2_drv->GetProcAddress = dri2_get_proc_address;
dri2_drv->WaitClient = dri2_wait_client;
dri2_drv->WaitNative = dri2_wait_native;
dri2_drv->BindTexImage = dri2_bind_tex_image;
dri2_drv->ReleaseTexImage = dri2_release_tex_image;
dri2_drv->SwapInterval = dri2_swap_interval;
dri2_drv->SwapBuffers = dri2_swap_buffers;
dri2_drv->SwapBuffersWithDamageEXT = dri2_swap_buffers_with_damage;
dri2_drv->SwapBuffersRegionNOK = dri2_swap_buffers_region;
dri2_drv->SetDamageRegion = dri2_set_damage_region;
dri2_drv->PostSubBufferNV = dri2_post_sub_buffer;
dri2_drv->CopyBuffers = dri2_copy_buffers,
dri2_drv->QueryBufferAge = dri2_query_buffer_age;
dri2_drv->CreateImageKHR = dri2_create_image;
dri2_drv->DestroyImageKHR = dri2_destroy_image_khr;
dri2_drv->CreateWaylandBufferFromImageWL = dri2_create_wayland_buffer_from_image;
dri2_drv->QuerySurface = dri2_query_surface;
dri2_drv->QueryDriverName = dri2_query_driver_name;
dri2_drv->QueryDriverConfig = dri2_query_driver_config;
#ifdef HAVE_LIBDRM
dri2_drv->API.CreateDRMImageMESA = dri2_create_drm_image_mesa;
dri2_drv->API.ExportDRMImageMESA = dri2_export_drm_image_mesa;
dri2_drv->API.ExportDMABUFImageQueryMESA = dri2_export_dma_buf_image_query_mesa;
dri2_drv->API.ExportDMABUFImageMESA = dri2_export_dma_buf_image_mesa;
dri2_drv->API.QueryDmaBufFormatsEXT = dri2_query_dma_buf_formats;
dri2_drv->API.QueryDmaBufModifiersEXT = dri2_query_dma_buf_modifiers;
dri2_drv->CreateDRMImageMESA = dri2_create_drm_image_mesa;
dri2_drv->ExportDRMImageMESA = dri2_export_drm_image_mesa;
dri2_drv->ExportDMABUFImageQueryMESA = dri2_export_dma_buf_image_query_mesa;
dri2_drv->ExportDMABUFImageMESA = dri2_export_dma_buf_image_mesa;
dri2_drv->QueryDmaBufFormatsEXT = dri2_query_dma_buf_formats;
dri2_drv->QueryDmaBufModifiersEXT = dri2_query_dma_buf_modifiers;
#endif
#ifdef HAVE_WAYLAND_PLATFORM
dri2_drv->API.BindWaylandDisplayWL = dri2_bind_wayland_display_wl;
dri2_drv->API.UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
dri2_drv->API.QueryWaylandBufferWL = dri2_query_wayland_buffer_wl;
dri2_drv->BindWaylandDisplayWL = dri2_bind_wayland_display_wl;
dri2_drv->UnbindWaylandDisplayWL = dri2_unbind_wayland_display_wl;
dri2_drv->QueryWaylandBufferWL = dri2_query_wayland_buffer_wl;
#endif
dri2_drv->API.GetSyncValuesCHROMIUM = dri2_get_sync_values_chromium;
dri2_drv->API.CreateSyncKHR = dri2_create_sync;
dri2_drv->API.ClientWaitSyncKHR = dri2_client_wait_sync;
dri2_drv->API.SignalSyncKHR = dri2_signal_sync;
dri2_drv->API.WaitSyncKHR = dri2_server_wait_sync;
dri2_drv->API.DestroySyncKHR = dri2_destroy_sync;
dri2_drv->API.GLInteropQueryDeviceInfo = dri2_interop_query_device_info;
dri2_drv->API.GLInteropExportObject = dri2_interop_export_object;
dri2_drv->API.DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
dri2_drv->API.SetBlobCacheFuncsANDROID = dri2_set_blob_cache_funcs;
dri2_drv->GetSyncValuesCHROMIUM = dri2_get_sync_values_chromium;
dri2_drv->CreateSyncKHR = dri2_create_sync;
dri2_drv->ClientWaitSyncKHR = dri2_client_wait_sync;
dri2_drv->SignalSyncKHR = dri2_signal_sync;
dri2_drv->WaitSyncKHR = dri2_server_wait_sync;
dri2_drv->DestroySyncKHR = dri2_destroy_sync;
dri2_drv->GLInteropQueryDeviceInfo = dri2_interop_query_device_info;
dri2_drv->GLInteropExportObject = dri2_interop_export_object;
dri2_drv->DupNativeFenceFDANDROID = dri2_dup_native_fence_fd;
dri2_drv->SetBlobCacheFuncsANDROID = dri2_set_blob_cache_funcs;
}
......@@ -304,7 +304,7 @@ get_wl_surface_proxy(struct wl_egl_window *window)
}
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
......@@ -426,7 +426,7 @@ dri2_wl_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
}
/**
* Called via eglDestroySurface(), drv->API.DestroySurface().
* Called via eglDestroySurface(), drv->DestroySurface().
*/
static EGLBoolean
dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
......@@ -1050,7 +1050,7 @@ try_damage_buffer(struct dri2_egl_surface *dri2_surf,
}
/**
* Called via eglSwapBuffers(), drv->API.SwapBuffers().
* Called via eglSwapBuffers(), drv->SwapBuffers().
*/
static EGLBoolean
dri2_wl_swap_buffers_with_damage(_EGLDriver *drv,
......
......@@ -244,7 +244,7 @@ dri2_x11_get_red_mask_for_depth(struct dri2_egl_display *dri2_dpy, int depth)
}
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
......@@ -360,7 +360,7 @@ dri2_x11_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
}
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
dri2_x11_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
......
......@@ -219,7 +219,7 @@ dri3_authenticate(_EGLDisplay *disp, uint32_t id)
}
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
dri3_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
......
......@@ -73,7 +73,7 @@ struct haiku_egl_surface
/**
* Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
* Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
......@@ -321,17 +321,17 @@ _eglInitDriver(_EGLDriver *driver)
{
CALLED();
driver->API.Initialize = init_haiku;
driver->API.Terminate = haiku_terminate;
driver->API.CreateContext = haiku_create_context;
driver->API.DestroyContext = haiku_destroy_context;
driver->API.MakeCurrent = haiku_make_current;
driver->API.CreateWindowSurface = haiku_create_window_surface;
driver->API.CreatePixmapSurface = haiku_create_pixmap_surface;
driver->API.CreatePbufferSurface = haiku_create_pbuffer_surface;
driver->API.DestroySurface = haiku_destroy_surface;
driver->API.SwapBuffers = haiku_swap_buffers;
driver->Initialize = init_haiku;
driver->Terminate = haiku_terminate;
driver->CreateContext = haiku_create_context;
driver->DestroyContext = haiku_destroy_context;
driver->MakeCurrent = haiku_make_current;
driver->CreateWindowSurface = haiku_create_window_surface;
driver->CreatePixmapSurface = haiku_create_pixmap_surface;
driver->CreatePbufferSurface = haiku_create_pbuffer_surface;
driver->DestroySurface = haiku_destroy_surface;
driver->SwapBuffers = haiku_swap_buffers;
TRACE("API Calls defined\n");
}
......@@ -25,11 +25,11 @@ entrypoints set.
As part of initialization, the dispatch table in _EGLDriver->API must be
populated with all the EGL entrypoints. Some functions like
driver->API.Initialize and driver->API.Terminate _must_ be implemented
driver->Initialize and driver->Terminate _must_ be implemented
with driver-specific code (no default/fallback function is possible).
Shortly after, the driver->API.Initialize() function is executed. Any additional
Shortly after, the driver->Initialize() function is executed. Any additional
driver initialization that wasn't done in the driver entry point should be
done at this point. Typically, this will involve setting up visual configs, etc.
......@@ -54,7 +54,7 @@ defaults/fallbacks. Same thing for the eglGet/Query functions.
Teardown:
When eglTerminate() is called, the driver->API.Terminate() function is
When eglTerminate() is called, the driver->Terminate() function is
called. The driver should clean up after itself. eglTerminate() will
then close/unload the driver (shared library).
......
......@@ -96,7 +96,6 @@
#include "c11/threads.h"
#include "util/macros.h"
#include "eglapi.h"
#include "egldefines.h"
#include "eglglobals.h"
#include "eglcontext.h"
......@@ -675,7 +674,7 @@ eglTerminate(EGLDisplay dpy)
if (disp->Initialized) {
_EGLDriver *drv = disp->Driver;
drv->API.Terminate(drv, disp);
drv->Terminate(drv, disp);
/* do not reset disp->Driver */
disp->ClientAPIsString[0] = 0;
disp->Initialized = EGL_FALSE;
......@@ -805,7 +804,7 @@ eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_list,
if (!share && share_list != EGL_NO_CONTEXT)
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
context = drv->API.CreateContext(drv, disp, conf, share, attrib_list);
context = drv->CreateContext(drv, disp, conf, share, attrib_list);
ret = (context) ? _eglLinkContext(context) : EGL_NO_CONTEXT;
RETURN_EGL_EVAL(disp, ret);
......@@ -824,7 +823,7 @@ eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
_EGL_CHECK_CONTEXT(disp, context, EGL_FALSE, drv);
_eglUnlinkContext(context);
ret = drv->API.DestroyContext(drv, disp, context);
ret = drv->DestroyContext(drv, disp, context);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -882,7 +881,7 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
if (read_surf && read_surf->Lost)
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_FALSE);
ret = drv->API.MakeCurrent(drv, disp, draw_surf, read_surf, context);
ret = drv->MakeCurrent(drv, disp, draw_surf, read_surf, context);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -971,7 +970,7 @@ _eglCreateWindowSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
if (_eglNativeSurfaceAlreadyUsed(disp, native_window))
RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
surf = drv->API.CreateWindowSurface(drv, disp, conf, native_window,
surf = drv->CreateWindowSurface(drv, disp, conf, native_window,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
......@@ -1098,7 +1097,7 @@ _eglCreatePixmapSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
if (_eglNativeSurfaceAlreadyUsed(disp, native_pixmap))
RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
surf = drv->API.CreatePixmapSurface(drv, disp, conf, native_pixmap,
surf = drv->CreatePixmapSurface(drv, disp, conf, native_pixmap,
attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
......@@ -1171,7 +1170,7 @@ eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
if ((conf->SurfaceType & EGL_PBUFFER_BIT) == 0)
RETURN_EGL_ERROR(disp, EGL_BAD_MATCH, EGL_NO_SURFACE);
surf = drv->API.CreatePbufferSurface(drv, disp, conf, attrib_list);
surf = drv->CreatePbufferSurface(drv, disp, conf, attrib_list);
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
RETURN_EGL_EVAL(disp, ret);
......@@ -1189,7 +1188,7 @@ eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
_eglUnlinkSurface(surf);
ret = drv->API.DestroySurface(drv, disp, surf);
ret = drv->DestroySurface(drv, disp, surf);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1206,8 +1205,8 @@ eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
if (drv->API.QuerySurface)
ret = drv->API.QuerySurface(drv, disp, surf, attribute, value);
if (drv->QuerySurface)
ret = drv->QuerySurface(drv, disp, surf, attribute, value);
else
ret = _eglQuerySurface(drv, disp, surf, attribute, value);
......@@ -1242,7 +1241,7 @@ eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.BindTexImage(drv, disp, surf, buffer);
ret = drv->BindTexImage(drv, disp, surf, buffer);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1258,7 +1257,7 @@ eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
_EGL_FUNC_START(disp, EGL_OBJECT_SURFACE_KHR, surf, EGL_FALSE);
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.ReleaseTexImage(drv, disp, surf, buffer);
ret = drv->ReleaseTexImage(drv, disp, surf, buffer);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1291,8 +1290,8 @@ eglSwapInterval(EGLDisplay dpy, EGLint interval)
surf->Config->MaxSwapInterval);
if (surf->SwapInterval != interval) {
if (drv->API.SwapInterval)
ret = drv->API.SwapInterval(drv, disp, surf, interval);
if (drv->SwapInterval)
ret = drv->SwapInterval(drv, disp, surf, interval);
else
ret = _eglSwapInterval(drv, disp, surf, interval);
}
......@@ -1338,7 +1337,7 @@ eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
if (surf->Lost)
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_FALSE);
ret = drv->API.SwapBuffers(drv, disp, surf);
ret = drv->SwapBuffers(drv, disp, surf);
/* EGL_KHR_partial_update
* Frame boundary successfully reached,
......@@ -1374,7 +1373,7 @@ _eglSwapBuffersWithDamageCommon(_EGLDisplay *disp, _EGLSurface *surf,
if ((n_rects > 0 && rects == NULL) || n_rects < 0)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.SwapBuffersWithDamageEXT(drv, disp, surf, rects, n_rects);
ret = drv->SwapBuffersWithDamageEXT(drv, disp, surf, rects, n_rects);
/* EGL_KHR_partial_update
* Frame boundary successfully reached,
......@@ -1461,7 +1460,7 @@ eglSetDamageRegionKHR(EGLDisplay dpy, EGLSurface surface,
RETURN_EGL_ERROR(disp, EGL_BAD_ACCESS, EGL_FALSE);
_eglSetDamageRegionKHRClampRects(disp, surf, rects, n_rects);
ret = drv->API.SetDamageRegion(drv, disp, surf, rects, n_rects);
ret = drv->SetDamageRegion(drv, disp, surf, rects, n_rects);
if (ret)
surf->SetDamageRegionCalled = EGL_TRUE;
......@@ -1483,7 +1482,7 @@ eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
native_pixmap_ptr = (void*) target;
_EGL_CHECK_SURFACE(disp, surf, EGL_FALSE, drv);
ret = drv->API.CopyBuffers(drv, disp, surf, native_pixmap_ptr);
ret = drv->CopyBuffers(drv, disp, surf, native_pixmap_ptr);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1511,7 +1510,7 @@ _eglWaitClientCommon(void)
/* a valid current context implies an initialized current display */
assert(disp->Initialized);
drv = disp->Driver;
ret = drv->API.WaitClient(drv, disp, ctx);
ret = drv->WaitClient(drv, disp, ctx);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1556,7 +1555,7 @@ eglWaitNative(EGLint engine)
/* a valid current context implies an initialized current display */
assert(disp->Initialized);
drv = disp->Driver;
ret = drv->API.WaitNative(drv, disp, engine);
ret = drv->WaitNative(drv, disp, engine);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1714,7 +1713,7 @@ eglReleaseThread(void)
mtx_lock(&disp->Mutex);
drv = disp->Driver;
(void) drv->API.MakeCurrent(drv, disp, NULL, NULL, NULL);
(void) drv->MakeCurrent(drv, disp, NULL, NULL, NULL);
mtx_unlock(&disp->Mutex);
}
}
......@@ -1745,7 +1744,7 @@ _eglCreateImageCommon(_EGLDisplay *disp, EGLContext ctx, EGLenum target,
if (ctx != EGL_NO_CONTEXT && target == EGL_LINUX_DMA_BUF_EXT)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_NO_IMAGE_KHR);
img = drv->API.CreateImageKHR(drv, disp, context, target,
img = drv->CreateImageKHR(drv, disp, context, target,
buffer, attr_list);
ret = (img) ? _eglLinkImage(img) : EGL_NO_IMAGE_KHR;
......@@ -1795,7 +1794,7 @@ _eglDestroyImageCommon(_EGLDisplay *disp, _EGLImage *img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
_eglUnlinkImage(img);
ret = drv->API.DestroyImageKHR(drv, disp, img);
ret = drv->DestroyImageKHR(drv, disp, img);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1879,7 +1878,7 @@ _eglCreateSync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list,
RETURN_EGL_ERROR(disp, invalid_type_error, EGL_NO_SYNC_KHR);
}
sync = drv->API.CreateSyncKHR(drv, disp, type, attrib_list);
sync = drv->CreateSyncKHR(drv, disp, type, attrib_list);
ret = (sync) ? _eglLinkSync(sync) : EGL_NO_SYNC_KHR;
RETURN_EGL_EVAL(disp, ret);
......@@ -1947,7 +1946,7 @@ _eglDestroySync(_EGLDisplay *disp, _EGLSync *s)
disp->Extensions.ANDROID_native_fence_sync);
_eglUnlinkSync(s);
ret = drv->API.DestroySyncKHR(drv, disp, s);
ret = drv->DestroySyncKHR(drv, disp, s);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -1994,7 +1993,7 @@ _eglClientWaitSyncCommon(_EGLDisplay *disp, EGLDisplay dpy,
if (s->Type == EGL_SYNC_REUSABLE_KHR)
_eglUnlockDisplay(dpy);
ret = drv->API.ClientWaitSyncKHR(drv, disp, s, flags, timeout);
ret = drv->ClientWaitSyncKHR(drv, disp, s, flags, timeout);
/*
* 'disp' is already unlocked for reusable sync type,
......@@ -2047,7 +2046,7 @@ _eglWaitSyncCommon(_EGLDisplay *disp, _EGLSync *s, EGLint flags)
if (flags != 0)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.WaitSyncKHR(drv, disp, s);
ret = drv->WaitSyncKHR(drv, disp, s);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2088,7 +2087,7 @@ eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode)
_EGL_CHECK_SYNC(disp, s, EGL_FALSE, drv);
assert(disp->Extensions.KHR_reusable_sync);
ret = drv->API.SignalSyncKHR(drv, disp, s, mode);
ret = drv->SignalSyncKHR(drv, disp, s, mode);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2170,7 +2169,7 @@ eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSync sync)
_EGL_CHECK_SYNC(disp, s, EGL_NO_NATIVE_FENCE_FD_ANDROID, drv);
assert(disp->Extensions.ANDROID_native_fence_sync);
ret = drv->API.DupNativeFenceFDANDROID(drv, disp, s);
ret = drv->DupNativeFenceFDANDROID(drv, disp, s);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2197,7 +2196,7 @@ eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface,
surf != ctx->DrawSurface)
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
ret = drv->API.SwapBuffersRegionNOK(drv, disp, surf, numRects, rects);
ret = drv->SwapBuffersRegionNOK(drv, disp, surf, numRects, rects);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2217,7 +2216,7 @@ eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
if (!disp->Extensions.MESA_drm_image)
RETURN_EGL_EVAL(disp, EGL_NO_IMAGE_KHR);
img = drv->API.CreateDRMImageMESA(drv, disp, attr_list);
img = drv->CreateDRMImageMESA(drv, disp, attr_list);
ret = (img) ? _eglLinkImage(img) : EGL_NO_IMAGE_KHR;
RETURN_EGL_EVAL(disp, ret);
......@@ -2240,7 +2239,7 @@ eglExportDRMImageMESA(EGLDisplay dpy, EGLImage image,
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.ExportDRMImageMESA(drv, disp, img, name, handle, stride);
ret = drv->ExportDRMImageMESA(drv, disp, img, name, handle, stride);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2263,7 +2262,7 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
if (!display)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.BindWaylandDisplayWL(drv, disp, display);
ret = drv->BindWaylandDisplayWL(drv, disp, display);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2283,7 +2282,7 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
if (!display)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.UnbindWaylandDisplayWL(drv, disp, display);
ret = drv->UnbindWaylandDisplayWL(drv, disp, display);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2304,7 +2303,7 @@ eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer,
if (!buffer)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.QueryWaylandBufferWL(drv, disp, buffer, attribute, value);
ret = drv->QueryWaylandBufferWL(drv, disp, buffer, attribute, value);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2329,7 +2328,7 @@ eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image)
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, NULL);
ret = drv->API.CreateWaylandBufferFromImageWL(drv, disp, img);
ret = drv->CreateWaylandBufferFromImageWL(drv, disp, img);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2350,7 +2349,7 @@ eglPostSubBufferNV(EGLDisplay dpy, EGLSurface surface,
if (!disp->Extensions.NV_post_sub_buffer)
RETURN_EGL_EVAL(disp, EGL_FALSE);
ret = drv->API.PostSubBufferNV(drv, disp, surf, x, y, width, height);
ret = drv->PostSubBufferNV(drv, disp, surf, x, y, width, height);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2374,7 +2373,7 @@ eglGetSyncValuesCHROMIUM(EGLDisplay dpy, EGLSurface surface,
if (!ust || !msc || !sbc)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.GetSyncValuesCHROMIUM(disp, surf, ust, msc, sbc);
ret = drv->GetSyncValuesCHROMIUM(disp, surf, ust, msc, sbc);
RETURN_EGL_EVAL(disp, ret);
}
......@@ -2397,7 +2396,7 @@ eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImage image,
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
ret = drv->API.ExportDMABUFImageQueryMESA(drv, disp, img, fourcc, nplanes,
ret = drv->ExportDMABUFImageQueryMESA(drv, disp, img, fourcc, nplanes,
modifiers);
RETURN_EGL_EVAL(disp, ret);
......@@ -2420,7 +2419,7 @@ eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImage image,
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);