From: Marek Olšák Date: Tue, 12 May 2015 15:34:57 +0000 (+0200) Subject: egl: use EGL 1.5 types without suffixes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d333d30632516b1fc5b60181c2c237653e55a8e1;p=mesa.git egl: use EGL 1.5 types without suffixes Reviewed-by: Emil Velikov Reviewed-by: Chad Versace --- diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 8b915ef54d0..82f8843e001 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -2216,7 +2216,7 @@ dri2_egl_unref_sync(struct dri2_egl_display *dri2_dpy, static _EGLSync * dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list, - const EGLAttribKHR *attrib_list64) + const EGLAttrib *attrib_list64) { _EGLContext *ctx = _eglGetCurrentContext(); struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy); @@ -2282,7 +2282,7 @@ dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync) static EGLint dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, - EGLint flags, EGLTimeKHR timeout) + EGLint flags, EGLTime timeout) { _EGLContext *ctx = _eglGetCurrentContext(); struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy); diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 81be6f9943b..96d97176372 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1226,7 +1226,7 @@ eglReleaseThread(void) } -static EGLImageKHR EGLAPIENTRY +static EGLImage EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attr_list) { @@ -1234,7 +1234,7 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, _EGLContext *context = _eglLookupContext(ctx, disp); _EGLDriver *drv; _EGLImage *img; - EGLImageKHR ret; + EGLImage ret; _EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv); if (!disp->Extensions.KHR_image_base) @@ -1256,7 +1256,7 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, static EGLBoolean EGLAPIENTRY -eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) +eglDestroyImageKHR(EGLDisplay dpy, EGLImage image) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLImage *img = _eglLookupImage(image, disp); @@ -1276,15 +1276,15 @@ eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image) } -static EGLSyncKHR +static EGLSync _eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list, - const EGLAttribKHR *attrib_list64, EGLBoolean is64) + const EGLAttrib *attrib_list64, EGLBoolean is64) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLContext *ctx = _eglGetCurrentContext(); _EGLDriver *drv; _EGLSync *sync; - EGLSyncKHR ret; + EGLSync ret; _EGL_CHECK_DISPLAY(disp, EGL_NO_SYNC_KHR, drv); @@ -1320,22 +1320,22 @@ _eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list, } -static EGLSyncKHR EGLAPIENTRY +static EGLSync EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) { return _eglCreateSync(dpy, type, attrib_list, NULL, EGL_FALSE); } -static EGLSyncKHR EGLAPIENTRY -eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list) +static EGLSync EGLAPIENTRY +eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list) { return _eglCreateSync(dpy, type, NULL, attrib_list, EGL_TRUE); } static EGLBoolean EGLAPIENTRY -eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) +eglDestroySyncKHR(EGLDisplay dpy, EGLSync sync) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLSync *s = _eglLookupSync(sync, disp); @@ -1354,7 +1354,7 @@ eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) static EGLint EGLAPIENTRY -eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) +eglClientWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLSync *s = _eglLookupSync(sync, disp); @@ -1375,7 +1375,7 @@ eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR t static EGLint EGLAPIENTRY -eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) +eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLSync *s = _eglLookupSync(sync, disp); @@ -1401,7 +1401,7 @@ eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) static EGLBoolean EGLAPIENTRY -eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) +eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLSync *s = _eglLookupSync(sync, disp); @@ -1417,7 +1417,7 @@ eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) static EGLBoolean EGLAPIENTRY -eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value) +eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLSync *s = _eglLookupSync(sync, disp); @@ -1465,13 +1465,13 @@ eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, #ifdef EGL_MESA_drm_image -static EGLImageKHR EGLAPIENTRY +static EGLImage EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLDriver *drv; _EGLImage *img; - EGLImageKHR ret; + EGLImage ret; _EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv); if (!disp->Extensions.MESA_drm_image) @@ -1484,7 +1484,7 @@ eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list) } static EGLBoolean EGLAPIENTRY -eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, +eglExportDRMImageMESA(EGLDisplay dpy, EGLImage image, EGLint *name, EGLint *handle, EGLint *stride) { _EGLDisplay *disp = _eglLockDisplay(dpy); @@ -1566,7 +1566,7 @@ eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, #ifdef EGL_WL_create_wayland_buffer_from_image static struct wl_buffer * EGLAPIENTRY -eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image) +eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image) { _EGLDisplay *disp = _eglLockDisplay(dpy); _EGLImage *img; @@ -1630,7 +1630,7 @@ eglGetSyncValuesCHROMIUM(EGLDisplay display, EGLSurface surface, #ifdef EGL_MESA_image_dma_buf_export static EGLBoolean EGLAPIENTRY -eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image, +eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImage image, EGLint *fourcc, EGLint *nplanes, EGLuint64KHR *modifiers) { @@ -1652,7 +1652,7 @@ eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image, } static EGLBoolean EGLAPIENTRY -eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImageKHR image, +eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImage image, int *fds, EGLint *strides, EGLint *offsets) { _EGLDisplay *disp = _eglLockDisplay(dpy); diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h index e07970f8b1c..d2b2eb7b264 100644 --- a/src/egl/main/eglapi.h +++ b/src/egl/main/eglapi.h @@ -91,9 +91,9 @@ typedef _EGLImage *(*CreateImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLCo typedef EGLBoolean (*DestroyImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image); -typedef _EGLSync *(*CreateSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list, const EGLAttribKHR *attrib_list64); +typedef _EGLSync *(*CreateSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list, const EGLAttrib *attrib_list64); typedef EGLBoolean (*DestroySyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync); -typedef EGLint (*ClientWaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint flags, EGLTimeKHR timeout); +typedef EGLint (*ClientWaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint flags, EGLTime timeout); typedef EGLint (*WaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync); typedef EGLBoolean (*SignalSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLenum mode); typedef EGLBoolean (*GetSyncAttribKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint attribute, EGLint *value); diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h index d06f91cd1a4..0dd5e120ad7 100644 --- a/src/egl/main/eglimage.h +++ b/src/egl/main/eglimage.h @@ -121,11 +121,11 @@ _eglPutImage(_EGLImage *img) * Link an image to its display and return the handle of the link. * The handle can be passed to client directly. */ -static inline EGLImageKHR +static inline EGLImage _eglLinkImage(_EGLImage *img) { _eglLinkResource(&img->Resource, _EGL_RESOURCE_IMAGE); - return (EGLImageKHR) img; + return (EGLImage) img; } @@ -145,7 +145,7 @@ _eglUnlinkImage(_EGLImage *img) * Return NULL if the handle has no corresponding linked image. */ static inline _EGLImage * -_eglLookupImage(EGLImageKHR image, _EGLDisplay *dpy) +_eglLookupImage(EGLImage image, _EGLDisplay *dpy) { _EGLImage *img = (_EGLImage *) image; if (!dpy || !_eglCheckResource((void *) img, _EGL_RESOURCE_IMAGE, dpy)) @@ -157,12 +157,12 @@ _eglLookupImage(EGLImageKHR image, _EGLDisplay *dpy) /** * Return the handle of a linked image, or EGL_NO_IMAGE_KHR. */ -static inline EGLImageKHR +static inline EGLImage _eglGetImageHandle(_EGLImage *img) { _EGLResource *res = (_EGLResource *) img; return (res && _eglIsResourceLinked(res)) ? - (EGLImageKHR) img : EGL_NO_IMAGE_KHR; + (EGLImage) img : EGL_NO_IMAGE_KHR; } diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c index 8b8ab16b0d2..205cdc04581 100644 --- a/src/egl/main/eglsync.c +++ b/src/egl/main/eglsync.c @@ -67,7 +67,7 @@ _eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list) static EGLint -_eglParseSyncAttribList64(_EGLSync *sync, const EGLAttribKHR *attrib_list) +_eglParseSyncAttribList64(_EGLSync *sync, const EGLAttrib *attrib_list) { EGLint i, err = EGL_SUCCESS; @@ -103,7 +103,7 @@ _eglParseSyncAttribList64(_EGLSync *sync, const EGLAttribKHR *attrib_list) EGLBoolean _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type, - const EGLint *attrib_list, const EGLAttribKHR *attrib_list64) + const EGLint *attrib_list, const EGLAttrib *attrib_list64) { EGLint err; diff --git a/src/egl/main/eglsync.h b/src/egl/main/eglsync.h index 1d2eb11a7a0..4959cf07482 100644 --- a/src/egl/main/eglsync.h +++ b/src/egl/main/eglsync.h @@ -47,13 +47,13 @@ struct _egl_sync EGLenum Type; EGLenum SyncStatus; EGLenum SyncCondition; - EGLAttribKHR CLEvent; + EGLAttrib CLEvent; }; extern EGLBoolean _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type, - const EGLint *attrib_list, const EGLAttribKHR *attrib_list64); + const EGLint *attrib_list, const EGLAttrib *attrib_list64); extern EGLBoolean @@ -87,11 +87,11 @@ _eglPutSync(_EGLSync *sync) * Link a sync to its display and return the handle of the link. * The handle can be passed to client directly. */ -static inline EGLSyncKHR +static inline EGLSync _eglLinkSync(_EGLSync *sync) { _eglLinkResource(&sync->Resource, _EGL_RESOURCE_SYNC); - return (EGLSyncKHR) sync; + return (EGLSync) sync; } @@ -110,7 +110,7 @@ _eglUnlinkSync(_EGLSync *sync) * Return NULL if the handle has no corresponding linked sync. */ static inline _EGLSync * -_eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy) +_eglLookupSync(EGLSync handle, _EGLDisplay *dpy) { _EGLSync *sync = (_EGLSync *) handle; if (!dpy || !_eglCheckResource((void *) sync, _EGL_RESOURCE_SYNC, dpy)) @@ -122,12 +122,12 @@ _eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy) /** * Return the handle of a linked sync, or EGL_NO_SYNC_KHR. */ -static inline EGLSyncKHR +static inline EGLSync _eglGetSyncHandle(_EGLSync *sync) { _EGLResource *res = (_EGLResource *) sync; return (res && _eglIsResourceLinked(res)) ? - (EGLSyncKHR) sync : EGL_NO_SYNC_KHR; + (EGLSync) sync : EGL_NO_SYNC_KHR; }