LIBEGL_C_FILES := \
main/eglapi.c \
- main/eglapi.h \
main/eglarray.c \
main/eglarray.h \
main/eglconfig.c \
}
/**
- * 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).
}
/**
- * 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).
}
/**
- * Called via eglCreateContext(), drv->API.CreateContext().
+ * Called via eglCreateContext(), drv->CreateContext().
*/
static _EGLContext *
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)
}
/**
- * Called via eglMakeCurrent(), drv->API.MakeCurrent().
+ * Called via eglMakeCurrent(), drv->MakeCurrent().
*/
static EGLBoolean
dri2_make_current(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *dsurf,
}
/*
- * Called from eglGetProcAddress() via drv->API.GetProcAddress().
+ * Called from eglGetProcAddress() via drv->GetProcAddress().
*/
static _EGLProc
dri2_get_proc_address(_EGLDriver *drv, const char *procname)
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;
}
}
/**
- * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ * Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
dri2_wl_create_window_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)
}
/**
- * Called via eglSwapBuffers(), drv->API.SwapBuffers().
+ * Called via eglSwapBuffers(), drv->SwapBuffers().
*/
static EGLBoolean
dri2_wl_swap_buffers_with_damage(_EGLDriver *drv,
}
/**
- * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ * Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
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,
}
/**
- * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ * Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
dri3_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
/**
- * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface().
+ * Called via eglCreateWindowSurface(), drv->CreateWindowSurface().
*/
static _EGLSurface *
haiku_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
{
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");
}
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.
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).
#include "c11/threads.h"
#include "util/macros.h"
-#include "eglapi.h"
#include "egldefines.h"
#include "eglglobals.h"
#include "eglcontext.h"
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;
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);
_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);
}
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);
}
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;
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;
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);
_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);
}
_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);
_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);
}
_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);
}
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);
}
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,
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,
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;
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);
}
/* 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);
}
/* 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);
}
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);
}
}
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;
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);
}
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);
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);
}
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,
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);
}
_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);
}
_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);
}
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);
}
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);
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
if (!img)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
- ret = drv->API.ExportDMABUFImageMESA(drv, disp, img, fds, strides, offsets);
+ ret = drv->ExportDMABUFImageMESA(drv, disp, img, fds, strides, offsets);
RETURN_EGL_EVAL(disp, ret);
}
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
- ret = drv->API.QueryDmaBufFormatsEXT(drv, disp, max_formats, formats,
+ ret = drv->QueryDmaBufFormatsEXT(drv, disp, max_formats, formats,
num_formats);
RETURN_EGL_EVAL(disp, ret);
_EGL_CHECK_DISPLAY(disp, EGL_FALSE, drv);
- ret = drv->API.QueryDmaBufModifiersEXT(drv, disp, format, max_modifiers,
+ ret = drv->QueryDmaBufModifiersEXT(drv, disp, format, max_modifiers,
modifiers, external_only,
num_modifiers);
disp->BlobCacheSet = set;
disp->BlobCacheGet = get;
- drv->API.SetBlobCacheFuncsANDROID(drv, disp, set, get);
+ drv->SetBlobCacheFuncsANDROID(drv, disp, set, get);
_eglUnlockDisplay(disp);
}
assert(disp->Extensions.MESA_query_driver);
- ret = drv->API.QueryDriverConfig(disp);
+ ret = drv->QueryDriverConfig(disp);
RETURN_EGL_EVAL(disp, ret);
}
assert(disp->Extensions.MESA_query_driver);
- ret = drv->API.QueryDriverName(disp);
+ ret = drv->QueryDriverName(disp);
RETURN_EGL_EVAL(disp, ret);
}
if (ret != MESA_GLINTEROP_SUCCESS)
return ret;
- if (drv->API.GLInteropQueryDeviceInfo)
- ret = drv->API.GLInteropQueryDeviceInfo(disp, ctx, out);
+ if (drv->GLInteropQueryDeviceInfo)
+ ret = drv->GLInteropQueryDeviceInfo(disp, ctx, out);
else
ret = MESA_GLINTEROP_UNSUPPORTED;
if (ret != MESA_GLINTEROP_SUCCESS)
return ret;
- if (drv->API.GLInteropExportObject)
- ret = drv->API.GLInteropExportObject(disp, ctx, in, out);
+ if (drv->GLInteropExportObject)
+ ret = drv->GLInteropExportObject(disp, ctx, in, out);
else
ret = MESA_GLINTEROP_UNSUPPORTED;
+++ /dev/null
-/**************************************************************************
- *
- * Copyright 2008 VMware, Inc.
- * Copyright 2009-2010 Chia-I Wu <olvaffe@gmail.com>
- * Copyright 2010-2011 LunarG, Inc.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-
-#ifndef EGLAPI_INCLUDED
-#define EGLAPI_INCLUDED
-
-#include "egltypedefs.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * A generic function ptr type
- */
-typedef void (*_EGLProc)(void);
-
-struct wl_display;
-struct mesa_glinterop_device_info;
-struct mesa_glinterop_export_in;
-struct mesa_glinterop_export_out;
-
-/**
- * The API dispatcher jumps through these functions
- */
-struct _egl_api
-{
- /* driver funcs */
- EGLBoolean (*Initialize)(_EGLDriver *, _EGLDisplay *disp);
- EGLBoolean (*Terminate)(_EGLDriver *, _EGLDisplay *disp);
- const char *(*QueryDriverName)(_EGLDisplay *disp);
- char *(*QueryDriverConfig)(_EGLDisplay *disp);
-
- /* context funcs */
- _EGLContext *(*CreateContext)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *config, _EGLContext *share_list,
- const EGLint *attrib_list);
- EGLBoolean (*DestroyContext)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLContext *ctx);
- /* this is the only function (other than Initialize) that may be called
- * with an uninitialized display
- */
- EGLBoolean (*MakeCurrent)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *draw, _EGLSurface *read,
- _EGLContext *ctx);
-
- /* surface funcs */
- _EGLSurface *(*CreateWindowSurface)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *config, void *native_window,
- const EGLint *attrib_list);
- _EGLSurface *(*CreatePixmapSurface)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *config, void *native_pixmap,
- const EGLint *attrib_list);
- _EGLSurface *(*CreatePbufferSurface)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLConfig *config,
- const EGLint *attrib_list);
- EGLBoolean (*DestroySurface)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface);
- EGLBoolean (*QuerySurface)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface, EGLint attribute,
- EGLint *value);
- EGLBoolean (*BindTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface, EGLint buffer);
- EGLBoolean (*ReleaseTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface, EGLint buffer);
- EGLBoolean (*SwapInterval)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf, EGLint interval);
- EGLBoolean (*SwapBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *draw);
- EGLBoolean (*CopyBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface, void *native_pixmap_target);
- EGLBoolean (*SetDamageRegion)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface, EGLint *rects, EGLint n_rects);
-
- /* misc functions */
- EGLBoolean (*WaitClient)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLContext *ctx);
- EGLBoolean (*WaitNative)(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint engine);
-
- /* this function may be called from multiple threads at the same time */
- _EGLProc (*GetProcAddress)(_EGLDriver *drv, const char *procname);
-
- _EGLImage *(*CreateImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLContext *ctx, EGLenum target,
- EGLClientBuffer buffer,
- const EGLint *attr_list);
- EGLBoolean (*DestroyImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLImage *image);
-
- _EGLSync *(*CreateSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, EGLenum type,
- const EGLAttrib *attrib_list);
- EGLBoolean (*DestroySyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSync *sync);
- EGLint (*ClientWaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSync *sync, EGLint flags, EGLTime timeout);
- EGLint (*WaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync);
- EGLBoolean (*SignalSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSync *sync, EGLenum mode);
- EGLint (*DupNativeFenceFDANDROID)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSync *sync);
-
- EGLBoolean (*SwapBuffersRegionNOK)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surf, EGLint numRects,
- const EGLint *rects);
-
- _EGLImage *(*CreateDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
- const EGLint *attr_list);
- EGLBoolean (*ExportDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLImage *img, EGLint *name,
- EGLint *handle, EGLint *stride);
-
- EGLBoolean (*BindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
- struct wl_display *display);
- EGLBoolean (*UnbindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
- struct wl_display *display);
- EGLBoolean (*QueryWaylandBufferWL)(_EGLDriver *drv, _EGLDisplay *displ,
- struct wl_resource *buffer,
- EGLint attribute, EGLint *value);
-
- struct wl_buffer *(*CreateWaylandBufferFromImageWL)(_EGLDriver *drv,
- _EGLDisplay *disp,
- _EGLImage *img);
-
- EGLBoolean (*SwapBuffersWithDamageEXT)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface,
- const EGLint *rects, EGLint n_rects);
-
- EGLBoolean (*PostSubBufferNV)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLSurface *surface, EGLint x, EGLint y,
- EGLint width, EGLint height);
-
- EGLint (*QueryBufferAge)(_EGLDriver *drv,
- _EGLDisplay *disp, _EGLSurface *surface);
- EGLBoolean (*GetSyncValuesCHROMIUM)(_EGLDisplay *disp, _EGLSurface *surface,
- EGLuint64KHR *ust, EGLuint64KHR *msc,
- EGLuint64KHR *sbc);
-
- EGLBoolean (*ExportDMABUFImageQueryMESA)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLImage *img, EGLint *fourcc,
- EGLint *nplanes,
- EGLuint64KHR *modifiers);
- EGLBoolean (*ExportDMABUFImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
- _EGLImage *img, EGLint *fds,
- EGLint *strides, EGLint *offsets);
-
- int (*GLInteropQueryDeviceInfo)(_EGLDisplay *disp, _EGLContext *ctx,
- struct mesa_glinterop_device_info *out);
- int (*GLInteropExportObject)(_EGLDisplay *disp, _EGLContext *ctx,
- struct mesa_glinterop_export_in *in,
- struct mesa_glinterop_export_out *out);
-
- EGLBoolean (*QueryDmaBufFormatsEXT)(_EGLDriver *drv, _EGLDisplay *disp,
- EGLint max_formats, EGLint *formats,
- EGLint *num_formats);
- EGLBoolean (*QueryDmaBufModifiersEXT) (_EGLDriver *drv, _EGLDisplay *disp,
- EGLint format, EGLint max_modifiers,
- EGLuint64KHR *modifiers,
- EGLBoolean *external_only,
- EGLint *num_modifiers);
-
- void (*SetBlobCacheFuncsANDROID) (_EGLDriver *drv, _EGLDisplay *disp,
- EGLSetBlobFuncANDROID set,
- EGLGetBlobFuncANDROID get);
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* EGLAPI_INCLUDED */
list = list->Next;
_eglUnlinkContext(ctx);
- drv->API.DestroyContext(drv, display, ctx);
+ drv->DestroyContext(drv, display, ctx);
}
assert(!display->ResourceLists[_EGL_RESOURCE_CONTEXT]);
list = list->Next;
_eglUnlinkSurface(surf);
- drv->API.DestroySurface(drv, display, surf);
+ drv->DestroySurface(drv, display, surf);
}
assert(!display->ResourceLists[_EGL_RESOURCE_SURFACE]);
list = list->Next;
_eglUnlinkImage(image);
- drv->API.DestroyImageKHR(drv, display, image);
+ drv->DestroyImageKHR(drv, display, image);
}
assert(!display->ResourceLists[_EGL_RESOURCE_IMAGE]);
list = list->Next;
_eglUnlinkSync(sync);
- drv->API.DestroySyncKHR(drv, display, sync);
+ drv->DestroySyncKHR(drv, display, sync);
}
assert(!display->ResourceLists[_EGL_RESOURCE_SYNC]);
}
_eglMatchAndInitialize(_EGLDisplay *disp)
{
if (_eglGetDriver())
- if (_eglDriver->API.Initialize(_eglDriver, disp))
+ if (_eglDriver->Initialize(_eglDriver, disp))
return _eglDriver;
return NULL;
__eglMustCastToProperFunctionPointerType
_eglGetDriverProc(const char *procname)
{
- if (_eglGetDriver() && _eglDriver->API.GetProcAddress)
- return _eglDriver->API.GetProcAddress(_eglDriver, procname);
+ if (_eglGetDriver() && _eglDriver->GetProcAddress)
+ return _eglDriver->GetProcAddress(_eglDriver, procname);
return NULL;
}
#include "c99_compat.h"
#include "egltypedefs.h"
-#include "eglapi.h"
#include <stddef.h>
_EGL_DRIVER_TYPECAST(drvname ## _surface, _EGLSurface, obj) \
_EGL_DRIVER_TYPECAST(drvname ## _config, _EGLConfig, obj)
+/**
+ * A generic function ptr type
+ */
+typedef void (*_EGLProc)(void);
+
+struct wl_display;
+struct mesa_glinterop_device_info;
+struct mesa_glinterop_export_in;
+struct mesa_glinterop_export_out;
/**
- * Base class for device drivers.
+ * The API dispatcher jumps through these functions
*/
struct _egl_driver
{
- _EGLAPI API; /**< EGL API dispatch table */
+ /* driver funcs */
+ EGLBoolean (*Initialize)(_EGLDriver *, _EGLDisplay *disp);
+ EGLBoolean (*Terminate)(_EGLDriver *, _EGLDisplay *disp);
+ const char *(*QueryDriverName)(_EGLDisplay *disp);
+ char *(*QueryDriverConfig)(_EGLDisplay *disp);
+
+ /* context funcs */
+ _EGLContext *(*CreateContext)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *config, _EGLContext *share_list,
+ const EGLint *attrib_list);
+ EGLBoolean (*DestroyContext)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *ctx);
+ /* this is the only function (other than Initialize) that may be called
+ * with an uninitialized display
+ */
+ EGLBoolean (*MakeCurrent)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *draw, _EGLSurface *read,
+ _EGLContext *ctx);
+
+ /* surface funcs */
+ _EGLSurface *(*CreateWindowSurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *config, void *native_window,
+ const EGLint *attrib_list);
+ _EGLSurface *(*CreatePixmapSurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *config, void *native_pixmap,
+ const EGLint *attrib_list);
+ _EGLSurface *(*CreatePbufferSurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLConfig *config,
+ const EGLint *attrib_list);
+ EGLBoolean (*DestroySurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface);
+ EGLBoolean (*QuerySurface)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface, EGLint attribute,
+ EGLint *value);
+ EGLBoolean (*BindTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface, EGLint buffer);
+ EGLBoolean (*ReleaseTexImage)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface, EGLint buffer);
+ EGLBoolean (*SwapInterval)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surf, EGLint interval);
+ EGLBoolean (*SwapBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *draw);
+ EGLBoolean (*CopyBuffers)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface, void *native_pixmap_target);
+ EGLBoolean (*SetDamageRegion)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface, EGLint *rects, EGLint n_rects);
+
+ /* misc functions */
+ EGLBoolean (*WaitClient)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *ctx);
+ EGLBoolean (*WaitNative)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint engine);
+
+ /* this function may be called from multiple threads at the same time */
+ _EGLProc (*GetProcAddress)(_EGLDriver *drv, const char *procname);
+
+ _EGLImage *(*CreateImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLContext *ctx, EGLenum target,
+ EGLClientBuffer buffer,
+ const EGLint *attr_list);
+ EGLBoolean (*DestroyImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage *image);
+
+ _EGLSync *(*CreateSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, EGLenum type,
+ const EGLAttrib *attrib_list);
+ EGLBoolean (*DestroySyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSync *sync);
+ EGLint (*ClientWaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSync *sync, EGLint flags, EGLTime timeout);
+ EGLint (*WaitSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync);
+ EGLBoolean (*SignalSyncKHR)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSync *sync, EGLenum mode);
+ EGLint (*DupNativeFenceFDANDROID)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSync *sync);
+
+ EGLBoolean (*SwapBuffersRegionNOK)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surf, EGLint numRects,
+ const EGLint *rects);
+
+ _EGLImage *(*CreateDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ const EGLint *attr_list);
+ EGLBoolean (*ExportDRMImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage *img, EGLint *name,
+ EGLint *handle, EGLint *stride);
+
+ EGLBoolean (*BindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
+ struct wl_display *display);
+ EGLBoolean (*UnbindWaylandDisplayWL)(_EGLDriver *drv, _EGLDisplay *disp,
+ struct wl_display *display);
+ EGLBoolean (*QueryWaylandBufferWL)(_EGLDriver *drv, _EGLDisplay *displ,
+ struct wl_resource *buffer,
+ EGLint attribute, EGLint *value);
+
+ struct wl_buffer *(*CreateWaylandBufferFromImageWL)(_EGLDriver *drv,
+ _EGLDisplay *disp,
+ _EGLImage *img);
+
+ EGLBoolean (*SwapBuffersWithDamageEXT)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface,
+ const EGLint *rects, EGLint n_rects);
+
+ EGLBoolean (*PostSubBufferNV)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLSurface *surface, EGLint x, EGLint y,
+ EGLint width, EGLint height);
+
+ EGLint (*QueryBufferAge)(_EGLDriver *drv,
+ _EGLDisplay *disp, _EGLSurface *surface);
+ EGLBoolean (*GetSyncValuesCHROMIUM)(_EGLDisplay *disp, _EGLSurface *surface,
+ EGLuint64KHR *ust, EGLuint64KHR *msc,
+ EGLuint64KHR *sbc);
+
+ EGLBoolean (*ExportDMABUFImageQueryMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage *img, EGLint *fourcc,
+ EGLint *nplanes,
+ EGLuint64KHR *modifiers);
+ EGLBoolean (*ExportDMABUFImageMESA)(_EGLDriver *drv, _EGLDisplay *disp,
+ _EGLImage *img, EGLint *fds,
+ EGLint *strides, EGLint *offsets);
+
+ int (*GLInteropQueryDeviceInfo)(_EGLDisplay *disp, _EGLContext *ctx,
+ struct mesa_glinterop_device_info *out);
+ int (*GLInteropExportObject)(_EGLDisplay *disp, _EGLContext *ctx,
+ struct mesa_glinterop_export_in *in,
+ struct mesa_glinterop_export_out *out);
+
+ EGLBoolean (*QueryDmaBufFormatsEXT)(_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint max_formats, EGLint *formats,
+ EGLint *num_formats);
+ EGLBoolean (*QueryDmaBufModifiersEXT) (_EGLDriver *drv, _EGLDisplay *disp,
+ EGLint format, EGLint max_modifiers,
+ EGLuint64KHR *modifiers,
+ EGLBoolean *external_only,
+ EGLint *num_modifiers);
+
+ void (*SetBlobCacheFuncsANDROID) (_EGLDriver *drv, _EGLDisplay *disp,
+ EGLSetBlobFuncANDROID set,
+ EGLGetBlobFuncANDROID get);
};
return _eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
_EGLContext *ctx = _eglGetCurrentContext();
- EGLint result = drv->API.QueryBufferAge(drv, disp, surface);
+ EGLint result = drv->QueryBufferAge(drv, disp, surface);
/* error happened */
if (result < 0)
return EGL_FALSE;
sync->Type == EGL_SYNC_CL_EVENT_KHR ||
sync->Type == EGL_SYNC_REUSABLE_KHR ||
sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID))
- drv->API.ClientWaitSyncKHR(drv, disp, sync, 0, 0);
+ drv->ClientWaitSyncKHR(drv, disp, sync, 0, 0);
*value = sync->SyncStatus;
break;
extern "C" {
#endif
-typedef struct _egl_api _EGLAPI;
-
typedef struct _egl_array _EGLArray;
typedef struct _egl_config _EGLConfig;
files_egl = files(
'main/eglapi.c',
- 'main/eglapi.h',
'main/eglarray.c',
'main/eglarray.h',
'main/eglconfig.c',