egl: remove #ifdef's for official extensions

There is no point in having them when we distribute eglext.h.

As for unofficial extensions, there is a chance that we might remove some of
them evetually.  Keeping the #ifdef's for now should make that easier.
This commit is contained in:
Chia-I Wu 2011-12-20 16:28:20 +08:00
parent ed1ff2acec
commit f957cac772
11 changed files with 0 additions and 84 deletions

View file

@ -217,9 +217,6 @@ _eglCheckConfig(_EGLDisplay *disp, _EGLConfig *conf, const char *msg)
}
#ifdef EGL_KHR_reusable_sync
static INLINE _EGLDriver *
_eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
{
@ -234,9 +231,6 @@ _eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
}
#endif /* EGL_KHR_reusable_sync */
#ifdef EGL_MESA_screen_surface
@ -759,7 +753,6 @@ eglWaitClient(void)
EGLBoolean EGLAPIENTRY
eglWaitGL(void)
{
#ifdef EGL_VERSION_1_2
_EGLThreadInfo *t = _eglGetCurrentThread();
EGLint api_index = t->CurrentAPIIndex;
EGLint es_index = _eglConvertApiToIndex(EGL_OPENGL_ES_API);
@ -772,9 +765,6 @@ eglWaitGL(void)
ret = eglWaitClient();
t->CurrentAPIIndex = api_index;
return ret;
#else
return eglWaitClient();
#endif
}
@ -933,10 +923,8 @@ eglGetProcAddress(const char *procname)
#ifdef EGL_MESA_drm_display
{ "eglGetDRMDisplayMESA", (_EGLProc) eglGetDRMDisplayMESA },
#endif
#ifdef EGL_KHR_image_base
{ "eglCreateImageKHR", (_EGLProc) eglCreateImageKHR },
{ "eglDestroyImageKHR", (_EGLProc) eglDestroyImageKHR },
#endif /* EGL_KHR_image_base */
#ifdef EGL_NOK_swap_region
{ "eglSwapBuffersRegionNOK", (_EGLProc) eglSwapBuffersRegionNOK },
#endif
@ -1208,9 +1196,6 @@ eglGetDRMDisplayMESA(int fd)
** EGL 1.2
**/
#ifdef EGL_VERSION_1_2
/**
* Specify the client API to use for subsequent calls including:
* eglCreateContext()
@ -1309,12 +1294,6 @@ eglReleaseThread(void)
}
#endif /* EGL_VERSION_1_2 */
#ifdef EGL_KHR_image_base
EGLImageKHR EGLAPIENTRY
eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
@ -1360,12 +1339,6 @@ eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
}
#endif /* EGL_KHR_image_base */
#ifdef EGL_KHR_reusable_sync
EGLSyncKHR EGLAPIENTRY
eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
{
@ -1451,9 +1424,6 @@ eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *v
}
#endif /* EGL_KHR_reusable_sync */
#ifdef EGL_NOK_swap_region
EGLBoolean EGLAPIENTRY

View file

@ -96,24 +96,18 @@ typedef const char * (*QueryModeStringMESA_t)(_EGLDriver *drv, _EGLDisplay *dpy,
#endif /* EGL_MESA_screen_surface */
#ifdef EGL_VERSION_1_2
typedef _EGLSurface *(*CreatePbufferFromClientBuffer_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum buftype, EGLClientBuffer buffer, _EGLConfig *config, const EGLint *attrib_list);
#endif /* EGL_VERSION_1_2 */
#ifdef EGL_KHR_image_base
typedef _EGLImage *(*CreateImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attr_list);
typedef EGLBoolean (*DestroyImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image);
#endif /* EGL_KHR_image_base */
#ifdef EGL_KHR_reusable_sync
typedef _EGLSync *(*CreateSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list);
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 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);
#endif /* EGL_KHR_reusable_sync */
#ifdef EGL_NOK_swap_region
@ -180,22 +174,16 @@ struct _egl_api
QueryModeStringMESA_t QueryModeStringMESA;
#endif /* EGL_MESA_screen_surface */
#ifdef EGL_VERSION_1_2
CreatePbufferFromClientBuffer_t CreatePbufferFromClientBuffer;
#endif
#ifdef EGL_KHR_image_base
CreateImageKHR_t CreateImageKHR;
DestroyImageKHR_t DestroyImageKHR;
#endif /* EGL_KHR_image_base */
#ifdef EGL_KHR_reusable_sync
CreateSyncKHR_t CreateSyncKHR;
DestroySyncKHR_t DestroySyncKHR;
ClientWaitSyncKHR_t ClientWaitSyncKHR;
SignalSyncKHR_t SignalSyncKHR;
GetSyncAttribKHR_t GetSyncAttribKHR;
#endif /* EGL_KHR_reusable_sync */
#ifdef EGL_NOK_swap_region
SwapBuffersRegionNOK_t SwapBuffersRegionNOK;

View file

@ -158,7 +158,6 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
}
#ifdef EGL_VERSION_1_2
static EGLint
_eglQueryContextRenderBuffer(_EGLContext *ctx)
{
@ -173,7 +172,6 @@ _eglQueryContextRenderBuffer(_EGLContext *ctx)
rb = surf->RenderBuffer;
return rb;
}
#endif /* EGL_VERSION_1_2 */
EGLBoolean
@ -195,14 +193,12 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *c,
case EGL_CONTEXT_CLIENT_VERSION:
*value = c->ClientVersion;
break;
#ifdef EGL_VERSION_1_2
case EGL_CONTEXT_CLIENT_TYPE:
*value = c->ClientAPI;
break;
case EGL_RENDER_BUFFER:
*value = _eglQueryContextRenderBuffer(c);
break;
#endif /* EGL_VERSION_1_2 */
default:
return _eglError(EGL_BAD_ATTRIBUTE, "eglQueryContext");
}
@ -310,7 +306,6 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
return _eglError(EGL_BAD_MATCH, "eglMakeCurrent");
switch (ctx->ClientAPI) {
#ifdef EGL_VERSION_1_4
/* OpenGL and OpenGL ES are conflicting */
case EGL_OPENGL_ES_API:
conflict_api = EGL_OPENGL_API;
@ -318,7 +313,6 @@ _eglCheckMakeCurrent(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read)
case EGL_OPENGL_API:
conflict_api = EGL_OPENGL_ES_API;
break;
#endif
default:
conflict_api = -1;
break;

View file

@ -103,18 +103,14 @@ _eglInitDriverFallbacks(_EGLDriver *drv)
drv->API.QueryModeStringMESA = _eglQueryModeStringMESA;
#endif /* EGL_MESA_screen_surface */
#ifdef EGL_KHR_image_base
drv->API.CreateImageKHR = NULL;
drv->API.DestroyImageKHR = NULL;
#endif /* EGL_KHR_image_base */
#ifdef EGL_KHR_reusable_sync
drv->API.CreateSyncKHR = NULL;
drv->API.DestroySyncKHR = NULL;
drv->API.ClientWaitSyncKHR = NULL;
drv->API.SignalSyncKHR = NULL;
drv->API.GetSyncAttribKHR = _eglGetSyncAttribKHR;
#endif /* EGL_KHR_reusable_sync */
#ifdef EGL_MESA_drm_image
drv->API.CreateDRMImageMESA = NULL;

View file

@ -34,9 +34,6 @@
#include "egllog.h"
#ifdef EGL_KHR_image_base
/**
* Parse the list of image attributes and return the proper error code.
*/
@ -113,6 +110,3 @@ _eglInitImage(_EGLImage *img, _EGLDisplay *dpy)
return EGL_TRUE;
}
#endif /* EGL_KHR_image_base */

View file

@ -33,9 +33,6 @@
#include "egllog.h"
#ifdef EGL_KHR_reusable_sync
/**
* Parse the list of sync attributes and return the proper error code.
*/
@ -117,6 +114,3 @@ _eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
return EGL_TRUE;
}
#endif /* EGL_KHR_reusable_sync */

View file

@ -34,9 +34,6 @@
#include "egldisplay.h"
#ifdef EGL_KHR_reusable_sync
/**
* "Base" class for device driver syncs.
*/
@ -131,7 +128,4 @@ _eglGetSyncHandle(_EGLSync *sync)
}
#endif /* EGL_KHR_reusable_sync */
#endif /* EGLSYNC_INCLUDED */

View file

@ -99,8 +99,6 @@ struct egl_g3d_image {
_EGL_DRIVER_STANDARD_TYPECASTS(egl_g3d)
_EGL_DRIVER_TYPECAST(egl_g3d_image, _EGLImage, obj)
#ifdef EGL_KHR_reusable_sync
struct egl_g3d_sync {
_EGLSync base;
@ -113,8 +111,6 @@ struct egl_g3d_sync {
};
_EGL_DRIVER_TYPECAST(egl_g3d_sync, _EGLSync, obj)
#endif /* EGL_KHR_reusable_sync */
#ifdef EGL_MESA_screen_surface
struct egl_g3d_screen {

View file

@ -878,12 +878,10 @@ egl_g3d_init_driver_api(_EGLDriver *drv)
#endif
#ifdef EGL_KHR_reusable_sync
drv->API.CreateSyncKHR = egl_g3d_create_sync;
drv->API.DestroySyncKHR = egl_g3d_destroy_sync;
drv->API.ClientWaitSyncKHR = egl_g3d_client_wait_sync;
drv->API.SignalSyncKHR = egl_g3d_signal_sync;
#endif
#ifdef EGL_MESA_screen_surface
drv->API.CreateScreenSurfaceMESA = egl_g3d_create_screen_surface;

View file

@ -35,8 +35,6 @@
#include "egl_g3d.h"
#include "egl_g3d_sync.h"
#ifdef EGL_KHR_reusable_sync
/**
* Wait for the conditional variable.
*/
@ -279,5 +277,3 @@ egl_g3d_signal_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
return EGL_TRUE;
}
#endif /* EGL_KHR_reusable_sync */

View file

@ -31,8 +31,6 @@
#include "egl_g3d.h"
#ifdef EGL_KHR_reusable_sync
_EGLSync *
egl_g3d_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
EGLenum type, const EGLint *attrib_list);
@ -48,6 +46,4 @@ EGLBoolean
egl_g3d_signal_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
EGLenum mode);
#endif /* EGL_KHR_reusable_sync */
#endif /* _EGL_G3D_SYNC_H_ */